Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / smsAccount / smsAccount.rpc.js
index 4f2ee04..a49ce05 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 _0x0b9e=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./smsAccount.socket','register','request','then','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','ShowSmsAccount','SmsAccount','find','options','where','attributes','include','model','map','lodash'];(function(_0x35885a,_0x42fed7){var _0xe86249=function(_0x98edb3){while(--_0x98edb3){_0x35885a['push'](_0x35885a['shift']());}};_0xe86249(++_0x42fed7);}(_0x0b9e,0xa3));var _0xe0b9=function(_0x1a42b6,_0x44ca6e){_0x1a42b6=_0x1a42b6-0x0;var _0x2054b3=_0x0b9e[_0x1a42b6];return _0x2054b3;};'use strict';var _=require(_0xe0b9('0x0'));var util=require(_0xe0b9('0x1'));var moment=require(_0xe0b9('0x2'));var BPromise=require(_0xe0b9('0x3'));var rs=require(_0xe0b9('0x4'));var fs=require('fs');var Redis=require(_0xe0b9('0x5'));var db=require(_0xe0b9('0x6'))['db'];var utils=require(_0xe0b9('0x7'));var logger=require(_0xe0b9('0x8'))(_0xe0b9('0x9'));var config=require(_0xe0b9('0xa'));var jayson=require(_0xe0b9('0xb'));var client=jayson[_0xe0b9('0xc')]['http']({'port':0x232a});config[_0xe0b9('0xd')]=_[_0xe0b9('0xe')](config[_0xe0b9('0xd')],{'host':_0xe0b9('0xf'),'port':0x18eb});var socket=require(_0xe0b9('0x10'))(new Redis(config[_0xe0b9('0xd')]));require(_0xe0b9('0x11'))[_0xe0b9('0x12')](socket);function respondWithRpcPromise(_0x5ce2e3,_0x454b8e,_0x4f990e){return new BPromise(function(_0x462805,_0xea2857){return client[_0xe0b9('0x13')](_0x5ce2e3,_0x4f990e)[_0xe0b9('0x14')](function(_0x307b57){logger['info'](_0xe0b9('0x15'),_0x454b8e,_0xe0b9('0x16'));logger[_0xe0b9('0x17')](_0xe0b9('0x18'),_0x454b8e,_0xe0b9('0x16'),JSON[_0xe0b9('0x19')](_0x307b57));if(_0x307b57[_0xe0b9('0x1a')]){if(_0x307b57[_0xe0b9('0x1a')][_0xe0b9('0x1b')]===0x1f4){logger[_0xe0b9('0x1a')]('SmsAccount,\x20%s,\x20%s',_0x454b8e,_0x307b57[_0xe0b9('0x1a')][_0xe0b9('0x1c')]);return _0xea2857(_0x307b57[_0xe0b9('0x1a')][_0xe0b9('0x1c')]);}logger[_0xe0b9('0x1a')]('SmsAccount,\x20%s,\x20%s',_0x454b8e,_0x307b57['error'][_0xe0b9('0x1c')]);return _0x462805(_0x307b57[_0xe0b9('0x1a')]['message']);}else{logger[_0xe0b9('0x1d')](_0xe0b9('0x15'),_0x454b8e,_0xe0b9('0x16'));_0x462805(_0x307b57[_0xe0b9('0x1e')][_0xe0b9('0x1c')]);}})[_0xe0b9('0x1f')](function(_0x43b7c2){logger['error'](_0xe0b9('0x15'),_0x454b8e,_0x43b7c2);_0xea2857(_0x43b7c2);});});}exports[_0xe0b9('0x20')]=function(_0x1efeb8){var _0x166c6b=this;return new Promise(function(_0x317015,_0x5dbc43){return db[_0xe0b9('0x21')][_0xe0b9('0x22')]({'raw':_0x1efeb8[_0xe0b9('0x23')]?_0x1efeb8[_0xe0b9('0x23')]['raw']===undefined?!![]:![]:!![],'where':_0x1efeb8[_0xe0b9('0x23')]?_0x1efeb8[_0xe0b9('0x23')][_0xe0b9('0x24')]||null:null,'attributes':_0x1efeb8[_0xe0b9('0x23')]?_0x1efeb8[_0xe0b9('0x23')][_0xe0b9('0x25')]||null:null,'include':_0x1efeb8[_0xe0b9('0x23')]?_0x1efeb8['options'][_0xe0b9('0x26')]?_['map'](_0x1efeb8[_0xe0b9('0x23')]['include'],function(_0x4b6903){return{'model':db[_0x4b6903[_0xe0b9('0x27')]],'as':_0x4b6903['as'],'attributes':_0x4b6903[_0xe0b9('0x25')],'include':_0x4b6903[_0xe0b9('0x26')]?_[_0xe0b9('0x28')](_0x4b6903['include'],function(_0x2464df){return{'model':db[_0x2464df[_0xe0b9('0x27')]],'as':_0x2464df['as'],'attributes':_0x2464df[_0xe0b9('0x25')],'include':_0x2464df[_0xe0b9('0x26')]?_[_0xe0b9('0x28')](_0x2464df[_0xe0b9('0x26')],function(_0x5ac77e){return{'model':db[_0x5ac77e[_0xe0b9('0x27')]],'as':_0x5ac77e['as'],'attributes':_0x5ac77e[_0xe0b9('0x25')]};}):[]};}):[]};}):[]:[]})[_0xe0b9('0x14')](function(_0x590d72){logger[_0xe0b9('0x1d')]('ShowSmsAccount',_0x1efeb8);logger[_0xe0b9('0x17')](_0xe0b9('0x20'),_0x1efeb8,JSON[_0xe0b9('0x19')](_0x590d72));_0x317015(_0x590d72);})[_0xe0b9('0x1f')](function(_0x38d77e){logger[_0xe0b9('0x1a')](_0xe0b9('0x20'),_0x38d77e[_0xe0b9('0x1c')],_0x1efeb8);_0x5dbc43(_0x166c6b['error'](0x1f4,_0x38d77e[_0xe0b9('0x1c')]));});});};
\ No newline at end of file