Built motion from commit a61a4a20.|2.5.46
[motion2.git] / server / api / intDeskAccount / intDeskAccount.rpc.js
index 1e34168..c2ef668 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x16e0=['code','message','request\x20sent','catch','GetDeskAccount','DeskAccount','findAll','raw','where','options','attributes','limit','include','model','ShowDeskAccount','find','map','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','then','info','DeskAccount,\x20%s,\x20%s','debug','stringify','error'];(function(_0x220dbb,_0x99328d){var _0x2b77de=function(_0x15e966){while(--_0x15e966){_0x220dbb['push'](_0x220dbb['shift']());}};_0x2b77de(++_0x99328d);}(_0x16e0,0x91));var _0x016e=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x16e0[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x016e('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x016e('0x1'));var rs=require(_0x016e('0x2'));var fs=require('fs');var Redis=require(_0x016e('0x3'));var db=require(_0x016e('0x4'))['db'];var utils=require(_0x016e('0x5'));var logger=require(_0x016e('0x6'))('rpc');var config=require(_0x016e('0x7'));var jayson=require(_0x016e('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x1a01c4,_0x316075,_0x1075cf){return new BPromise(function(_0x5cff2c,_0x1ca911){return client['request'](_0x1a01c4,_0x1075cf)[_0x016e('0x9')](function(_0x500dd9){logger[_0x016e('0xa')](_0x016e('0xb'),_0x316075,'request\x20sent');logger[_0x016e('0xc')]('DeskAccount,\x20%s,\x20%s,\x20%s',_0x316075,'request\x20sent',JSON[_0x016e('0xd')](_0x500dd9));if(_0x500dd9['error']){if(_0x500dd9[_0x016e('0xe')][_0x016e('0xf')]===0x1f4){logger[_0x016e('0xe')](_0x016e('0xb'),_0x316075,_0x500dd9[_0x016e('0xe')]['message']);return _0x1ca911(_0x500dd9[_0x016e('0xe')]['message']);}logger['error'](_0x016e('0xb'),_0x316075,_0x500dd9[_0x016e('0xe')][_0x016e('0x10')]);return _0x5cff2c(_0x500dd9[_0x016e('0xe')][_0x016e('0x10')]);}else{logger[_0x016e('0xa')](_0x016e('0xb'),_0x316075,_0x016e('0x11'));_0x5cff2c(_0x500dd9['result'][_0x016e('0x10')]);}})[_0x016e('0x12')](function(_0x48157e){logger[_0x016e('0xe')]('DeskAccount,\x20%s,\x20%s',_0x316075,_0x48157e);_0x1ca911(_0x48157e);});});}exports[_0x016e('0x13')]=function(_0x414e2a){var _0x1ec35a=this;return new Promise(function(_0x353d39,_0x337afe){return db[_0x016e('0x14')][_0x016e('0x15')]({'raw':_0x414e2a['options']?_0x414e2a['options'][_0x016e('0x16')]===undefined?!![]:![]:!![],'where':_0x414e2a['options']?_0x414e2a['options'][_0x016e('0x17')]||null:null,'attributes':_0x414e2a[_0x016e('0x18')]?_0x414e2a[_0x016e('0x18')][_0x016e('0x19')]||null:null,'limit':_0x414e2a['options']?_0x414e2a[_0x016e('0x18')][_0x016e('0x1a')]||null:null,'include':_0x414e2a[_0x016e('0x18')]?_0x414e2a[_0x016e('0x18')]['include']?_['map'](_0x414e2a['options'][_0x016e('0x1b')],function(_0x21a05e){return{'model':db[_0x21a05e['model']],'as':_0x21a05e['as'],'attributes':_0x21a05e[_0x016e('0x19')],'include':_0x21a05e['include']?_['map'](_0x21a05e[_0x016e('0x1b')],function(_0x55d7eb){return{'model':db[_0x55d7eb[_0x016e('0x1c')]],'as':_0x55d7eb['as'],'attributes':_0x55d7eb['attributes'],'include':_0x55d7eb['include']?_['map'](_0x55d7eb[_0x016e('0x1b')],function(_0x4f44bb){return{'model':db[_0x4f44bb[_0x016e('0x1c')]],'as':_0x4f44bb['as'],'attributes':_0x4f44bb['attributes']};}):[]};}):[]};}):[]:[]})[_0x016e('0x9')](function(_0x2c6849){logger[_0x016e('0xa')](_0x016e('0x13'),_0x414e2a);logger[_0x016e('0xc')](_0x016e('0x13'),_0x414e2a,JSON['stringify'](_0x2c6849));_0x353d39(_0x2c6849);})[_0x016e('0x12')](function(_0x368f1c){logger[_0x016e('0xe')]('GetDeskAccount',_0x368f1c['message'],_0x414e2a);_0x337afe(_0x1ec35a[_0x016e('0xe')](0x1f4,_0x368f1c[_0x016e('0x10')]));});});};exports[_0x016e('0x1d')]=function(_0x5b149f){var _0x5a3497=this;return new Promise(function(_0x3ffe5b,_0x2dd3bb){return db['DeskAccount'][_0x016e('0x1e')]({'raw':_0x5b149f['options']?_0x5b149f[_0x016e('0x18')][_0x016e('0x16')]===undefined?!![]:![]:!![],'where':_0x5b149f[_0x016e('0x18')]?_0x5b149f['options'][_0x016e('0x17')]||null:null,'attributes':_0x5b149f['options']?_0x5b149f[_0x016e('0x18')][_0x016e('0x19')]||null:null,'include':_0x5b149f[_0x016e('0x18')]?_0x5b149f[_0x016e('0x18')][_0x016e('0x1b')]?_['map'](_0x5b149f['options'][_0x016e('0x1b')],function(_0x5a3bff){return{'model':db[_0x5a3bff[_0x016e('0x1c')]],'as':_0x5a3bff['as'],'attributes':_0x5a3bff['attributes'],'include':_0x5a3bff[_0x016e('0x1b')]?_[_0x016e('0x1f')](_0x5a3bff['include'],function(_0x1027c8){return{'model':db[_0x1027c8['model']],'as':_0x1027c8['as'],'attributes':_0x1027c8[_0x016e('0x19')],'include':_0x1027c8[_0x016e('0x1b')]?_[_0x016e('0x1f')](_0x1027c8[_0x016e('0x1b')],function(_0x581788){return{'model':db[_0x581788[_0x016e('0x1c')]],'as':_0x581788['as'],'attributes':_0x581788[_0x016e('0x19')]};}):[]};}):[]};}):[]:[]})[_0x016e('0x9')](function(_0x42583c){logger['info'](_0x016e('0x1d'),_0x5b149f);logger[_0x016e('0xc')](_0x016e('0x1d'),_0x5b149f,JSON[_0x016e('0xd')](_0x42583c));_0x3ffe5b(_0x42583c);})[_0x016e('0x12')](function(_0x4ee718){logger[_0x016e('0xe')]('ShowDeskAccount',_0x4ee718[_0x016e('0x10')],_0x5b149f);_0x2dd3bb(_0x5a3497[_0x016e('0xe')](0x1f4,_0x4ee718[_0x016e('0x10')]));});});};
\ No newline at end of file
+var _0x45e9=['catch','GetDeskAccount','findAll','options','raw','where','attributes','limit','include','map','model','ShowDeskAccount','DeskAccount','find','then','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','debug','request\x20sent','stringify','error','DeskAccount,\x20%s,\x20%s','message','info'];(function(_0x23dcc9,_0x1c0a19){var _0x30daa8=function(_0x3e3849){while(--_0x3e3849){_0x23dcc9['push'](_0x23dcc9['shift']());}};_0x30daa8(++_0x1c0a19);}(_0x45e9,0x15c));var _0x945e=function(_0x54c5c3,_0x1eeb94){_0x54c5c3=_0x54c5c3-0x0;var _0x54a60a=_0x45e9[_0x54c5c3];return _0x54a60a;};'use strict';var _=require(_0x945e('0x0'));var util=require(_0x945e('0x1'));var moment=require(_0x945e('0x2'));var BPromise=require(_0x945e('0x3'));var rs=require(_0x945e('0x4'));var fs=require('fs');var Redis=require(_0x945e('0x5'));var db=require(_0x945e('0x6'))['db'];var utils=require(_0x945e('0x7'));var logger=require(_0x945e('0x8'))(_0x945e('0x9'));var config=require(_0x945e('0xa'));var jayson=require(_0x945e('0xb'));var client=jayson[_0x945e('0xc')][_0x945e('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x45ea15,_0xe4623f,_0x572cb7){return new BPromise(function(_0x12dd37,_0x134583){return client[_0x945e('0xe')](_0x45ea15,_0x572cb7)['then'](function(_0x1a1818){logger['info']('DeskAccount,\x20%s,\x20%s',_0xe4623f,'request\x20sent');logger[_0x945e('0xf')]('DeskAccount,\x20%s,\x20%s,\x20%s',_0xe4623f,_0x945e('0x10'),JSON[_0x945e('0x11')](_0x1a1818));if(_0x1a1818['error']){if(_0x1a1818[_0x945e('0x12')]['code']===0x1f4){logger[_0x945e('0x12')](_0x945e('0x13'),_0xe4623f,_0x1a1818[_0x945e('0x12')]['message']);return _0x134583(_0x1a1818[_0x945e('0x12')][_0x945e('0x14')]);}logger[_0x945e('0x12')]('DeskAccount,\x20%s,\x20%s',_0xe4623f,_0x1a1818[_0x945e('0x12')][_0x945e('0x14')]);return _0x12dd37(_0x1a1818[_0x945e('0x12')][_0x945e('0x14')]);}else{logger[_0x945e('0x15')](_0x945e('0x13'),_0xe4623f,_0x945e('0x10'));_0x12dd37(_0x1a1818['result'][_0x945e('0x14')]);}})[_0x945e('0x16')](function(_0x2c7e0c){logger['error'](_0x945e('0x13'),_0xe4623f,_0x2c7e0c);_0x134583(_0x2c7e0c);});});}exports[_0x945e('0x17')]=function(_0x3b14c0){var _0x13a96f=this;return new Promise(function(_0x153a11,_0x2e8f69){return db['DeskAccount'][_0x945e('0x18')]({'raw':_0x3b14c0['options']?_0x3b14c0[_0x945e('0x19')][_0x945e('0x1a')]===undefined?!![]:![]:!![],'where':_0x3b14c0[_0x945e('0x19')]?_0x3b14c0['options'][_0x945e('0x1b')]||null:null,'attributes':_0x3b14c0[_0x945e('0x19')]?_0x3b14c0[_0x945e('0x19')][_0x945e('0x1c')]||null:null,'limit':_0x3b14c0[_0x945e('0x19')]?_0x3b14c0[_0x945e('0x19')][_0x945e('0x1d')]||null:null,'include':_0x3b14c0['options']?_0x3b14c0[_0x945e('0x19')][_0x945e('0x1e')]?_[_0x945e('0x1f')](_0x3b14c0[_0x945e('0x19')][_0x945e('0x1e')],function(_0x1acb5f){return{'model':db[_0x1acb5f[_0x945e('0x20')]],'as':_0x1acb5f['as'],'attributes':_0x1acb5f[_0x945e('0x1c')],'include':_0x1acb5f[_0x945e('0x1e')]?_[_0x945e('0x1f')](_0x1acb5f[_0x945e('0x1e')],function(_0x5a3db3){return{'model':db[_0x5a3db3[_0x945e('0x20')]],'as':_0x5a3db3['as'],'attributes':_0x5a3db3[_0x945e('0x1c')],'include':_0x5a3db3['include']?_['map'](_0x5a3db3[_0x945e('0x1e')],function(_0x4bcc89){return{'model':db[_0x4bcc89[_0x945e('0x20')]],'as':_0x4bcc89['as'],'attributes':_0x4bcc89[_0x945e('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x9b3ad4){logger[_0x945e('0x15')](_0x945e('0x17'),_0x3b14c0);logger[_0x945e('0xf')](_0x945e('0x17'),_0x3b14c0,JSON[_0x945e('0x11')](_0x9b3ad4));_0x153a11(_0x9b3ad4);})[_0x945e('0x16')](function(_0xd2fd40){logger[_0x945e('0x12')](_0x945e('0x17'),_0xd2fd40[_0x945e('0x14')],_0x3b14c0);_0x2e8f69(_0x13a96f[_0x945e('0x12')](0x1f4,_0xd2fd40[_0x945e('0x14')]));});});};exports[_0x945e('0x21')]=function(_0x19fa7d){var _0x4ddc64=this;return new Promise(function(_0x3e7883,_0x369cb4){return db[_0x945e('0x22')][_0x945e('0x23')]({'raw':_0x19fa7d[_0x945e('0x19')]?_0x19fa7d[_0x945e('0x19')][_0x945e('0x1a')]===undefined?!![]:![]:!![],'where':_0x19fa7d[_0x945e('0x19')]?_0x19fa7d[_0x945e('0x19')]['where']||null:null,'attributes':_0x19fa7d['options']?_0x19fa7d['options'][_0x945e('0x1c')]||null:null,'include':_0x19fa7d[_0x945e('0x19')]?_0x19fa7d['options'][_0x945e('0x1e')]?_[_0x945e('0x1f')](_0x19fa7d[_0x945e('0x19')]['include'],function(_0x2ae37f){return{'model':db[_0x2ae37f[_0x945e('0x20')]],'as':_0x2ae37f['as'],'attributes':_0x2ae37f[_0x945e('0x1c')],'include':_0x2ae37f[_0x945e('0x1e')]?_[_0x945e('0x1f')](_0x2ae37f[_0x945e('0x1e')],function(_0x4fcd21){return{'model':db[_0x4fcd21[_0x945e('0x20')]],'as':_0x4fcd21['as'],'attributes':_0x4fcd21[_0x945e('0x1c')],'include':_0x4fcd21['include']?_[_0x945e('0x1f')](_0x4fcd21[_0x945e('0x1e')],function(_0x254bc6){return{'model':db[_0x254bc6[_0x945e('0x20')]],'as':_0x254bc6['as'],'attributes':_0x254bc6[_0x945e('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x945e('0x24')](function(_0x587ac7){logger[_0x945e('0x15')](_0x945e('0x21'),_0x19fa7d);logger[_0x945e('0xf')](_0x945e('0x21'),_0x19fa7d,JSON[_0x945e('0x11')](_0x587ac7));_0x3e7883(_0x587ac7);})[_0x945e('0x16')](function(_0x595a8d){logger[_0x945e('0x12')](_0x945e('0x21'),_0x595a8d[_0x945e('0x14')],_0x19fa7d);_0x369cb4(_0x4ddc64[_0x945e('0x12')](0x1f4,_0x595a8d[_0x945e('0x14')]));});});};
\ No newline at end of file