Built motion from commit 746c7d2a.|2.5.35
[motion2.git] / server / api / intDeskAccount / intDeskAccount.rpc.js
index 7811809..293aac0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6395=['find','raw','ShowDeskAccount','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','DeskAccount,\x20%s,\x20%s','debug','DeskAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','DeskAccount','findAll','options','where','limit','include','map','model','attributes','GetDeskAccount','catch'];(function(_0x1b7bd3,_0x273774){var _0x340a98=function(_0x35967f){while(--_0x35967f){_0x1b7bd3['push'](_0x1b7bd3['shift']());}};_0x340a98(++_0x273774);}(_0x6395,0x123));var _0x5639=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x6395[_0x17d9e3];return _0x14192d;};'use strict';var _=require(_0x5639('0x0'));var util=require('util');var moment=require(_0x5639('0x1'));var BPromise=require(_0x5639('0x2'));var rs=require(_0x5639('0x3'));var fs=require('fs');var Redis=require(_0x5639('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x5639('0x5'));var logger=require(_0x5639('0x6'))(_0x5639('0x7'));var config=require(_0x5639('0x8'));var jayson=require(_0x5639('0x9'));var client=jayson[_0x5639('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x31a53e,_0x1f7678,_0x145df8){return new BPromise(function(_0x3ad988,_0x5c6264){return client[_0x5639('0xb')](_0x31a53e,_0x145df8)[_0x5639('0xc')](function(_0x443ac7){logger[_0x5639('0xd')](_0x5639('0xe'),_0x1f7678,'request\x20sent');logger[_0x5639('0xf')](_0x5639('0x10'),_0x1f7678,_0x5639('0x11'),JSON[_0x5639('0x12')](_0x443ac7));if(_0x443ac7[_0x5639('0x13')]){if(_0x443ac7[_0x5639('0x13')]['code']===0x1f4){logger['error'](_0x5639('0xe'),_0x1f7678,_0x443ac7['error'][_0x5639('0x14')]);return _0x5c6264(_0x443ac7[_0x5639('0x13')][_0x5639('0x14')]);}logger[_0x5639('0x13')](_0x5639('0xe'),_0x1f7678,_0x443ac7[_0x5639('0x13')][_0x5639('0x14')]);return _0x3ad988(_0x443ac7[_0x5639('0x13')]['message']);}else{logger[_0x5639('0xd')](_0x5639('0xe'),_0x1f7678,'request\x20sent');_0x3ad988(_0x443ac7[_0x5639('0x15')]['message']);}})['catch'](function(_0x5bac6a){logger[_0x5639('0x13')](_0x5639('0xe'),_0x1f7678,_0x5bac6a);_0x5c6264(_0x5bac6a);});});}exports['GetDeskAccount']=function(_0x19a456){var _0x42f291=this;return new Promise(function(_0x408e74,_0x113dbd){return db[_0x5639('0x16')][_0x5639('0x17')]({'raw':_0x19a456[_0x5639('0x18')]?_0x19a456['options']['raw']===undefined?!![]:![]:!![],'where':_0x19a456[_0x5639('0x18')]?_0x19a456[_0x5639('0x18')][_0x5639('0x19')]||null:null,'attributes':_0x19a456[_0x5639('0x18')]?_0x19a456[_0x5639('0x18')]['attributes']||null:null,'limit':_0x19a456[_0x5639('0x18')]?_0x19a456[_0x5639('0x18')][_0x5639('0x1a')]||null:null,'include':_0x19a456[_0x5639('0x18')]?_0x19a456[_0x5639('0x18')][_0x5639('0x1b')]?_[_0x5639('0x1c')](_0x19a456[_0x5639('0x18')][_0x5639('0x1b')],function(_0x3f9c11){return{'model':db[_0x3f9c11[_0x5639('0x1d')]],'as':_0x3f9c11['as'],'attributes':_0x3f9c11[_0x5639('0x1e')],'include':_0x3f9c11['include']?_[_0x5639('0x1c')](_0x3f9c11[_0x5639('0x1b')],function(_0xc2bc5e){return{'model':db[_0xc2bc5e[_0x5639('0x1d')]],'as':_0xc2bc5e['as'],'attributes':_0xc2bc5e[_0x5639('0x1e')],'include':_0xc2bc5e[_0x5639('0x1b')]?_['map'](_0xc2bc5e[_0x5639('0x1b')],function(_0x81203b){return{'model':db[_0x81203b[_0x5639('0x1d')]],'as':_0x81203b['as'],'attributes':_0x81203b[_0x5639('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x5639('0xc')](function(_0x19778d){logger[_0x5639('0xd')](_0x5639('0x1f'),_0x19a456);logger[_0x5639('0xf')](_0x5639('0x1f'),_0x19a456,JSON[_0x5639('0x12')](_0x19778d));_0x408e74(_0x19778d);})[_0x5639('0x20')](function(_0x24cf50){logger[_0x5639('0x13')](_0x5639('0x1f'),_0x24cf50[_0x5639('0x14')],_0x19a456);_0x113dbd(_0x42f291[_0x5639('0x13')](0x1f4,_0x24cf50[_0x5639('0x14')]));});});};exports['ShowDeskAccount']=function(_0x65a18d){var _0x26547b=this;return new Promise(function(_0x748f11,_0x7db082){return db[_0x5639('0x16')][_0x5639('0x21')]({'raw':_0x65a18d[_0x5639('0x18')]?_0x65a18d[_0x5639('0x18')][_0x5639('0x22')]===undefined?!![]:![]:!![],'where':_0x65a18d[_0x5639('0x18')]?_0x65a18d[_0x5639('0x18')][_0x5639('0x19')]||null:null,'attributes':_0x65a18d[_0x5639('0x18')]?_0x65a18d['options'][_0x5639('0x1e')]||null:null,'include':_0x65a18d[_0x5639('0x18')]?_0x65a18d['options'][_0x5639('0x1b')]?_[_0x5639('0x1c')](_0x65a18d[_0x5639('0x18')][_0x5639('0x1b')],function(_0x8be994){return{'model':db[_0x8be994[_0x5639('0x1d')]],'as':_0x8be994['as'],'attributes':_0x8be994[_0x5639('0x1e')],'include':_0x8be994['include']?_[_0x5639('0x1c')](_0x8be994[_0x5639('0x1b')],function(_0x451af9){return{'model':db[_0x451af9[_0x5639('0x1d')]],'as':_0x451af9['as'],'attributes':_0x451af9[_0x5639('0x1e')],'include':_0x451af9['include']?_[_0x5639('0x1c')](_0x451af9[_0x5639('0x1b')],function(_0x115b55){return{'model':db[_0x115b55[_0x5639('0x1d')]],'as':_0x115b55['as'],'attributes':_0x115b55[_0x5639('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x5639('0xc')](function(_0x260853){logger[_0x5639('0xd')](_0x5639('0x23'),_0x65a18d);logger['debug'](_0x5639('0x23'),_0x65a18d,JSON[_0x5639('0x12')](_0x260853));_0x748f11(_0x260853);})['catch'](function(_0x46cffa){logger[_0x5639('0x13')]('ShowDeskAccount',_0x46cffa['message'],_0x65a18d);_0x7db082(_0x26547b[_0x5639('0x13')](0x1f4,_0x46cffa[_0x5639('0x14')]));});});};
\ No newline at end of file
+var _0xfbf7=['where','limit','map','include','model','attributes','GetDeskAccount','ShowDeskAccount','find','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../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','DeskAccount','findAll','options','raw'];(function(_0x1734e9,_0x14bfe2){var _0x22e31f=function(_0x3e7c1a){while(--_0x3e7c1a){_0x1734e9['push'](_0x1734e9['shift']());}};_0x22e31f(++_0x14bfe2);}(_0xfbf7,0xf3));var _0x7fbf=function(_0x38eec6,_0x5a7765){_0x38eec6=_0x38eec6-0x0;var _0x558819=_0xfbf7[_0x38eec6];return _0x558819;};'use strict';var _=require(_0x7fbf('0x0'));var util=require(_0x7fbf('0x1'));var moment=require(_0x7fbf('0x2'));var BPromise=require(_0x7fbf('0x3'));var rs=require(_0x7fbf('0x4'));var fs=require('fs');var Redis=require(_0x7fbf('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x7fbf('0x6'));var logger=require(_0x7fbf('0x7'))(_0x7fbf('0x8'));var config=require(_0x7fbf('0x9'));var jayson=require(_0x7fbf('0xa'));var client=jayson[_0x7fbf('0xb')][_0x7fbf('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x3025c2,_0x520309,_0x18d71c){return new BPromise(function(_0x5991b5,_0x286e01){return client[_0x7fbf('0xd')](_0x3025c2,_0x18d71c)[_0x7fbf('0xe')](function(_0x1fced3){logger[_0x7fbf('0xf')](_0x7fbf('0x10'),_0x520309,_0x7fbf('0x11'));logger[_0x7fbf('0x12')](_0x7fbf('0x13'),_0x520309,_0x7fbf('0x11'),JSON[_0x7fbf('0x14')](_0x1fced3));if(_0x1fced3[_0x7fbf('0x15')]){if(_0x1fced3[_0x7fbf('0x15')][_0x7fbf('0x16')]===0x1f4){logger[_0x7fbf('0x15')](_0x7fbf('0x10'),_0x520309,_0x1fced3[_0x7fbf('0x15')][_0x7fbf('0x17')]);return _0x286e01(_0x1fced3[_0x7fbf('0x15')][_0x7fbf('0x17')]);}logger['error'](_0x7fbf('0x10'),_0x520309,_0x1fced3[_0x7fbf('0x15')][_0x7fbf('0x17')]);return _0x5991b5(_0x1fced3[_0x7fbf('0x15')][_0x7fbf('0x17')]);}else{logger['info'](_0x7fbf('0x10'),_0x520309,_0x7fbf('0x11'));_0x5991b5(_0x1fced3[_0x7fbf('0x18')]['message']);}})[_0x7fbf('0x19')](function(_0x4ffa7e){logger[_0x7fbf('0x15')](_0x7fbf('0x10'),_0x520309,_0x4ffa7e);_0x286e01(_0x4ffa7e);});});}exports['GetDeskAccount']=function(_0x3a678b){var _0x2f5ac9=this;return new Promise(function(_0x22cdc0,_0x58cf13){return db[_0x7fbf('0x1a')][_0x7fbf('0x1b')]({'raw':_0x3a678b[_0x7fbf('0x1c')]?_0x3a678b['options'][_0x7fbf('0x1d')]===undefined?!![]:![]:!![],'where':_0x3a678b[_0x7fbf('0x1c')]?_0x3a678b[_0x7fbf('0x1c')][_0x7fbf('0x1e')]||null:null,'attributes':_0x3a678b[_0x7fbf('0x1c')]?_0x3a678b['options']['attributes']||null:null,'limit':_0x3a678b[_0x7fbf('0x1c')]?_0x3a678b[_0x7fbf('0x1c')][_0x7fbf('0x1f')]||null:null,'include':_0x3a678b[_0x7fbf('0x1c')]?_0x3a678b[_0x7fbf('0x1c')]['include']?_[_0x7fbf('0x20')](_0x3a678b['options'][_0x7fbf('0x21')],function(_0x37c7cc){return{'model':db[_0x37c7cc[_0x7fbf('0x22')]],'as':_0x37c7cc['as'],'attributes':_0x37c7cc[_0x7fbf('0x23')],'include':_0x37c7cc[_0x7fbf('0x21')]?_[_0x7fbf('0x20')](_0x37c7cc[_0x7fbf('0x21')],function(_0x10b18f){return{'model':db[_0x10b18f[_0x7fbf('0x22')]],'as':_0x10b18f['as'],'attributes':_0x10b18f[_0x7fbf('0x23')],'include':_0x10b18f[_0x7fbf('0x21')]?_[_0x7fbf('0x20')](_0x10b18f[_0x7fbf('0x21')],function(_0x5d62b9){return{'model':db[_0x5d62b9[_0x7fbf('0x22')]],'as':_0x5d62b9['as'],'attributes':_0x5d62b9['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x4bc501){logger[_0x7fbf('0xf')]('GetDeskAccount',_0x3a678b);logger[_0x7fbf('0x12')]('GetDeskAccount',_0x3a678b,JSON[_0x7fbf('0x14')](_0x4bc501));_0x22cdc0(_0x4bc501);})['catch'](function(_0x2235e1){logger[_0x7fbf('0x15')](_0x7fbf('0x24'),_0x2235e1['message'],_0x3a678b);_0x58cf13(_0x2f5ac9[_0x7fbf('0x15')](0x1f4,_0x2235e1[_0x7fbf('0x17')]));});});};exports[_0x7fbf('0x25')]=function(_0x503d87){var _0x589975=this;return new Promise(function(_0x475732,_0x831225){return db[_0x7fbf('0x1a')][_0x7fbf('0x26')]({'raw':_0x503d87[_0x7fbf('0x1c')]?_0x503d87[_0x7fbf('0x1c')][_0x7fbf('0x1d')]===undefined?!![]:![]:!![],'where':_0x503d87[_0x7fbf('0x1c')]?_0x503d87[_0x7fbf('0x1c')][_0x7fbf('0x1e')]||null:null,'attributes':_0x503d87[_0x7fbf('0x1c')]?_0x503d87[_0x7fbf('0x1c')][_0x7fbf('0x23')]||null:null,'include':_0x503d87[_0x7fbf('0x1c')]?_0x503d87['options']['include']?_[_0x7fbf('0x20')](_0x503d87[_0x7fbf('0x1c')][_0x7fbf('0x21')],function(_0x21637b){return{'model':db[_0x21637b[_0x7fbf('0x22')]],'as':_0x21637b['as'],'attributes':_0x21637b[_0x7fbf('0x23')],'include':_0x21637b[_0x7fbf('0x21')]?_[_0x7fbf('0x20')](_0x21637b['include'],function(_0x55ba75){return{'model':db[_0x55ba75[_0x7fbf('0x22')]],'as':_0x55ba75['as'],'attributes':_0x55ba75[_0x7fbf('0x23')],'include':_0x55ba75[_0x7fbf('0x21')]?_[_0x7fbf('0x20')](_0x55ba75[_0x7fbf('0x21')],function(_0x205833){return{'model':db[_0x205833[_0x7fbf('0x22')]],'as':_0x205833['as'],'attributes':_0x205833[_0x7fbf('0x23')]};}):[]};}):[]};}):[]:[]})[_0x7fbf('0xe')](function(_0x3ac939){logger['info'](_0x7fbf('0x25'),_0x503d87);logger[_0x7fbf('0x12')](_0x7fbf('0x25'),_0x503d87,JSON[_0x7fbf('0x14')](_0x3ac939));_0x475732(_0x3ac939);})[_0x7fbf('0x19')](function(_0x416bb0){logger[_0x7fbf('0x15')](_0x7fbf('0x25'),_0x416bb0[_0x7fbf('0x17')],_0x503d87);_0x831225(_0x589975[_0x7fbf('0x15')](0x1f4,_0x416bb0[_0x7fbf('0x17')]));});});};
\ No newline at end of file