Built motion from commit fe909640.|2.6.8
[motion2.git] / server / api / smsQueueReport / smsQueueReport.rpc.js
index 134f3a7..74ff938 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6e1b=['lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/environment','jayson/promise','http','then','info','request\x20sent','debug','SmsQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','SmsQueueReport,\x20%s,\x20%s','message','result','catch','CreateSmsQueueReport','SmsQueueReport','create','body','raw','options','where','attributes','limit'];(function(_0xca88ef,_0x453f6b){var _0x565e2f=function(_0x1e4bf2){while(--_0x1e4bf2){_0xca88ef['push'](_0xca88ef['shift']());}};_0x565e2f(++_0x453f6b);}(_0x6e1b,0xba));var _0xb6e1=function(_0x1b5fe5,_0x35968b){_0x1b5fe5=_0x1b5fe5-0x0;var _0x65ac24=_0x6e1b[_0x1b5fe5];return _0x65ac24;};'use strict';var _=require(_0xb6e1('0x0'));var util=require(_0xb6e1('0x1'));var moment=require(_0xb6e1('0x2'));var BPromise=require(_0xb6e1('0x3'));var rs=require(_0xb6e1('0x4'));var fs=require('fs');var Redis=require(_0xb6e1('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xb6e1('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0xb6e1('0x7'));var jayson=require(_0xb6e1('0x8'));var client=jayson['client'][_0xb6e1('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3ef669,_0x5f4a18,_0x49acc1){return new BPromise(function(_0x3f0585,_0x921f1b){return client['request'](_0x3ef669,_0x49acc1)[_0xb6e1('0xa')](function(_0x30785c){logger[_0xb6e1('0xb')]('SmsQueueReport,\x20%s,\x20%s',_0x5f4a18,_0xb6e1('0xc'));logger[_0xb6e1('0xd')](_0xb6e1('0xe'),_0x5f4a18,_0xb6e1('0xc'),JSON[_0xb6e1('0xf')](_0x30785c));if(_0x30785c[_0xb6e1('0x10')]){if(_0x30785c[_0xb6e1('0x10')][_0xb6e1('0x11')]===0x1f4){logger[_0xb6e1('0x10')](_0xb6e1('0x12'),_0x5f4a18,_0x30785c[_0xb6e1('0x10')]['message']);return _0x921f1b(_0x30785c[_0xb6e1('0x10')][_0xb6e1('0x13')]);}logger[_0xb6e1('0x10')]('SmsQueueReport,\x20%s,\x20%s',_0x5f4a18,_0x30785c['error'][_0xb6e1('0x13')]);return _0x3f0585(_0x30785c[_0xb6e1('0x10')][_0xb6e1('0x13')]);}else{logger['info']('SmsQueueReport,\x20%s,\x20%s',_0x5f4a18,_0xb6e1('0xc'));_0x3f0585(_0x30785c[_0xb6e1('0x14')][_0xb6e1('0x13')]);}})[_0xb6e1('0x15')](function(_0x43a657){logger[_0xb6e1('0x10')](_0xb6e1('0x12'),_0x5f4a18,_0x43a657);_0x921f1b(_0x43a657);});});}exports[_0xb6e1('0x16')]=function(_0x50b991){var _0x4a3dd9=this;return new Promise(function(_0x3351b2,_0x5b751f){return db[_0xb6e1('0x17')][_0xb6e1('0x18')](_0x50b991[_0xb6e1('0x19')],{'raw':_0x50b991['options']?_0x50b991['options'][_0xb6e1('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x184614){logger[_0xb6e1('0xb')](_0xb6e1('0x16'),_0x50b991);logger[_0xb6e1('0xd')](_0xb6e1('0x16'),_0x50b991,JSON[_0xb6e1('0xf')](_0x184614));_0x3351b2(_0x184614);})[_0xb6e1('0x15')](function(_0x3750ce){logger[_0xb6e1('0x10')](_0xb6e1('0x16'),_0x3750ce[_0xb6e1('0x13')],_0x50b991);_0x5b751f(_0x4a3dd9[_0xb6e1('0x10')](0x1f4,_0x3750ce['message']));});});};exports['UpdateSmsQueueReport']=function(_0x1d56a8){var _0xfca183=this;return new Promise(function(_0x3920cc,_0x5141fe){return db[_0xb6e1('0x17')]['update'](_0x1d56a8[_0xb6e1('0x19')],{'raw':_0x1d56a8['options']?_0x1d56a8['options'][_0xb6e1('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1d56a8[_0xb6e1('0x1b')]?_0x1d56a8[_0xb6e1('0x1b')][_0xb6e1('0x1c')]||null:null,'attributes':_0x1d56a8[_0xb6e1('0x1b')]?_0x1d56a8[_0xb6e1('0x1b')][_0xb6e1('0x1d')]||null:null,'limit':_0x1d56a8[_0xb6e1('0x1b')]?_0x1d56a8[_0xb6e1('0x1b')][_0xb6e1('0x1e')]||null:null})[_0xb6e1('0xa')](function(_0x13a308){logger[_0xb6e1('0xb')]('UpdateSmsQueueReport',_0x1d56a8);logger[_0xb6e1('0xd')]('UpdateSmsQueueReport',_0x1d56a8,JSON[_0xb6e1('0xf')](_0x13a308));_0x3920cc(_0x13a308);})['catch'](function(_0x1e88db){logger[_0xb6e1('0x10')]('UpdateSmsQueueReport',_0x1e88db[_0xb6e1('0x13')],_0x1d56a8);_0x5141fe(_0xfca183[_0xb6e1('0x10')](0x1f4,_0x1e88db['message']));});});};
\ 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