Built motion from commit fe909640.|2.6.8
[motion2.git] / server / api / smsQueueReport / smsQueueReport.rpc.js
index d3f9d1c..74ff938 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x419f=['util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','info','SmsQueueReport,\x20%s,\x20%s','debug','SmsQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','CreateSmsQueueReport','SmsQueueReport','create','body','options','UpdateSmsQueueReport','where','limit','lodash'];(function(_0x5c12f2,_0x5de043){var _0x5e8344=function(_0x445932){while(--_0x445932){_0x5c12f2['push'](_0x5c12f2['shift']());}};_0x5e8344(++_0x5de043);}(_0x419f,0x154));var _0xf419=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0x419f[_0xfae23b];return _0x200640;};'use strict';var _=require(_0xf419('0x0'));var util=require(_0xf419('0x1'));var moment=require(_0xf419('0x2'));var BPromise=require(_0xf419('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xf419('0x4'));var db=require(_0xf419('0x5'))['db'];var utils=require(_0xf419('0x6'));var logger=require(_0xf419('0x7'))(_0xf419('0x8'));var config=require(_0xf419('0x9'));var jayson=require(_0xf419('0xa'));var client=jayson['client'][_0xf419('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x13694b,_0xd70160,_0x40bdcb){return new BPromise(function(_0x290c4b,_0xd12ea6){return client['request'](_0x13694b,_0x40bdcb)[_0xf419('0xc')](function(_0x52f28e){logger[_0xf419('0xd')](_0xf419('0xe'),_0xd70160,'request\x20sent');logger[_0xf419('0xf')](_0xf419('0x10'),_0xd70160,_0xf419('0x11'),JSON[_0xf419('0x12')](_0x52f28e));if(_0x52f28e['error']){if(_0x52f28e[_0xf419('0x13')]['code']===0x1f4){logger[_0xf419('0x13')](_0xf419('0xe'),_0xd70160,_0x52f28e[_0xf419('0x13')][_0xf419('0x14')]);return _0xd12ea6(_0x52f28e['error'][_0xf419('0x14')]);}logger[_0xf419('0x13')](_0xf419('0xe'),_0xd70160,_0x52f28e[_0xf419('0x13')][_0xf419('0x14')]);return _0x290c4b(_0x52f28e[_0xf419('0x13')]['message']);}else{logger[_0xf419('0xd')](_0xf419('0xe'),_0xd70160,'request\x20sent');_0x290c4b(_0x52f28e[_0xf419('0x15')][_0xf419('0x14')]);}})[_0xf419('0x16')](function(_0xd6ac2a){logger[_0xf419('0x13')]('SmsQueueReport,\x20%s,\x20%s',_0xd70160,_0xd6ac2a);_0xd12ea6(_0xd6ac2a);});});}exports[_0xf419('0x17')]=function(_0xc46d91){var _0x54999b=this;return new Promise(function(_0x1d9c5a,_0x1c1284){return db[_0xf419('0x18')][_0xf419('0x19')](_0xc46d91[_0xf419('0x1a')],{'raw':_0xc46d91[_0xf419('0x1b')]?_0xc46d91[_0xf419('0x1b')]['raw']===undefined?!![]:![]:!![]})[_0xf419('0xc')](function(_0x2c80bd){logger[_0xf419('0xd')](_0xf419('0x17'),_0xc46d91);logger[_0xf419('0xf')](_0xf419('0x17'),_0xc46d91,JSON[_0xf419('0x12')](_0x2c80bd));_0x1d9c5a(_0x2c80bd);})['catch'](function(_0xd7a02){logger[_0xf419('0x13')](_0xf419('0x17'),_0xd7a02[_0xf419('0x14')],_0xc46d91);_0x1c1284(_0x54999b[_0xf419('0x13')](0x1f4,_0xd7a02[_0xf419('0x14')]));});});};exports[_0xf419('0x1c')]=function(_0x156265){var _0x398ec2=this;return new Promise(function(_0x457206,_0x17fd14){return db[_0xf419('0x18')]['update'](_0x156265['body'],{'raw':_0x156265[_0xf419('0x1b')]?_0x156265[_0xf419('0x1b')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x156265[_0xf419('0x1b')]?_0x156265[_0xf419('0x1b')][_0xf419('0x1d')]||null:null,'attributes':_0x156265['options']?_0x156265[_0xf419('0x1b')]['attributes']||null:null,'limit':_0x156265[_0xf419('0x1b')]?_0x156265['options'][_0xf419('0x1e')]||null:null})[_0xf419('0xc')](function(_0x306857){logger['info'](_0xf419('0x1c'),_0x156265);logger[_0xf419('0xf')](_0xf419('0x1c'),_0x156265,JSON[_0xf419('0x12')](_0x306857));_0x457206(_0x306857);})[_0xf419('0x16')](function(_0x4edb39){logger['error']('UpdateSmsQueueReport',_0x4edb39[_0xf419('0x14')],_0x156265);_0x17fd14(_0x398ec2['error'](0x1f4,_0x4edb39[_0xf419('0x14')]));});});};
\ No newline at end of file
+var _0xa15c=['info','SmsQueueReport,\x20%s,\x20%s','request\x20sent','debug','SmsQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','CreateSmsQueueReport','create','body','options','catch','UpdateSmsQueueReport','SmsQueueReport','raw','where','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0xa15c,0x76));var _0xca15=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0xa15c[_0x6c993a];return _0x27f547;};'use strict';var _=require(_0xca15('0x0'));var util=require(_0xca15('0x1'));var moment=require(_0xca15('0x2'));var BPromise=require(_0xca15('0x3'));var rs=require(_0xca15('0x4'));var fs=require('fs');var Redis=require(_0xca15('0x5'));var db=require(_0xca15('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xca15('0x7'))(_0xca15('0x8'));var config=require(_0xca15('0x9'));var jayson=require(_0xca15('0xa'));var client=jayson['client'][_0xca15('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x557ef8,_0x10b531,_0x3f0e2d){return new BPromise(function(_0x3e231c,_0x47034f){return client[_0xca15('0xc')](_0x557ef8,_0x3f0e2d)[_0xca15('0xd')](function(_0xbd6362){logger[_0xca15('0xe')](_0xca15('0xf'),_0x10b531,_0xca15('0x10'));logger[_0xca15('0x11')](_0xca15('0x12'),_0x10b531,_0xca15('0x10'),JSON[_0xca15('0x13')](_0xbd6362));if(_0xbd6362[_0xca15('0x14')]){if(_0xbd6362[_0xca15('0x14')]['code']===0x1f4){logger[_0xca15('0x14')](_0xca15('0xf'),_0x10b531,_0xbd6362[_0xca15('0x14')]['message']);return _0x47034f(_0xbd6362[_0xca15('0x14')][_0xca15('0x15')]);}logger[_0xca15('0x14')](_0xca15('0xf'),_0x10b531,_0xbd6362[_0xca15('0x14')]['message']);return _0x3e231c(_0xbd6362[_0xca15('0x14')][_0xca15('0x15')]);}else{logger['info'](_0xca15('0xf'),_0x10b531,'request\x20sent');_0x3e231c(_0xbd6362[_0xca15('0x16')][_0xca15('0x15')]);}})['catch'](function(_0x314cb1){logger[_0xca15('0x14')]('SmsQueueReport,\x20%s,\x20%s',_0x10b531,_0x314cb1);_0x47034f(_0x314cb1);});});}exports[_0xca15('0x17')]=function(_0x2dee35){var _0x2ee528=this;return new Promise(function(_0x337bb4,_0x413f9b){return db['SmsQueueReport'][_0xca15('0x18')](_0x2dee35[_0xca15('0x19')],{'raw':_0x2dee35[_0xca15('0x1a')]?_0x2dee35[_0xca15('0x1a')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x2a80cd){logger['info']('CreateSmsQueueReport',_0x2dee35);logger[_0xca15('0x11')](_0xca15('0x17'),_0x2dee35,JSON['stringify'](_0x2a80cd));_0x337bb4(_0x2a80cd);})[_0xca15('0x1b')](function(_0x5586f3){logger[_0xca15('0x14')](_0xca15('0x17'),_0x5586f3[_0xca15('0x15')],_0x2dee35);_0x413f9b(_0x2ee528[_0xca15('0x14')](0x1f4,_0x5586f3[_0xca15('0x15')]));});});};exports[_0xca15('0x1c')]=function(_0x2745dc){var _0x3d12d2=this;return new Promise(function(_0x161ea5,_0x2adf96){return db[_0xca15('0x1d')]['update'](_0x2745dc[_0xca15('0x19')],{'raw':_0x2745dc[_0xca15('0x1a')]?_0x2745dc[_0xca15('0x1a')][_0xca15('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2745dc[_0xca15('0x1a')]?_0x2745dc[_0xca15('0x1a')][_0xca15('0x1f')]||null:null,'attributes':_0x2745dc['options']?_0x2745dc[_0xca15('0x1a')]['attributes']||null:null,'limit':_0x2745dc[_0xca15('0x1a')]?_0x2745dc['options'][_0xca15('0x20')]||null:null})['then'](function(_0x2bcacf){logger['info']('UpdateSmsQueueReport',_0x2745dc);logger[_0xca15('0x11')]('UpdateSmsQueueReport',_0x2745dc,JSON[_0xca15('0x13')](_0x2bcacf));_0x161ea5(_0x2bcacf);})[_0xca15('0x1b')](function(_0x53f378){logger[_0xca15('0x14')]('UpdateSmsQueueReport',_0x53f378[_0xca15('0x15')],_0x2745dc);_0x2adf96(_0x3d12d2[_0xca15('0x14')](0x1f4,_0x53f378[_0xca15('0x15')]));});});};
\ No newline at end of file