Built motion from commit 96f8de6d.|2.6.3
[motion2.git] / server / api / intDeskAccount / intDeskAccount.rpc.js
index bfa6415..e7f6f80 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x644a=['then','info','request\x20sent','debug','DeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','DeskAccount,\x20%s,\x20%s','message','result','catch','GetDeskAccount','DeskAccount','findAll','options','raw','attributes','limit','map','model','include','ShowDeskAccount','find','where','lodash','util','bluebird','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x110c3d,_0x12ee06){var _0x226d67=function(_0x1fb6e1){while(--_0x1fb6e1){_0x110c3d['push'](_0x110c3d['shift']());}};_0x226d67(++_0x12ee06);}(_0x644a,0x181));var _0xa644=function(_0x1bed81,_0x4b326a){_0x1bed81=_0x1bed81-0x0;var _0x2ac7ac=_0x644a[_0x1bed81];return _0x2ac7ac;};'use strict';var _=require(_0xa644('0x0'));var util=require(_0xa644('0x1'));var moment=require('moment');var BPromise=require(_0xa644('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa644('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xa644('0x4'));var logger=require('../../config/logger')(_0xa644('0x5'));var config=require(_0xa644('0x6'));var jayson=require(_0xa644('0x7'));var client=jayson[_0xa644('0x8')][_0xa644('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1e8739,_0x337d42,_0x12a333){return new BPromise(function(_0x4927d9,_0x53fcda){return client[_0xa644('0xa')](_0x1e8739,_0x12a333)[_0xa644('0xb')](function(_0x34713f){logger[_0xa644('0xc')]('DeskAccount,\x20%s,\x20%s',_0x337d42,_0xa644('0xd'));logger[_0xa644('0xe')](_0xa644('0xf'),_0x337d42,_0xa644('0xd'),JSON[_0xa644('0x10')](_0x34713f));if(_0x34713f[_0xa644('0x11')]){if(_0x34713f[_0xa644('0x11')][_0xa644('0x12')]===0x1f4){logger[_0xa644('0x11')](_0xa644('0x13'),_0x337d42,_0x34713f['error'][_0xa644('0x14')]);return _0x53fcda(_0x34713f[_0xa644('0x11')][_0xa644('0x14')]);}logger[_0xa644('0x11')]('DeskAccount,\x20%s,\x20%s',_0x337d42,_0x34713f[_0xa644('0x11')]['message']);return _0x4927d9(_0x34713f[_0xa644('0x11')][_0xa644('0x14')]);}else{logger['info']('DeskAccount,\x20%s,\x20%s',_0x337d42,'request\x20sent');_0x4927d9(_0x34713f[_0xa644('0x15')]['message']);}})[_0xa644('0x16')](function(_0x171b5c){logger[_0xa644('0x11')]('DeskAccount,\x20%s,\x20%s',_0x337d42,_0x171b5c);_0x53fcda(_0x171b5c);});});}exports[_0xa644('0x17')]=function(_0x2b0fb9){var _0x39d5b9=this;return new Promise(function(_0xabc778,_0x1da70b){return db[_0xa644('0x18')][_0xa644('0x19')]({'raw':_0x2b0fb9[_0xa644('0x1a')]?_0x2b0fb9[_0xa644('0x1a')][_0xa644('0x1b')]===undefined?!![]:![]:!![],'where':_0x2b0fb9[_0xa644('0x1a')]?_0x2b0fb9['options']['where']||null:null,'attributes':_0x2b0fb9[_0xa644('0x1a')]?_0x2b0fb9[_0xa644('0x1a')][_0xa644('0x1c')]||null:null,'limit':_0x2b0fb9[_0xa644('0x1a')]?_0x2b0fb9[_0xa644('0x1a')][_0xa644('0x1d')]||null:null,'include':_0x2b0fb9[_0xa644('0x1a')]?_0x2b0fb9[_0xa644('0x1a')]['include']?_[_0xa644('0x1e')](_0x2b0fb9['options']['include'],function(_0x3f6d3b){return{'model':db[_0x3f6d3b[_0xa644('0x1f')]],'as':_0x3f6d3b['as'],'attributes':_0x3f6d3b['attributes'],'include':_0x3f6d3b[_0xa644('0x20')]?_[_0xa644('0x1e')](_0x3f6d3b[_0xa644('0x20')],function(_0x54e872){return{'model':db[_0x54e872[_0xa644('0x1f')]],'as':_0x54e872['as'],'attributes':_0x54e872['attributes'],'include':_0x54e872[_0xa644('0x20')]?_[_0xa644('0x1e')](_0x54e872[_0xa644('0x20')],function(_0x1b8418){return{'model':db[_0x1b8418[_0xa644('0x1f')]],'as':_0x1b8418['as'],'attributes':_0x1b8418[_0xa644('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5599d5){logger[_0xa644('0xc')](_0xa644('0x17'),_0x2b0fb9);logger['debug']('GetDeskAccount',_0x2b0fb9,JSON[_0xa644('0x10')](_0x5599d5));_0xabc778(_0x5599d5);})[_0xa644('0x16')](function(_0x3af5ec){logger[_0xa644('0x11')]('GetDeskAccount',_0x3af5ec['message'],_0x2b0fb9);_0x1da70b(_0x39d5b9['error'](0x1f4,_0x3af5ec[_0xa644('0x14')]));});});};exports[_0xa644('0x21')]=function(_0x43432c){var _0x479652=this;return new Promise(function(_0x4d5721,_0x5a11ba){return db[_0xa644('0x18')][_0xa644('0x22')]({'raw':_0x43432c['options']?_0x43432c[_0xa644('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x43432c[_0xa644('0x1a')]?_0x43432c[_0xa644('0x1a')][_0xa644('0x23')]||null:null,'attributes':_0x43432c[_0xa644('0x1a')]?_0x43432c['options']['attributes']||null:null,'include':_0x43432c[_0xa644('0x1a')]?_0x43432c['options']['include']?_['map'](_0x43432c['options'][_0xa644('0x20')],function(_0x54cfcb){return{'model':db[_0x54cfcb['model']],'as':_0x54cfcb['as'],'attributes':_0x54cfcb[_0xa644('0x1c')],'include':_0x54cfcb['include']?_[_0xa644('0x1e')](_0x54cfcb[_0xa644('0x20')],function(_0x469586){return{'model':db[_0x469586[_0xa644('0x1f')]],'as':_0x469586['as'],'attributes':_0x469586['attributes'],'include':_0x469586[_0xa644('0x20')]?_['map'](_0x469586[_0xa644('0x20')],function(_0x5f3fe7){return{'model':db[_0x5f3fe7[_0xa644('0x1f')]],'as':_0x5f3fe7['as'],'attributes':_0x5f3fe7[_0xa644('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4dc2c7){logger[_0xa644('0xc')](_0xa644('0x21'),_0x43432c);logger['debug'](_0xa644('0x21'),_0x43432c,JSON[_0xa644('0x10')](_0x4dc2c7));_0x4d5721(_0x4dc2c7);})[_0xa644('0x16')](function(_0x2fdaa5){logger[_0xa644('0x11')](_0xa644('0x21'),_0x2fdaa5[_0xa644('0x14')],_0x43432c);_0x5a11ba(_0x479652[_0xa644('0x11')](0x1f4,_0x2fdaa5[_0xa644('0x14')]));});});};
\ No newline at end of file
+var _0x1660=['http','then','DeskAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','GetDeskAccount','DeskAccount','options','raw','limit','include','model','attributes','map','info','catch','ShowDeskAccount','find','where','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','client'];(function(_0x4792cf,_0x2a9dfa){var _0x19978a=function(_0x2a7cbe){while(--_0x2a7cbe){_0x4792cf['push'](_0x4792cf['shift']());}};_0x19978a(++_0x2a9dfa);}(_0x1660,0x1b6));var _0x0166=function(_0x25e7cb,_0x3579b7){_0x25e7cb=_0x25e7cb-0x0;var _0x375d92=_0x1660[_0x25e7cb];return _0x375d92;};'use strict';var _=require(_0x0166('0x0'));var util=require(_0x0166('0x1'));var moment=require(_0x0166('0x2'));var BPromise=require(_0x0166('0x3'));var rs=require(_0x0166('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0166('0x5'))['db'];var utils=require(_0x0166('0x6'));var logger=require('../../config/logger')(_0x0166('0x7'));var config=require(_0x0166('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x0166('0x9')][_0x0166('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x129a59,_0x5c9849,_0x2329cd){return new BPromise(function(_0x568314,_0x1d4b85){return client['request'](_0x129a59,_0x2329cd)[_0x0166('0xb')](function(_0x44e44c){logger['info'](_0x0166('0xc'),_0x5c9849,_0x0166('0xd'));logger[_0x0166('0xe')]('DeskAccount,\x20%s,\x20%s,\x20%s',_0x5c9849,_0x0166('0xd'),JSON[_0x0166('0xf')](_0x44e44c));if(_0x44e44c['error']){if(_0x44e44c[_0x0166('0x10')]['code']===0x1f4){logger[_0x0166('0x10')](_0x0166('0xc'),_0x5c9849,_0x44e44c[_0x0166('0x10')][_0x0166('0x11')]);return _0x1d4b85(_0x44e44c[_0x0166('0x10')][_0x0166('0x11')]);}logger['error'](_0x0166('0xc'),_0x5c9849,_0x44e44c[_0x0166('0x10')]['message']);return _0x568314(_0x44e44c[_0x0166('0x10')][_0x0166('0x11')]);}else{logger['info'](_0x0166('0xc'),_0x5c9849,_0x0166('0xd'));_0x568314(_0x44e44c['result'][_0x0166('0x11')]);}})['catch'](function(_0x33e951){logger[_0x0166('0x10')](_0x0166('0xc'),_0x5c9849,_0x33e951);_0x1d4b85(_0x33e951);});});}exports[_0x0166('0x12')]=function(_0x5c4ccc){var _0x3436ff=this;return new Promise(function(_0x23dca0,_0x17d354){return db[_0x0166('0x13')]['findAll']({'raw':_0x5c4ccc[_0x0166('0x14')]?_0x5c4ccc[_0x0166('0x14')][_0x0166('0x15')]===undefined?!![]:![]:!![],'where':_0x5c4ccc[_0x0166('0x14')]?_0x5c4ccc[_0x0166('0x14')]['where']||null:null,'attributes':_0x5c4ccc[_0x0166('0x14')]?_0x5c4ccc[_0x0166('0x14')]['attributes']||null:null,'limit':_0x5c4ccc[_0x0166('0x14')]?_0x5c4ccc[_0x0166('0x14')][_0x0166('0x16')]||null:null,'include':_0x5c4ccc[_0x0166('0x14')]?_0x5c4ccc[_0x0166('0x14')][_0x0166('0x17')]?_['map'](_0x5c4ccc[_0x0166('0x14')][_0x0166('0x17')],function(_0x141d81){return{'model':db[_0x141d81[_0x0166('0x18')]],'as':_0x141d81['as'],'attributes':_0x141d81[_0x0166('0x19')],'include':_0x141d81[_0x0166('0x17')]?_[_0x0166('0x1a')](_0x141d81['include'],function(_0x187165){return{'model':db[_0x187165[_0x0166('0x18')]],'as':_0x187165['as'],'attributes':_0x187165[_0x0166('0x19')],'include':_0x187165[_0x0166('0x17')]?_['map'](_0x187165[_0x0166('0x17')],function(_0xebb379){return{'model':db[_0xebb379[_0x0166('0x18')]],'as':_0xebb379['as'],'attributes':_0xebb379[_0x0166('0x19')]};}):[]};}):[]};}):[]:[]})[_0x0166('0xb')](function(_0x25a328){logger[_0x0166('0x1b')](_0x0166('0x12'),_0x5c4ccc);logger[_0x0166('0xe')]('GetDeskAccount',_0x5c4ccc,JSON[_0x0166('0xf')](_0x25a328));_0x23dca0(_0x25a328);})[_0x0166('0x1c')](function(_0x599d79){logger[_0x0166('0x10')](_0x0166('0x12'),_0x599d79['message'],_0x5c4ccc);_0x17d354(_0x3436ff['error'](0x1f4,_0x599d79[_0x0166('0x11')]));});});};exports[_0x0166('0x1d')]=function(_0x580910){var _0x1c5fca=this;return new Promise(function(_0x2d66c9,_0x39201f){return db['DeskAccount'][_0x0166('0x1e')]({'raw':_0x580910[_0x0166('0x14')]?_0x580910['options'][_0x0166('0x15')]===undefined?!![]:![]:!![],'where':_0x580910['options']?_0x580910[_0x0166('0x14')][_0x0166('0x1f')]||null:null,'attributes':_0x580910[_0x0166('0x14')]?_0x580910[_0x0166('0x14')][_0x0166('0x19')]||null:null,'include':_0x580910[_0x0166('0x14')]?_0x580910[_0x0166('0x14')][_0x0166('0x17')]?_[_0x0166('0x1a')](_0x580910['options'][_0x0166('0x17')],function(_0x34120c){return{'model':db[_0x34120c['model']],'as':_0x34120c['as'],'attributes':_0x34120c['attributes'],'include':_0x34120c[_0x0166('0x17')]?_['map'](_0x34120c[_0x0166('0x17')],function(_0x4690a7){return{'model':db[_0x4690a7[_0x0166('0x18')]],'as':_0x4690a7['as'],'attributes':_0x4690a7[_0x0166('0x19')],'include':_0x4690a7['include']?_['map'](_0x4690a7[_0x0166('0x17')],function(_0xc9e17c){return{'model':db[_0xc9e17c[_0x0166('0x18')]],'as':_0xc9e17c['as'],'attributes':_0xc9e17c[_0x0166('0x19')]};}):[]};}):[]};}):[]:[]})[_0x0166('0xb')](function(_0x5ebe4b){logger[_0x0166('0x1b')](_0x0166('0x1d'),_0x580910);logger[_0x0166('0xe')](_0x0166('0x1d'),_0x580910,JSON[_0x0166('0xf')](_0x5ebe4b));_0x2d66c9(_0x5ebe4b);})[_0x0166('0x1c')](function(_0x44838b){logger['error'](_0x0166('0x1d'),_0x44838b[_0x0166('0x11')],_0x580910);_0x39201f(_0x1c5fca['error'](0x1f4,_0x44838b[_0x0166('0x11')]));});});};
\ No newline at end of file