Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / intDeskAccount / intDeskAccount.rpc.js
index 728f3c4..d794b61 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaec5=['message','catch','GetDeskAccount','findAll','options','raw','where','attributes','include','map','model','DeskAccount','find','ShowDeskAccount','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','request','then','info','DeskAccount,\x20%s,\x20%s','request\x20sent','debug','DeskAccount,\x20%s,\x20%s,\x20%s','stringify','code','error'];(function(_0x2efda9,_0x1b5651){var _0x16fd9f=function(_0x514a80){while(--_0x514a80){_0x2efda9['push'](_0x2efda9['shift']());}};_0x16fd9f(++_0x1b5651);}(_0xaec5,0x92));var _0x5aec=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xaec5[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x5aec('0x0'));var util=require(_0x5aec('0x1'));var moment=require(_0x5aec('0x2'));var BPromise=require(_0x5aec('0x3'));var rs=require(_0x5aec('0x4'));var fs=require('fs');var Redis=require(_0x5aec('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x5aec('0x6'));var logger=require(_0x5aec('0x7'))(_0x5aec('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x476951,_0x3dae8d,_0x215103){return new BPromise(function(_0x28c362,_0x55c01e){return client[_0x5aec('0x9')](_0x476951,_0x215103)[_0x5aec('0xa')](function(_0x5b5bb3){logger[_0x5aec('0xb')](_0x5aec('0xc'),_0x3dae8d,_0x5aec('0xd'));logger[_0x5aec('0xe')](_0x5aec('0xf'),_0x3dae8d,_0x5aec('0xd'),JSON[_0x5aec('0x10')](_0x5b5bb3));if(_0x5b5bb3['error']){if(_0x5b5bb3['error'][_0x5aec('0x11')]===0x1f4){logger[_0x5aec('0x12')](_0x5aec('0xc'),_0x3dae8d,_0x5b5bb3[_0x5aec('0x12')][_0x5aec('0x13')]);return _0x55c01e(_0x5b5bb3[_0x5aec('0x12')][_0x5aec('0x13')]);}logger[_0x5aec('0x12')](_0x5aec('0xc'),_0x3dae8d,_0x5b5bb3[_0x5aec('0x12')][_0x5aec('0x13')]);return _0x28c362(_0x5b5bb3['error'][_0x5aec('0x13')]);}else{logger[_0x5aec('0xb')]('DeskAccount,\x20%s,\x20%s',_0x3dae8d,_0x5aec('0xd'));_0x28c362(_0x5b5bb3['result'][_0x5aec('0x13')]);}})[_0x5aec('0x14')](function(_0x28f415){logger[_0x5aec('0x12')]('DeskAccount,\x20%s,\x20%s',_0x3dae8d,_0x28f415);_0x55c01e(_0x28f415);});});}exports[_0x5aec('0x15')]=function(_0x2c32bf){var _0x1f636a=this;return new Promise(function(_0x4518c9,_0x20433a){return db['DeskAccount'][_0x5aec('0x16')]({'raw':_0x2c32bf[_0x5aec('0x17')]?_0x2c32bf['options'][_0x5aec('0x18')]===undefined?!![]:![]:!![],'where':_0x2c32bf['options']?_0x2c32bf[_0x5aec('0x17')][_0x5aec('0x19')]||null:null,'attributes':_0x2c32bf[_0x5aec('0x17')]?_0x2c32bf['options'][_0x5aec('0x1a')]||null:null,'limit':_0x2c32bf['options']?_0x2c32bf[_0x5aec('0x17')]['limit']||null:null,'include':_0x2c32bf[_0x5aec('0x17')]?_0x2c32bf[_0x5aec('0x17')][_0x5aec('0x1b')]?_[_0x5aec('0x1c')](_0x2c32bf['options']['include'],function(_0x3da833){return{'model':db[_0x3da833[_0x5aec('0x1d')]],'as':_0x3da833['as'],'attributes':_0x3da833[_0x5aec('0x1a')],'include':_0x3da833['include']?_['map'](_0x3da833[_0x5aec('0x1b')],function(_0x5c30c0){return{'model':db[_0x5c30c0[_0x5aec('0x1d')]],'as':_0x5c30c0['as'],'attributes':_0x5c30c0[_0x5aec('0x1a')],'include':_0x5c30c0[_0x5aec('0x1b')]?_['map'](_0x5c30c0[_0x5aec('0x1b')],function(_0x653572){return{'model':db[_0x653572[_0x5aec('0x1d')]],'as':_0x653572['as'],'attributes':_0x653572[_0x5aec('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x5aec('0xa')](function(_0x2fea8b){logger[_0x5aec('0xb')]('GetDeskAccount',_0x2c32bf);logger[_0x5aec('0xe')](_0x5aec('0x15'),_0x2c32bf,JSON['stringify'](_0x2fea8b));_0x4518c9(_0x2fea8b);})['catch'](function(_0x131428){logger[_0x5aec('0x12')]('GetDeskAccount',_0x131428['message'],_0x2c32bf);_0x20433a(_0x1f636a[_0x5aec('0x12')](0x1f4,_0x131428['message']));});});};exports['ShowDeskAccount']=function(_0x2c4b3e){var _0x37e76a=this;return new Promise(function(_0x64f7ed,_0xf74789){return db[_0x5aec('0x1e')][_0x5aec('0x1f')]({'raw':_0x2c4b3e[_0x5aec('0x17')]?_0x2c4b3e[_0x5aec('0x17')][_0x5aec('0x18')]===undefined?!![]:![]:!![],'where':_0x2c4b3e['options']?_0x2c4b3e['options'][_0x5aec('0x19')]||null:null,'attributes':_0x2c4b3e[_0x5aec('0x17')]?_0x2c4b3e[_0x5aec('0x17')][_0x5aec('0x1a')]||null:null,'include':_0x2c4b3e[_0x5aec('0x17')]?_0x2c4b3e[_0x5aec('0x17')][_0x5aec('0x1b')]?_['map'](_0x2c4b3e[_0x5aec('0x17')][_0x5aec('0x1b')],function(_0x55b876){return{'model':db[_0x55b876[_0x5aec('0x1d')]],'as':_0x55b876['as'],'attributes':_0x55b876[_0x5aec('0x1a')],'include':_0x55b876['include']?_[_0x5aec('0x1c')](_0x55b876[_0x5aec('0x1b')],function(_0x2a9162){return{'model':db[_0x2a9162[_0x5aec('0x1d')]],'as':_0x2a9162['as'],'attributes':_0x2a9162['attributes'],'include':_0x2a9162[_0x5aec('0x1b')]?_['map'](_0x2a9162[_0x5aec('0x1b')],function(_0x5353ef){return{'model':db[_0x5353ef[_0x5aec('0x1d')]],'as':_0x5353ef['as'],'attributes':_0x5353ef[_0x5aec('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x5aec('0xa')](function(_0x157f5a){logger[_0x5aec('0xb')](_0x5aec('0x20'),_0x2c4b3e);logger[_0x5aec('0xe')](_0x5aec('0x20'),_0x2c4b3e,JSON[_0x5aec('0x10')](_0x157f5a));_0x64f7ed(_0x157f5a);})['catch'](function(_0x47999c){logger[_0x5aec('0x12')](_0x5aec('0x20'),_0x47999c['message'],_0x2c4b3e);_0xf74789(_0x37e76a[_0x5aec('0x12')](0x1f4,_0x47999c[_0x5aec('0x13')]));});});};
\ No newline at end of file
+var _0x8237=['options','raw','where','attributes','limit','include','map','model','find','ShowDeskAccount','lodash','util','randomstring','ioredis','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','info','DeskAccount,\x20%s,\x20%s','request\x20sent','debug','DeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetDeskAccount','DeskAccount','findAll'];(function(_0x5d1871,_0x5d75d5){var _0x56a564=function(_0x1731e2){while(--_0x1731e2){_0x5d1871['push'](_0x5d1871['shift']());}};_0x56a564(++_0x5d75d5);}(_0x8237,0x96));var _0x7823=function(_0x2c6b21,_0x1980f2){_0x2c6b21=_0x2c6b21-0x0;var _0x30f92c=_0x8237[_0x2c6b21];return _0x30f92c;};'use strict';var _=require(_0x7823('0x0'));var util=require(_0x7823('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x7823('0x2'));var fs=require('fs');var Redis=require(_0x7823('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x7823('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0x7823('0x5'));var jayson=require(_0x7823('0x6'));var client=jayson[_0x7823('0x7')][_0x7823('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4e3841,_0x404dd8,_0x476ff5){return new BPromise(function(_0x1e5260,_0x52e175){return client[_0x7823('0x9')](_0x4e3841,_0x476ff5)[_0x7823('0xa')](function(_0x4eb36f){logger[_0x7823('0xb')](_0x7823('0xc'),_0x404dd8,_0x7823('0xd'));logger[_0x7823('0xe')](_0x7823('0xf'),_0x404dd8,_0x7823('0xd'),JSON[_0x7823('0x10')](_0x4eb36f));if(_0x4eb36f[_0x7823('0x11')]){if(_0x4eb36f[_0x7823('0x11')][_0x7823('0x12')]===0x1f4){logger[_0x7823('0x11')](_0x7823('0xc'),_0x404dd8,_0x4eb36f[_0x7823('0x11')][_0x7823('0x13')]);return _0x52e175(_0x4eb36f[_0x7823('0x11')][_0x7823('0x13')]);}logger[_0x7823('0x11')]('DeskAccount,\x20%s,\x20%s',_0x404dd8,_0x4eb36f[_0x7823('0x11')][_0x7823('0x13')]);return _0x1e5260(_0x4eb36f[_0x7823('0x11')][_0x7823('0x13')]);}else{logger[_0x7823('0xb')]('DeskAccount,\x20%s,\x20%s',_0x404dd8,'request\x20sent');_0x1e5260(_0x4eb36f[_0x7823('0x14')]['message']);}})[_0x7823('0x15')](function(_0x3ee68c){logger[_0x7823('0x11')](_0x7823('0xc'),_0x404dd8,_0x3ee68c);_0x52e175(_0x3ee68c);});});}exports[_0x7823('0x16')]=function(_0x543ba9){var _0x4c3d1d=this;return new Promise(function(_0xa852d2,_0x2bf71e){return db[_0x7823('0x17')][_0x7823('0x18')]({'raw':_0x543ba9[_0x7823('0x19')]?_0x543ba9['options'][_0x7823('0x1a')]===undefined?!![]:![]:!![],'where':_0x543ba9[_0x7823('0x19')]?_0x543ba9[_0x7823('0x19')][_0x7823('0x1b')]||null:null,'attributes':_0x543ba9[_0x7823('0x19')]?_0x543ba9[_0x7823('0x19')][_0x7823('0x1c')]||null:null,'limit':_0x543ba9[_0x7823('0x19')]?_0x543ba9[_0x7823('0x19')][_0x7823('0x1d')]||null:null,'include':_0x543ba9[_0x7823('0x19')]?_0x543ba9[_0x7823('0x19')][_0x7823('0x1e')]?_[_0x7823('0x1f')](_0x543ba9[_0x7823('0x19')][_0x7823('0x1e')],function(_0x29a3e0){return{'model':db[_0x29a3e0[_0x7823('0x20')]],'as':_0x29a3e0['as'],'attributes':_0x29a3e0[_0x7823('0x1c')],'include':_0x29a3e0[_0x7823('0x1e')]?_[_0x7823('0x1f')](_0x29a3e0[_0x7823('0x1e')],function(_0x509d1f){return{'model':db[_0x509d1f[_0x7823('0x20')]],'as':_0x509d1f['as'],'attributes':_0x509d1f['attributes'],'include':_0x509d1f[_0x7823('0x1e')]?_[_0x7823('0x1f')](_0x509d1f[_0x7823('0x1e')],function(_0x488e6b){return{'model':db[_0x488e6b[_0x7823('0x20')]],'as':_0x488e6b['as'],'attributes':_0x488e6b[_0x7823('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5a64b0){logger[_0x7823('0xb')]('GetDeskAccount',_0x543ba9);logger['debug'](_0x7823('0x16'),_0x543ba9,JSON['stringify'](_0x5a64b0));_0xa852d2(_0x5a64b0);})[_0x7823('0x15')](function(_0xec7742){logger[_0x7823('0x11')](_0x7823('0x16'),_0xec7742['message'],_0x543ba9);_0x2bf71e(_0x4c3d1d['error'](0x1f4,_0xec7742[_0x7823('0x13')]));});});};exports['ShowDeskAccount']=function(_0x559ff9){var _0x536785=this;return new Promise(function(_0x3c431b,_0x32569b){return db[_0x7823('0x17')][_0x7823('0x21')]({'raw':_0x559ff9[_0x7823('0x19')]?_0x559ff9['options'][_0x7823('0x1a')]===undefined?!![]:![]:!![],'where':_0x559ff9[_0x7823('0x19')]?_0x559ff9[_0x7823('0x19')][_0x7823('0x1b')]||null:null,'attributes':_0x559ff9[_0x7823('0x19')]?_0x559ff9[_0x7823('0x19')][_0x7823('0x1c')]||null:null,'include':_0x559ff9[_0x7823('0x19')]?_0x559ff9[_0x7823('0x19')][_0x7823('0x1e')]?_['map'](_0x559ff9[_0x7823('0x19')]['include'],function(_0x4cf235){return{'model':db[_0x4cf235[_0x7823('0x20')]],'as':_0x4cf235['as'],'attributes':_0x4cf235[_0x7823('0x1c')],'include':_0x4cf235[_0x7823('0x1e')]?_[_0x7823('0x1f')](_0x4cf235[_0x7823('0x1e')],function(_0x32d838){return{'model':db[_0x32d838['model']],'as':_0x32d838['as'],'attributes':_0x32d838[_0x7823('0x1c')],'include':_0x32d838[_0x7823('0x1e')]?_['map'](_0x32d838[_0x7823('0x1e')],function(_0x25255e){return{'model':db[_0x25255e[_0x7823('0x20')]],'as':_0x25255e['as'],'attributes':_0x25255e[_0x7823('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x7823('0xa')](function(_0x459458){logger[_0x7823('0xb')](_0x7823('0x22'),_0x559ff9);logger[_0x7823('0xe')](_0x7823('0x22'),_0x559ff9,JSON['stringify'](_0x459458));_0x3c431b(_0x459458);})['catch'](function(_0x20aeb4){logger[_0x7823('0x11')](_0x7823('0x22'),_0x20aeb4[_0x7823('0x13')],_0x559ff9);_0x32569b(_0x536785['error'](0x1f4,_0x20aeb4[_0x7823('0x13')]));});});};
\ No newline at end of file