Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / intDeskAccount / intDeskAccount.rpc.js
index 9379b4c..ec4dfd5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfa5b=['../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','DeskAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','GetDeskAccount','DeskAccount','findAll','options','raw','where','attributes','model','include','find','map','ShowDeskAccount','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x1a5d7e,_0x2f81be){var _0x15112c=function(_0xfcc781){while(--_0xfcc781){_0x1a5d7e['push'](_0x1a5d7e['shift']());}};_0x15112c(++_0x2f81be);}(_0xfa5b,0xcc));var _0xbfa5=function(_0x117f4c,_0x36a9b1){_0x117f4c=_0x117f4c-0x0;var _0x2b24e9=_0xfa5b[_0x117f4c];return _0x2b24e9;};'use strict';var _=require(_0xbfa5('0x0'));var util=require('util');var moment=require(_0xbfa5('0x1'));var BPromise=require(_0xbfa5('0x2'));var rs=require(_0xbfa5('0x3'));var fs=require('fs');var Redis=require(_0xbfa5('0x4'));var db=require(_0xbfa5('0x5'))['db'];var utils=require(_0xbfa5('0x6'));var logger=require(_0xbfa5('0x7'))(_0xbfa5('0x8'));var config=require(_0xbfa5('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xbfa5('0xa')][_0xbfa5('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x122fc4,_0x555469,_0x24a74c){return new BPromise(function(_0x332d92,_0x83ff80){return client[_0xbfa5('0xc')](_0x122fc4,_0x24a74c)[_0xbfa5('0xd')](function(_0x248874){logger[_0xbfa5('0xe')](_0xbfa5('0xf'),_0x555469,_0xbfa5('0x10'));logger[_0xbfa5('0x11')]('DeskAccount,\x20%s,\x20%s,\x20%s',_0x555469,_0xbfa5('0x10'),JSON[_0xbfa5('0x12')](_0x248874));if(_0x248874[_0xbfa5('0x13')]){if(_0x248874[_0xbfa5('0x13')]['code']===0x1f4){logger[_0xbfa5('0x13')](_0xbfa5('0xf'),_0x555469,_0x248874['error'][_0xbfa5('0x14')]);return _0x83ff80(_0x248874['error']['message']);}logger[_0xbfa5('0x13')](_0xbfa5('0xf'),_0x555469,_0x248874[_0xbfa5('0x13')][_0xbfa5('0x14')]);return _0x332d92(_0x248874['error'][_0xbfa5('0x14')]);}else{logger['info'](_0xbfa5('0xf'),_0x555469,_0xbfa5('0x10'));_0x332d92(_0x248874[_0xbfa5('0x15')][_0xbfa5('0x14')]);}})[_0xbfa5('0x16')](function(_0x41207d){logger['error'](_0xbfa5('0xf'),_0x555469,_0x41207d);_0x83ff80(_0x41207d);});});}exports[_0xbfa5('0x17')]=function(_0x4fe8db){var _0x3e901b=this;return new Promise(function(_0xbc3398,_0x1f0166){return db[_0xbfa5('0x18')][_0xbfa5('0x19')]({'raw':_0x4fe8db['options']?_0x4fe8db[_0xbfa5('0x1a')][_0xbfa5('0x1b')]===undefined?!![]:![]:!![],'where':_0x4fe8db[_0xbfa5('0x1a')]?_0x4fe8db[_0xbfa5('0x1a')][_0xbfa5('0x1c')]||null:null,'attributes':_0x4fe8db[_0xbfa5('0x1a')]?_0x4fe8db[_0xbfa5('0x1a')][_0xbfa5('0x1d')]||null:null,'limit':_0x4fe8db['options']?_0x4fe8db[_0xbfa5('0x1a')]['limit']||null:null,'include':_0x4fe8db[_0xbfa5('0x1a')]?_0x4fe8db[_0xbfa5('0x1a')]['include']?_['map'](_0x4fe8db[_0xbfa5('0x1a')]['include'],function(_0x27461b){return{'model':db[_0x27461b[_0xbfa5('0x1e')]],'as':_0x27461b['as'],'attributes':_0x27461b[_0xbfa5('0x1d')],'include':_0x27461b['include']?_['map'](_0x27461b[_0xbfa5('0x1f')],function(_0x5383b4){return{'model':db[_0x5383b4[_0xbfa5('0x1e')]],'as':_0x5383b4['as'],'attributes':_0x5383b4[_0xbfa5('0x1d')],'include':_0x5383b4[_0xbfa5('0x1f')]?_['map'](_0x5383b4[_0xbfa5('0x1f')],function(_0x4b444c){return{'model':db[_0x4b444c['model']],'as':_0x4b444c['as'],'attributes':_0x4b444c[_0xbfa5('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xbfa5('0xd')](function(_0x567379){logger['info'](_0xbfa5('0x17'),_0x4fe8db);logger[_0xbfa5('0x11')](_0xbfa5('0x17'),_0x4fe8db,JSON[_0xbfa5('0x12')](_0x567379));_0xbc3398(_0x567379);})[_0xbfa5('0x16')](function(_0x29ae43){logger['error']('GetDeskAccount',_0x29ae43[_0xbfa5('0x14')],_0x4fe8db);_0x1f0166(_0x3e901b[_0xbfa5('0x13')](0x1f4,_0x29ae43[_0xbfa5('0x14')]));});});};exports['ShowDeskAccount']=function(_0x839297){var _0xf1a01d=this;return new Promise(function(_0x9aba52,_0x334701){return db[_0xbfa5('0x18')][_0xbfa5('0x20')]({'raw':_0x839297[_0xbfa5('0x1a')]?_0x839297[_0xbfa5('0x1a')][_0xbfa5('0x1b')]===undefined?!![]:![]:!![],'where':_0x839297['options']?_0x839297['options'][_0xbfa5('0x1c')]||null:null,'attributes':_0x839297[_0xbfa5('0x1a')]?_0x839297[_0xbfa5('0x1a')][_0xbfa5('0x1d')]||null:null,'include':_0x839297[_0xbfa5('0x1a')]?_0x839297[_0xbfa5('0x1a')][_0xbfa5('0x1f')]?_[_0xbfa5('0x21')](_0x839297[_0xbfa5('0x1a')][_0xbfa5('0x1f')],function(_0x27724f){return{'model':db[_0x27724f[_0xbfa5('0x1e')]],'as':_0x27724f['as'],'attributes':_0x27724f[_0xbfa5('0x1d')],'include':_0x27724f[_0xbfa5('0x1f')]?_[_0xbfa5('0x21')](_0x27724f[_0xbfa5('0x1f')],function(_0x466c2c){return{'model':db[_0x466c2c[_0xbfa5('0x1e')]],'as':_0x466c2c['as'],'attributes':_0x466c2c[_0xbfa5('0x1d')],'include':_0x466c2c[_0xbfa5('0x1f')]?_[_0xbfa5('0x21')](_0x466c2c['include'],function(_0x3b1370){return{'model':db[_0x3b1370[_0xbfa5('0x1e')]],'as':_0x3b1370['as'],'attributes':_0x3b1370[_0xbfa5('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x54968a){logger[_0xbfa5('0xe')](_0xbfa5('0x22'),_0x839297);logger['debug'](_0xbfa5('0x22'),_0x839297,JSON[_0xbfa5('0x12')](_0x54968a));_0x9aba52(_0x54968a);})[_0xbfa5('0x16')](function(_0x55aa01){logger[_0xbfa5('0x13')]('ShowDeskAccount',_0x55aa01[_0xbfa5('0x14')],_0x839297);_0x334701(_0xf1a01d[_0xbfa5('0x13')](0x1f4,_0x55aa01[_0xbfa5('0x14')]));});});};
\ No newline at end of file
+var _0x2082=['lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','http','then','info','DeskAccount,\x20%s,\x20%s','request\x20sent','debug','DeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','GetDeskAccount','DeskAccount','findAll','options','raw','limit','include','model','attributes','map','where','ShowDeskAccount'];(function(_0x58ddff,_0x227041){var _0x2827ef=function(_0x55fb38){while(--_0x55fb38){_0x58ddff['push'](_0x58ddff['shift']());}};_0x2827ef(++_0x227041);}(_0x2082,0xe0));var _0x2208=function(_0x34ad72,_0x1e43f6){_0x34ad72=_0x34ad72-0x0;var _0x5c9aa8=_0x2082[_0x34ad72];return _0x5c9aa8;};'use strict';var _=require(_0x2208('0x0'));var util=require(_0x2208('0x1'));var moment=require(_0x2208('0x2'));var BPromise=require(_0x2208('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2208('0x4'))['db'];var utils=require(_0x2208('0x5'));var logger=require(_0x2208('0x6'))(_0x2208('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x2208('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4a472f,_0x52b0cd,_0x3df94e){return new BPromise(function(_0x4f7666,_0xe165ca){return client['request'](_0x4a472f,_0x3df94e)[_0x2208('0x9')](function(_0x15f853){logger[_0x2208('0xa')](_0x2208('0xb'),_0x52b0cd,_0x2208('0xc'));logger[_0x2208('0xd')](_0x2208('0xe'),_0x52b0cd,_0x2208('0xc'),JSON[_0x2208('0xf')](_0x15f853));if(_0x15f853[_0x2208('0x10')]){if(_0x15f853[_0x2208('0x10')]['code']===0x1f4){logger[_0x2208('0x10')]('DeskAccount,\x20%s,\x20%s',_0x52b0cd,_0x15f853['error'][_0x2208('0x11')]);return _0xe165ca(_0x15f853['error']['message']);}logger['error'](_0x2208('0xb'),_0x52b0cd,_0x15f853[_0x2208('0x10')][_0x2208('0x11')]);return _0x4f7666(_0x15f853[_0x2208('0x10')]['message']);}else{logger['info'](_0x2208('0xb'),_0x52b0cd,_0x2208('0xc'));_0x4f7666(_0x15f853[_0x2208('0x12')]['message']);}})[_0x2208('0x13')](function(_0x16d6bb){logger[_0x2208('0x10')](_0x2208('0xb'),_0x52b0cd,_0x16d6bb);_0xe165ca(_0x16d6bb);});});}exports[_0x2208('0x14')]=function(_0x187a07){var _0x50448e=this;return new Promise(function(_0x3a3e3f,_0x397c54){return db[_0x2208('0x15')][_0x2208('0x16')]({'raw':_0x187a07[_0x2208('0x17')]?_0x187a07[_0x2208('0x17')][_0x2208('0x18')]===undefined?!![]:![]:!![],'where':_0x187a07[_0x2208('0x17')]?_0x187a07[_0x2208('0x17')]['where']||null:null,'attributes':_0x187a07[_0x2208('0x17')]?_0x187a07[_0x2208('0x17')]['attributes']||null:null,'limit':_0x187a07['options']?_0x187a07['options'][_0x2208('0x19')]||null:null,'include':_0x187a07[_0x2208('0x17')]?_0x187a07[_0x2208('0x17')][_0x2208('0x1a')]?_['map'](_0x187a07['options'][_0x2208('0x1a')],function(_0x1947e5){return{'model':db[_0x1947e5[_0x2208('0x1b')]],'as':_0x1947e5['as'],'attributes':_0x1947e5[_0x2208('0x1c')],'include':_0x1947e5[_0x2208('0x1a')]?_[_0x2208('0x1d')](_0x1947e5['include'],function(_0x5e3309){return{'model':db[_0x5e3309[_0x2208('0x1b')]],'as':_0x5e3309['as'],'attributes':_0x5e3309[_0x2208('0x1c')],'include':_0x5e3309[_0x2208('0x1a')]?_[_0x2208('0x1d')](_0x5e3309[_0x2208('0x1a')],function(_0x2cca9c){return{'model':db[_0x2cca9c[_0x2208('0x1b')]],'as':_0x2cca9c['as'],'attributes':_0x2cca9c[_0x2208('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x2208('0x9')](function(_0x1907e3){logger[_0x2208('0xa')]('GetDeskAccount',_0x187a07);logger[_0x2208('0xd')]('GetDeskAccount',_0x187a07,JSON['stringify'](_0x1907e3));_0x3a3e3f(_0x1907e3);})[_0x2208('0x13')](function(_0x5ccbda){logger[_0x2208('0x10')](_0x2208('0x14'),_0x5ccbda[_0x2208('0x11')],_0x187a07);_0x397c54(_0x50448e[_0x2208('0x10')](0x1f4,_0x5ccbda['message']));});});};exports['ShowDeskAccount']=function(_0x183069){var _0x24586d=this;return new Promise(function(_0x444c43,_0x51cbb8){return db[_0x2208('0x15')]['find']({'raw':_0x183069[_0x2208('0x17')]?_0x183069['options']['raw']===undefined?!![]:![]:!![],'where':_0x183069[_0x2208('0x17')]?_0x183069[_0x2208('0x17')][_0x2208('0x1e')]||null:null,'attributes':_0x183069[_0x2208('0x17')]?_0x183069[_0x2208('0x17')][_0x2208('0x1c')]||null:null,'include':_0x183069['options']?_0x183069[_0x2208('0x17')]['include']?_['map'](_0x183069[_0x2208('0x17')][_0x2208('0x1a')],function(_0x5b9e2e){return{'model':db[_0x5b9e2e[_0x2208('0x1b')]],'as':_0x5b9e2e['as'],'attributes':_0x5b9e2e[_0x2208('0x1c')],'include':_0x5b9e2e[_0x2208('0x1a')]?_[_0x2208('0x1d')](_0x5b9e2e[_0x2208('0x1a')],function(_0x353129){return{'model':db[_0x353129[_0x2208('0x1b')]],'as':_0x353129['as'],'attributes':_0x353129[_0x2208('0x1c')],'include':_0x353129[_0x2208('0x1a')]?_['map'](_0x353129[_0x2208('0x1a')],function(_0x70dfc8){return{'model':db[_0x70dfc8[_0x2208('0x1b')]],'as':_0x70dfc8['as'],'attributes':_0x70dfc8[_0x2208('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x2208('0x9')](function(_0x3e2fde){logger[_0x2208('0xa')](_0x2208('0x1f'),_0x183069);logger[_0x2208('0xd')](_0x2208('0x1f'),_0x183069,JSON[_0x2208('0xf')](_0x3e2fde));_0x444c43(_0x3e2fde);})[_0x2208('0x13')](function(_0x120442){logger[_0x2208('0x10')]('ShowDeskAccount',_0x120442[_0x2208('0x11')],_0x183069);_0x51cbb8(_0x24586d[_0x2208('0x10')](0x1f4,_0x120442[_0x2208('0x11')]));});});};
\ No newline at end of file