Built motion from commit (unavailable).|2.5.0
[motion2.git] / server / api / intDeskAccount / intDeskAccount.rpc.js
index f9eaf81..7e5684e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0153=['../../config/environment','jayson/promise','client','http','request','info','DeskAccount,\x20%s,\x20%s','debug','request\x20sent','error','code','message','catch','GetDeskAccount','DeskAccount','findAll','options','raw','where','limit','include','map','model','attributes','then','ShowDeskAccount','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc'];(function(_0x131e57,_0x2cf3a1){var _0x362902=function(_0x2d57d7){while(--_0x2d57d7){_0x131e57['push'](_0x131e57['shift']());}};_0x362902(++_0x2cf3a1);}(_0x0153,0x9e));var _0x3015=function(_0x5ee4cc,_0x486993){_0x5ee4cc=_0x5ee4cc-0x0;var _0x56df10=_0x0153[_0x5ee4cc];return _0x56df10;};'use strict';var _=require(_0x3015('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x3015('0x1'));var rs=require(_0x3015('0x2'));var fs=require('fs');var Redis=require(_0x3015('0x3'));var db=require(_0x3015('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x3015('0x5'))(_0x3015('0x6'));var config=require(_0x3015('0x7'));var jayson=require(_0x3015('0x8'));var client=jayson[_0x3015('0x9')][_0x3015('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4b590d,_0x3c6efb,_0x1b5427){return new BPromise(function(_0x5a8694,_0x3e246e){return client[_0x3015('0xb')](_0x4b590d,_0x1b5427)['then'](function(_0x146189){logger[_0x3015('0xc')](_0x3015('0xd'),_0x3c6efb,'request\x20sent');logger[_0x3015('0xe')]('DeskAccount,\x20%s,\x20%s,\x20%s',_0x3c6efb,_0x3015('0xf'),JSON['stringify'](_0x146189));if(_0x146189[_0x3015('0x10')]){if(_0x146189[_0x3015('0x10')][_0x3015('0x11')]===0x1f4){logger[_0x3015('0x10')]('DeskAccount,\x20%s,\x20%s',_0x3c6efb,_0x146189[_0x3015('0x10')][_0x3015('0x12')]);return _0x3e246e(_0x146189[_0x3015('0x10')][_0x3015('0x12')]);}logger[_0x3015('0x10')]('DeskAccount,\x20%s,\x20%s',_0x3c6efb,_0x146189[_0x3015('0x10')][_0x3015('0x12')]);return _0x5a8694(_0x146189[_0x3015('0x10')][_0x3015('0x12')]);}else{logger['info']('DeskAccount,\x20%s,\x20%s',_0x3c6efb,_0x3015('0xf'));_0x5a8694(_0x146189['result'][_0x3015('0x12')]);}})[_0x3015('0x13')](function(_0xc83d27){logger['error'](_0x3015('0xd'),_0x3c6efb,_0xc83d27);_0x3e246e(_0xc83d27);});});}exports[_0x3015('0x14')]=function(_0xca9515){var _0x22a434=this;return new Promise(function(_0x3e7049,_0x54503f){return db[_0x3015('0x15')][_0x3015('0x16')]({'raw':_0xca9515[_0x3015('0x17')]?_0xca9515['options'][_0x3015('0x18')]===undefined?!![]:![]:!![],'where':_0xca9515[_0x3015('0x17')]?_0xca9515[_0x3015('0x17')][_0x3015('0x19')]||null:null,'attributes':_0xca9515[_0x3015('0x17')]?_0xca9515['options']['attributes']||null:null,'limit':_0xca9515['options']?_0xca9515[_0x3015('0x17')][_0x3015('0x1a')]||null:null,'include':_0xca9515[_0x3015('0x17')]?_0xca9515[_0x3015('0x17')][_0x3015('0x1b')]?_[_0x3015('0x1c')](_0xca9515[_0x3015('0x17')][_0x3015('0x1b')],function(_0x4a5d8d){return{'model':db[_0x4a5d8d[_0x3015('0x1d')]],'as':_0x4a5d8d['as'],'attributes':_0x4a5d8d['attributes'],'include':_0x4a5d8d[_0x3015('0x1b')]?_[_0x3015('0x1c')](_0x4a5d8d['include'],function(_0x16eedb){return{'model':db[_0x16eedb[_0x3015('0x1d')]],'as':_0x16eedb['as'],'attributes':_0x16eedb[_0x3015('0x1e')],'include':_0x16eedb[_0x3015('0x1b')]?_['map'](_0x16eedb[_0x3015('0x1b')],function(_0x1a47d6){return{'model':db[_0x1a47d6[_0x3015('0x1d')]],'as':_0x1a47d6['as'],'attributes':_0x1a47d6[_0x3015('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x3015('0x1f')](function(_0x5672a5){logger[_0x3015('0xc')](_0x3015('0x14'),_0xca9515);logger['debug'](_0x3015('0x14'),_0xca9515,JSON['stringify'](_0x5672a5));_0x3e7049(_0x5672a5);})[_0x3015('0x13')](function(_0x2ccc82){logger[_0x3015('0x10')](_0x3015('0x14'),_0x2ccc82[_0x3015('0x12')],_0xca9515);_0x54503f(_0x22a434[_0x3015('0x10')](0x1f4,_0x2ccc82[_0x3015('0x12')]));});});};exports[_0x3015('0x20')]=function(_0x2d6479){var _0x4335b6=this;return new Promise(function(_0x5b1b87,_0x4776c2){return db[_0x3015('0x15')]['find']({'raw':_0x2d6479[_0x3015('0x17')]?_0x2d6479[_0x3015('0x17')][_0x3015('0x18')]===undefined?!![]:![]:!![],'where':_0x2d6479[_0x3015('0x17')]?_0x2d6479[_0x3015('0x17')][_0x3015('0x19')]||null:null,'attributes':_0x2d6479[_0x3015('0x17')]?_0x2d6479[_0x3015('0x17')][_0x3015('0x1e')]||null:null,'include':_0x2d6479[_0x3015('0x17')]?_0x2d6479['options']['include']?_[_0x3015('0x1c')](_0x2d6479[_0x3015('0x17')][_0x3015('0x1b')],function(_0x2e6eda){return{'model':db[_0x2e6eda[_0x3015('0x1d')]],'as':_0x2e6eda['as'],'attributes':_0x2e6eda[_0x3015('0x1e')],'include':_0x2e6eda[_0x3015('0x1b')]?_[_0x3015('0x1c')](_0x2e6eda['include'],function(_0x51e636){return{'model':db[_0x51e636[_0x3015('0x1d')]],'as':_0x51e636['as'],'attributes':_0x51e636['attributes'],'include':_0x51e636[_0x3015('0x1b')]?_[_0x3015('0x1c')](_0x51e636[_0x3015('0x1b')],function(_0xe004ba){return{'model':db[_0xe004ba['model']],'as':_0xe004ba['as'],'attributes':_0xe004ba[_0x3015('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x3015('0x1f')](function(_0x53ceea){logger[_0x3015('0xc')](_0x3015('0x20'),_0x2d6479);logger[_0x3015('0xe')](_0x3015('0x20'),_0x2d6479,JSON['stringify'](_0x53ceea));_0x5b1b87(_0x53ceea);})['catch'](function(_0x3c8449){logger['error'](_0x3015('0x20'),_0x3c8449[_0x3015('0x12')],_0x2d6479);_0x4776c2(_0x4335b6[_0x3015('0x10')](0x1f4,_0x3c8449['message']));});});};
\ No newline at end of file
+var _0xa196=['then','GetDeskAccount','catch','ShowDeskAccount','find','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','DeskAccount,\x20%s,\x20%s','debug','DeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','DeskAccount','findAll','options','raw','where','attributes','limit','include','map','model'];(function(_0x3dd8dd,_0x369f8e){var _0x33e300=function(_0xf1a7db){while(--_0xf1a7db){_0x3dd8dd['push'](_0x3dd8dd['shift']());}};_0x33e300(++_0x369f8e);}(_0xa196,0xa1));var _0x6a19=function(_0x1b89d0,_0x5ea66a){_0x1b89d0=_0x1b89d0-0x0;var _0x245a3d=_0xa196[_0x1b89d0];return _0x245a3d;};'use strict';var _=require(_0x6a19('0x0'));var util=require(_0x6a19('0x1'));var moment=require(_0x6a19('0x2'));var BPromise=require(_0x6a19('0x3'));var rs=require(_0x6a19('0x4'));var fs=require('fs');var Redis=require(_0x6a19('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x6a19('0x6'));var logger=require(_0x6a19('0x7'))(_0x6a19('0x8'));var config=require(_0x6a19('0x9'));var jayson=require(_0x6a19('0xa'));var client=jayson[_0x6a19('0xb')][_0x6a19('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x39d112,_0x10f753,_0x34d2e4){return new BPromise(function(_0x51872e,_0x105961){return client[_0x6a19('0xd')](_0x39d112,_0x34d2e4)['then'](function(_0x1c5250){logger[_0x6a19('0xe')](_0x6a19('0xf'),_0x10f753,'request\x20sent');logger[_0x6a19('0x10')](_0x6a19('0x11'),_0x10f753,'request\x20sent',JSON[_0x6a19('0x12')](_0x1c5250));if(_0x1c5250[_0x6a19('0x13')]){if(_0x1c5250[_0x6a19('0x13')][_0x6a19('0x14')]===0x1f4){logger[_0x6a19('0x13')](_0x6a19('0xf'),_0x10f753,_0x1c5250[_0x6a19('0x13')][_0x6a19('0x15')]);return _0x105961(_0x1c5250[_0x6a19('0x13')][_0x6a19('0x15')]);}logger[_0x6a19('0x13')](_0x6a19('0xf'),_0x10f753,_0x1c5250[_0x6a19('0x13')][_0x6a19('0x15')]);return _0x51872e(_0x1c5250[_0x6a19('0x13')]['message']);}else{logger[_0x6a19('0xe')](_0x6a19('0xf'),_0x10f753,_0x6a19('0x16'));_0x51872e(_0x1c5250[_0x6a19('0x17')][_0x6a19('0x15')]);}})['catch'](function(_0x2aeec0){logger['error'](_0x6a19('0xf'),_0x10f753,_0x2aeec0);_0x105961(_0x2aeec0);});});}exports['GetDeskAccount']=function(_0x1c74b6){var _0x4376ab=this;return new Promise(function(_0x31ef94,_0x2259a1){return db[_0x6a19('0x18')][_0x6a19('0x19')]({'raw':_0x1c74b6[_0x6a19('0x1a')]?_0x1c74b6[_0x6a19('0x1a')][_0x6a19('0x1b')]===undefined?!![]:![]:!![],'where':_0x1c74b6[_0x6a19('0x1a')]?_0x1c74b6[_0x6a19('0x1a')][_0x6a19('0x1c')]||null:null,'attributes':_0x1c74b6[_0x6a19('0x1a')]?_0x1c74b6[_0x6a19('0x1a')][_0x6a19('0x1d')]||null:null,'limit':_0x1c74b6[_0x6a19('0x1a')]?_0x1c74b6[_0x6a19('0x1a')][_0x6a19('0x1e')]||null:null,'include':_0x1c74b6['options']?_0x1c74b6[_0x6a19('0x1a')][_0x6a19('0x1f')]?_[_0x6a19('0x20')](_0x1c74b6[_0x6a19('0x1a')][_0x6a19('0x1f')],function(_0x1fd270){return{'model':db[_0x1fd270[_0x6a19('0x21')]],'as':_0x1fd270['as'],'attributes':_0x1fd270['attributes'],'include':_0x1fd270['include']?_[_0x6a19('0x20')](_0x1fd270['include'],function(_0xdffb15){return{'model':db[_0xdffb15[_0x6a19('0x21')]],'as':_0xdffb15['as'],'attributes':_0xdffb15[_0x6a19('0x1d')],'include':_0xdffb15[_0x6a19('0x1f')]?_[_0x6a19('0x20')](_0xdffb15[_0x6a19('0x1f')],function(_0x3d2e22){return{'model':db[_0x3d2e22['model']],'as':_0x3d2e22['as'],'attributes':_0x3d2e22[_0x6a19('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x6a19('0x22')](function(_0x47d3b5){logger[_0x6a19('0xe')](_0x6a19('0x23'),_0x1c74b6);logger[_0x6a19('0x10')](_0x6a19('0x23'),_0x1c74b6,JSON['stringify'](_0x47d3b5));_0x31ef94(_0x47d3b5);})[_0x6a19('0x24')](function(_0x509665){logger[_0x6a19('0x13')]('GetDeskAccount',_0x509665['message'],_0x1c74b6);_0x2259a1(_0x4376ab[_0x6a19('0x13')](0x1f4,_0x509665[_0x6a19('0x15')]));});});};exports[_0x6a19('0x25')]=function(_0x31bc94){var _0x368e15=this;return new Promise(function(_0x4392c2,_0x45c55c){return db[_0x6a19('0x18')][_0x6a19('0x26')]({'raw':_0x31bc94[_0x6a19('0x1a')]?_0x31bc94['options'][_0x6a19('0x1b')]===undefined?!![]:![]:!![],'where':_0x31bc94[_0x6a19('0x1a')]?_0x31bc94[_0x6a19('0x1a')][_0x6a19('0x1c')]||null:null,'attributes':_0x31bc94[_0x6a19('0x1a')]?_0x31bc94[_0x6a19('0x1a')][_0x6a19('0x1d')]||null:null,'include':_0x31bc94[_0x6a19('0x1a')]?_0x31bc94[_0x6a19('0x1a')][_0x6a19('0x1f')]?_[_0x6a19('0x20')](_0x31bc94['options'][_0x6a19('0x1f')],function(_0x683e06){return{'model':db[_0x683e06['model']],'as':_0x683e06['as'],'attributes':_0x683e06['attributes'],'include':_0x683e06[_0x6a19('0x1f')]?_[_0x6a19('0x20')](_0x683e06[_0x6a19('0x1f')],function(_0x10f5f8){return{'model':db[_0x10f5f8['model']],'as':_0x10f5f8['as'],'attributes':_0x10f5f8[_0x6a19('0x1d')],'include':_0x10f5f8[_0x6a19('0x1f')]?_[_0x6a19('0x20')](_0x10f5f8[_0x6a19('0x1f')],function(_0x10a978){return{'model':db[_0x10a978[_0x6a19('0x21')]],'as':_0x10a978['as'],'attributes':_0x10a978[_0x6a19('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3982ab){logger[_0x6a19('0xe')](_0x6a19('0x25'),_0x31bc94);logger[_0x6a19('0x10')](_0x6a19('0x25'),_0x31bc94,JSON[_0x6a19('0x12')](_0x3982ab));_0x4392c2(_0x3982ab);})[_0x6a19('0x24')](function(_0x2ccfc0){logger[_0x6a19('0x13')](_0x6a19('0x25'),_0x2ccfc0[_0x6a19('0x15')],_0x31bc94);_0x45c55c(_0x368e15['error'](0x1f4,_0x2ccfc0[_0x6a19('0x15')]));});});};
\ No newline at end of file