Built motion from commit (unavailable).|2.5.7
[motion2.git] / server / api / smsAccount / smsAccount.rpc.js
index 105beda..9c9e08f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xadf6=['redis','defaults','localhost','socket.io-emitter','register','request','then','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','ShowSmsAccount','SmsAccount','options','where','attributes','include','map','model','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x69e620,_0x4e3727){var _0x2791e1=function(_0x425761){while(--_0x425761){_0x69e620['push'](_0x69e620['shift']());}};_0x2791e1(++_0x4e3727);}(_0xadf6,0x1c8));var _0x6adf=function(_0x13b8f3,_0x442821){_0x13b8f3=_0x13b8f3-0x0;var _0x1a6d06=_0xadf6[_0x13b8f3];return _0x1a6d06;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x6adf('0x0'));var BPromise=require(_0x6adf('0x1'));var rs=require(_0x6adf('0x2'));var fs=require('fs');var Redis=require(_0x6adf('0x3'));var db=require(_0x6adf('0x4'))['db'];var utils=require(_0x6adf('0x5'));var logger=require(_0x6adf('0x6'))(_0x6adf('0x7'));var config=require(_0x6adf('0x8'));var jayson=require(_0x6adf('0x9'));var client=jayson[_0x6adf('0xa')][_0x6adf('0xb')]({'port':0x232a});config[_0x6adf('0xc')]=_[_0x6adf('0xd')](config[_0x6adf('0xc')],{'host':_0x6adf('0xe'),'port':0x18eb});var socket=require(_0x6adf('0xf'))(new Redis(config[_0x6adf('0xc')]));require('./smsAccount.socket')[_0x6adf('0x10')](socket);function respondWithRpcPromise(_0x3849ff,_0x581f2d,_0x51d327){return new BPromise(function(_0x458d5a,_0x4c551a){return client[_0x6adf('0x11')](_0x3849ff,_0x51d327)[_0x6adf('0x12')](function(_0x9637f4){logger[_0x6adf('0x13')](_0x6adf('0x14'),_0x581f2d,_0x6adf('0x15'));logger[_0x6adf('0x16')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x581f2d,_0x6adf('0x15'),JSON[_0x6adf('0x17')](_0x9637f4));if(_0x9637f4['error']){if(_0x9637f4[_0x6adf('0x18')][_0x6adf('0x19')]===0x1f4){logger[_0x6adf('0x18')]('SmsAccount,\x20%s,\x20%s',_0x581f2d,_0x9637f4[_0x6adf('0x18')][_0x6adf('0x1a')]);return _0x4c551a(_0x9637f4[_0x6adf('0x18')]['message']);}logger[_0x6adf('0x18')](_0x6adf('0x14'),_0x581f2d,_0x9637f4[_0x6adf('0x18')][_0x6adf('0x1a')]);return _0x458d5a(_0x9637f4[_0x6adf('0x18')]['message']);}else{logger[_0x6adf('0x13')](_0x6adf('0x14'),_0x581f2d,_0x6adf('0x15'));_0x458d5a(_0x9637f4['result'][_0x6adf('0x1a')]);}})[_0x6adf('0x1b')](function(_0x26e6a4){logger[_0x6adf('0x18')](_0x6adf('0x14'),_0x581f2d,_0x26e6a4);_0x4c551a(_0x26e6a4);});});}exports[_0x6adf('0x1c')]=function(_0x1f0a98){var _0x1148e6=this;return new Promise(function(_0x8ab1cc,_0x139bdd){return db[_0x6adf('0x1d')]['find']({'raw':_0x1f0a98[_0x6adf('0x1e')]?_0x1f0a98[_0x6adf('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x1f0a98[_0x6adf('0x1e')]?_0x1f0a98[_0x6adf('0x1e')][_0x6adf('0x1f')]||null:null,'attributes':_0x1f0a98[_0x6adf('0x1e')]?_0x1f0a98[_0x6adf('0x1e')][_0x6adf('0x20')]||null:null,'include':_0x1f0a98['options']?_0x1f0a98[_0x6adf('0x1e')][_0x6adf('0x21')]?_[_0x6adf('0x22')](_0x1f0a98[_0x6adf('0x1e')][_0x6adf('0x21')],function(_0x15486a){return{'model':db[_0x15486a[_0x6adf('0x23')]],'as':_0x15486a['as'],'attributes':_0x15486a[_0x6adf('0x20')],'include':_0x15486a[_0x6adf('0x21')]?_[_0x6adf('0x22')](_0x15486a[_0x6adf('0x21')],function(_0x592fe7){return{'model':db[_0x592fe7['model']],'as':_0x592fe7['as'],'attributes':_0x592fe7[_0x6adf('0x20')],'include':_0x592fe7[_0x6adf('0x21')]?_[_0x6adf('0x22')](_0x592fe7['include'],function(_0x52869a){return{'model':db[_0x52869a[_0x6adf('0x23')]],'as':_0x52869a['as'],'attributes':_0x52869a['attributes']};}):[]};}):[]};}):[]:[]})[_0x6adf('0x12')](function(_0x5ac162){logger[_0x6adf('0x13')]('ShowSmsAccount',_0x1f0a98);logger[_0x6adf('0x16')](_0x6adf('0x1c'),_0x1f0a98,JSON[_0x6adf('0x17')](_0x5ac162));_0x8ab1cc(_0x5ac162);})[_0x6adf('0x1b')](function(_0x3884df){logger[_0x6adf('0x18')]('ShowSmsAccount',_0x3884df[_0x6adf('0x1a')],_0x1f0a98);_0x139bdd(_0x1148e6['error'](0x1f4,_0x3884df[_0x6adf('0x1a')]));});});};
\ No newline at end of file
+var _0xa731=['model','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./smsAccount.socket','then','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','code','error','message','result','catch','ShowSmsAccount','SmsAccount','find','options','raw','where','attributes','include','map'];(function(_0x28c43a,_0x2084ba){var _0x47aa21=function(_0xc56482){while(--_0xc56482){_0x28c43a['push'](_0x28c43a['shift']());}};_0x47aa21(++_0x2084ba);}(_0xa731,0x131));var _0x1a73=function(_0x332228,_0xf7fb60){_0x332228=_0x332228-0x0;var _0x1a4ee8=_0xa731[_0x332228];return _0x1a4ee8;};'use strict';var _=require(_0x1a73('0x0'));var util=require(_0x1a73('0x1'));var moment=require(_0x1a73('0x2'));var BPromise=require('bluebird');var rs=require(_0x1a73('0x3'));var fs=require('fs');var Redis=require(_0x1a73('0x4'));var db=require(_0x1a73('0x5'))['db'];var utils=require(_0x1a73('0x6'));var logger=require(_0x1a73('0x7'))('rpc');var config=require(_0x1a73('0x8'));var jayson=require(_0x1a73('0x9'));var client=jayson[_0x1a73('0xa')][_0x1a73('0xb')]({'port':0x232a});config[_0x1a73('0xc')]=_[_0x1a73('0xd')](config[_0x1a73('0xc')],{'host':_0x1a73('0xe'),'port':0x18eb});var socket=require(_0x1a73('0xf'))(new Redis(config['redis']));require(_0x1a73('0x10'))['register'](socket);function respondWithRpcPromise(_0x486e47,_0x45d6df,_0x3923cc){return new BPromise(function(_0x44b637,_0x29e6dc){return client['request'](_0x486e47,_0x3923cc)[_0x1a73('0x11')](function(_0x59546f){logger[_0x1a73('0x12')](_0x1a73('0x13'),_0x45d6df,_0x1a73('0x14'));logger[_0x1a73('0x15')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x45d6df,_0x1a73('0x14'),JSON[_0x1a73('0x16')](_0x59546f));if(_0x59546f['error']){if(_0x59546f['error'][_0x1a73('0x17')]===0x1f4){logger['error'](_0x1a73('0x13'),_0x45d6df,_0x59546f[_0x1a73('0x18')][_0x1a73('0x19')]);return _0x29e6dc(_0x59546f[_0x1a73('0x18')]['message']);}logger[_0x1a73('0x18')]('SmsAccount,\x20%s,\x20%s',_0x45d6df,_0x59546f[_0x1a73('0x18')][_0x1a73('0x19')]);return _0x44b637(_0x59546f[_0x1a73('0x18')][_0x1a73('0x19')]);}else{logger['info'](_0x1a73('0x13'),_0x45d6df,_0x1a73('0x14'));_0x44b637(_0x59546f[_0x1a73('0x1a')][_0x1a73('0x19')]);}})[_0x1a73('0x1b')](function(_0x19b30a){logger[_0x1a73('0x18')]('SmsAccount,\x20%s,\x20%s',_0x45d6df,_0x19b30a);_0x29e6dc(_0x19b30a);});});}exports[_0x1a73('0x1c')]=function(_0x376def){var _0x2da450=this;return new Promise(function(_0x3ce4ec,_0x52c35f){return db[_0x1a73('0x1d')][_0x1a73('0x1e')]({'raw':_0x376def['options']?_0x376def[_0x1a73('0x1f')][_0x1a73('0x20')]===undefined?!![]:![]:!![],'where':_0x376def[_0x1a73('0x1f')]?_0x376def[_0x1a73('0x1f')][_0x1a73('0x21')]||null:null,'attributes':_0x376def[_0x1a73('0x1f')]?_0x376def[_0x1a73('0x1f')][_0x1a73('0x22')]||null:null,'include':_0x376def['options']?_0x376def['options'][_0x1a73('0x23')]?_[_0x1a73('0x24')](_0x376def['options'][_0x1a73('0x23')],function(_0x4c072b){return{'model':db[_0x4c072b[_0x1a73('0x25')]],'as':_0x4c072b['as'],'attributes':_0x4c072b[_0x1a73('0x22')],'include':_0x4c072b['include']?_[_0x1a73('0x24')](_0x4c072b[_0x1a73('0x23')],function(_0x7aab77){return{'model':db[_0x7aab77['model']],'as':_0x7aab77['as'],'attributes':_0x7aab77['attributes'],'include':_0x7aab77['include']?_[_0x1a73('0x24')](_0x7aab77[_0x1a73('0x23')],function(_0x3011df){return{'model':db[_0x3011df['model']],'as':_0x3011df['as'],'attributes':_0x3011df[_0x1a73('0x22')]};}):[]};}):[]};}):[]:[]})[_0x1a73('0x11')](function(_0x52ea42){logger['info']('ShowSmsAccount',_0x376def);logger[_0x1a73('0x15')](_0x1a73('0x1c'),_0x376def,JSON[_0x1a73('0x16')](_0x52ea42));_0x3ce4ec(_0x52ea42);})['catch'](function(_0x43ae6c){logger[_0x1a73('0x18')](_0x1a73('0x1c'),_0x43ae6c[_0x1a73('0x19')],_0x376def);_0x52c35f(_0x2da450['error'](0x1f4,_0x43ae6c['message']));});});};
\ No newline at end of file