Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / api / smsAccount / smsAccount.rpc.js
index 4f2ee04..eda8050 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc3cc=['error','code','message','info','result','catch','ShowSmsAccount','SmsAccount','find','options','raw','where','attributes','include','map','model','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','jayson/promise','client','http','defaults','redis','./smsAccount.socket','request','then','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x4c5ffd,_0x5c077f){var _0x5fe9d6=function(_0x1ba741){while(--_0x1ba741){_0x4c5ffd['push'](_0x4c5ffd['shift']());}};_0x5fe9d6(++_0x5c077f);}(_0xc3cc,0xe8));var _0xcc3c=function(_0x435150,_0x591cd9){_0x435150=_0x435150-0x0;var _0x13b3a4=_0xc3cc[_0x435150];return _0x13b3a4;};'use strict';var _=require(_0xcc3c('0x0'));var util=require(_0xcc3c('0x1'));var moment=require(_0xcc3c('0x2'));var BPromise=require(_0xcc3c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xcc3c('0x4'));var db=require(_0xcc3c('0x5'))['db'];var utils=require(_0xcc3c('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xcc3c('0x7'));var client=jayson[_0xcc3c('0x8')][_0xcc3c('0x9')]({'port':0x232a});config['redis']=_[_0xcc3c('0xa')](config[_0xcc3c('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xcc3c('0xb')]));require(_0xcc3c('0xc'))['register'](socket);function respondWithRpcPromise(_0x3c806f,_0x9dd067,_0x50bcc3){return new BPromise(function(_0x420ff3,_0x426167){return client[_0xcc3c('0xd')](_0x3c806f,_0x50bcc3)[_0xcc3c('0xe')](function(_0x1777c2){logger['info'](_0xcc3c('0xf'),_0x9dd067,_0xcc3c('0x10'));logger[_0xcc3c('0x11')](_0xcc3c('0x12'),_0x9dd067,'request\x20sent',JSON[_0xcc3c('0x13')](_0x1777c2));if(_0x1777c2[_0xcc3c('0x14')]){if(_0x1777c2[_0xcc3c('0x14')][_0xcc3c('0x15')]===0x1f4){logger['error'](_0xcc3c('0xf'),_0x9dd067,_0x1777c2['error']['message']);return _0x426167(_0x1777c2[_0xcc3c('0x14')]['message']);}logger['error'](_0xcc3c('0xf'),_0x9dd067,_0x1777c2['error'][_0xcc3c('0x16')]);return _0x420ff3(_0x1777c2[_0xcc3c('0x14')][_0xcc3c('0x16')]);}else{logger[_0xcc3c('0x17')](_0xcc3c('0xf'),_0x9dd067,'request\x20sent');_0x420ff3(_0x1777c2[_0xcc3c('0x18')][_0xcc3c('0x16')]);}})[_0xcc3c('0x19')](function(_0x4ddb6c){logger['error']('SmsAccount,\x20%s,\x20%s',_0x9dd067,_0x4ddb6c);_0x426167(_0x4ddb6c);});});}exports[_0xcc3c('0x1a')]=function(_0x2b97ba){var _0x383318=this;return new Promise(function(_0x532603,_0x1eca54){return db[_0xcc3c('0x1b')][_0xcc3c('0x1c')]({'raw':_0x2b97ba[_0xcc3c('0x1d')]?_0x2b97ba['options'][_0xcc3c('0x1e')]===undefined?!![]:![]:!![],'where':_0x2b97ba[_0xcc3c('0x1d')]?_0x2b97ba[_0xcc3c('0x1d')][_0xcc3c('0x1f')]||null:null,'attributes':_0x2b97ba['options']?_0x2b97ba[_0xcc3c('0x1d')][_0xcc3c('0x20')]||null:null,'include':_0x2b97ba['options']?_0x2b97ba[_0xcc3c('0x1d')][_0xcc3c('0x21')]?_[_0xcc3c('0x22')](_0x2b97ba['options'][_0xcc3c('0x21')],function(_0x37696d){return{'model':db[_0x37696d[_0xcc3c('0x23')]],'as':_0x37696d['as'],'attributes':_0x37696d[_0xcc3c('0x20')],'include':_0x37696d['include']?_['map'](_0x37696d[_0xcc3c('0x21')],function(_0x582c61){return{'model':db[_0x582c61[_0xcc3c('0x23')]],'as':_0x582c61['as'],'attributes':_0x582c61['attributes'],'include':_0x582c61[_0xcc3c('0x21')]?_['map'](_0x582c61[_0xcc3c('0x21')],function(_0x533ba6){return{'model':db[_0x533ba6[_0xcc3c('0x23')]],'as':_0x533ba6['as'],'attributes':_0x533ba6[_0xcc3c('0x20')]};}):[]};}):[]};}):[]:[]})[_0xcc3c('0xe')](function(_0x4446f0){logger[_0xcc3c('0x17')](_0xcc3c('0x1a'),_0x2b97ba);logger[_0xcc3c('0x11')](_0xcc3c('0x1a'),_0x2b97ba,JSON[_0xcc3c('0x13')](_0x4446f0));_0x532603(_0x4446f0);})[_0xcc3c('0x19')](function(_0x27e436){logger[_0xcc3c('0x14')](_0xcc3c('0x1a'),_0x27e436[_0xcc3c('0x16')],_0x2b97ba);_0x1eca54(_0x383318['error'](0x1f4,_0x27e436[_0xcc3c('0x16')]));});});};
\ No newline at end of file
+var _0x782f=['find','options','where','include','map','model','attributes','stringify','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','register','request','then','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','ShowSmsAccount','SmsAccount'];(function(_0x725a4c,_0x102507){var _0x37b2cc=function(_0x505fc9){while(--_0x505fc9){_0x725a4c['push'](_0x725a4c['shift']());}};_0x37b2cc(++_0x102507);}(_0x782f,0xec));var _0xf782=function(_0x2aa7d9,_0xc69c98){_0x2aa7d9=_0x2aa7d9-0x0;var _0x109308=_0x782f[_0x2aa7d9];return _0x109308;};'use strict';var _=require('lodash');var util=require(_0xf782('0x0'));var moment=require(_0xf782('0x1'));var BPromise=require(_0xf782('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf782('0x3'));var db=require(_0xf782('0x4'))['db'];var utils=require(_0xf782('0x5'));var logger=require(_0xf782('0x6'))(_0xf782('0x7'));var config=require('../../config/environment');var jayson=require(_0xf782('0x8'));var client=jayson[_0xf782('0x9')][_0xf782('0xa')]({'port':0x232a});config['redis']=_[_0xf782('0xb')](config[_0xf782('0xc')],{'host':_0xf782('0xd'),'port':0x18eb});var socket=require(_0xf782('0xe'))(new Redis(config[_0xf782('0xc')]));require('./smsAccount.socket')[_0xf782('0xf')](socket);function respondWithRpcPromise(_0x641688,_0x327515,_0x45b764){return new BPromise(function(_0x4c87e5,_0x70153){return client[_0xf782('0x10')](_0x641688,_0x45b764)[_0xf782('0x11')](function(_0x41c9a){logger[_0xf782('0x12')](_0xf782('0x13'),_0x327515,_0xf782('0x14'));logger[_0xf782('0x15')](_0xf782('0x16'),_0x327515,_0xf782('0x14'),JSON['stringify'](_0x41c9a));if(_0x41c9a['error']){if(_0x41c9a[_0xf782('0x17')][_0xf782('0x18')]===0x1f4){logger[_0xf782('0x17')]('SmsAccount,\x20%s,\x20%s',_0x327515,_0x41c9a['error']['message']);return _0x70153(_0x41c9a['error'][_0xf782('0x19')]);}logger['error'](_0xf782('0x13'),_0x327515,_0x41c9a[_0xf782('0x17')][_0xf782('0x19')]);return _0x4c87e5(_0x41c9a[_0xf782('0x17')][_0xf782('0x19')]);}else{logger[_0xf782('0x12')](_0xf782('0x13'),_0x327515,_0xf782('0x14'));_0x4c87e5(_0x41c9a[_0xf782('0x1a')][_0xf782('0x19')]);}})[_0xf782('0x1b')](function(_0x359586){logger[_0xf782('0x17')](_0xf782('0x13'),_0x327515,_0x359586);_0x70153(_0x359586);});});}exports[_0xf782('0x1c')]=function(_0x2c0b56){var _0x42f092=this;return new Promise(function(_0x191dc0,_0x4b4c50){return db[_0xf782('0x1d')][_0xf782('0x1e')]({'raw':_0x2c0b56[_0xf782('0x1f')]?_0x2c0b56['options']['raw']===undefined?!![]:![]:!![],'where':_0x2c0b56[_0xf782('0x1f')]?_0x2c0b56['options'][_0xf782('0x20')]||null:null,'attributes':_0x2c0b56[_0xf782('0x1f')]?_0x2c0b56[_0xf782('0x1f')]['attributes']||null:null,'include':_0x2c0b56[_0xf782('0x1f')]?_0x2c0b56['options'][_0xf782('0x21')]?_[_0xf782('0x22')](_0x2c0b56[_0xf782('0x1f')]['include'],function(_0xd9d066){return{'model':db[_0xd9d066[_0xf782('0x23')]],'as':_0xd9d066['as'],'attributes':_0xd9d066[_0xf782('0x24')],'include':_0xd9d066[_0xf782('0x21')]?_['map'](_0xd9d066[_0xf782('0x21')],function(_0x564420){return{'model':db[_0x564420[_0xf782('0x23')]],'as':_0x564420['as'],'attributes':_0x564420[_0xf782('0x24')],'include':_0x564420[_0xf782('0x21')]?_['map'](_0x564420[_0xf782('0x21')],function(_0xda1326){return{'model':db[_0xda1326[_0xf782('0x23')]],'as':_0xda1326['as'],'attributes':_0xda1326[_0xf782('0x24')]};}):[]};}):[]};}):[]:[]})[_0xf782('0x11')](function(_0x5b880d){logger['info'](_0xf782('0x1c'),_0x2c0b56);logger['debug']('ShowSmsAccount',_0x2c0b56,JSON[_0xf782('0x25')](_0x5b880d));_0x191dc0(_0x5b880d);})[_0xf782('0x1b')](function(_0x20cbc5){logger[_0xf782('0x17')](_0xf782('0x1c'),_0x20cbc5[_0xf782('0x19')],_0x2c0b56);_0x4b4c50(_0x42f092[_0xf782('0x17')](0x1f4,_0x20cbc5['message']));});});};
\ No newline at end of file