Built motion from commit fe909640.|2.6.8
[motion2.git] / server / api / smsQueueReport / smsQueueReport.rpc.js
index d951656..74ff938 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xadf4=['SmsQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','SmsQueueReport,\x20%s,\x20%s','message','catch','CreateSmsQueueReport','SmsQueueReport','create','body','options','raw','UpdateSmsQueueReport','update','where','attributes','limit','then','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','info','debug'];(function(_0x3cb07a,_0x1749c5){var _0x35338f=function(_0x976ccb){while(--_0x976ccb){_0x3cb07a['push'](_0x3cb07a['shift']());}};_0x35338f(++_0x1749c5);}(_0xadf4,0x7d));var _0x4adf=function(_0x119629,_0x246787){_0x119629=_0x119629-0x0;var _0x49a771=_0xadf4[_0x119629];return _0x49a771;};'use strict';var _=require(_0x4adf('0x0'));var util=require(_0x4adf('0x1'));var moment=require(_0x4adf('0x2'));var BPromise=require(_0x4adf('0x3'));var rs=require(_0x4adf('0x4'));var fs=require('fs');var Redis=require(_0x4adf('0x5'));var db=require(_0x4adf('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x4adf('0x7'));var config=require(_0x4adf('0x8'));var jayson=require(_0x4adf('0x9'));var client=jayson[_0x4adf('0xa')][_0x4adf('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x50f44e,_0x49164d,_0x65977a){return new BPromise(function(_0x95a763,_0x2e8b80){return client[_0x4adf('0xc')](_0x50f44e,_0x65977a)['then'](function(_0x3f5e8c){logger[_0x4adf('0xd')]('SmsQueueReport,\x20%s,\x20%s',_0x49164d,'request\x20sent');logger[_0x4adf('0xe')](_0x4adf('0xf'),_0x49164d,_0x4adf('0x10'),JSON[_0x4adf('0x11')](_0x3f5e8c));if(_0x3f5e8c[_0x4adf('0x12')]){if(_0x3f5e8c[_0x4adf('0x12')][_0x4adf('0x13')]===0x1f4){logger[_0x4adf('0x12')](_0x4adf('0x14'),_0x49164d,_0x3f5e8c[_0x4adf('0x12')]['message']);return _0x2e8b80(_0x3f5e8c[_0x4adf('0x12')][_0x4adf('0x15')]);}logger['error'](_0x4adf('0x14'),_0x49164d,_0x3f5e8c[_0x4adf('0x12')][_0x4adf('0x15')]);return _0x95a763(_0x3f5e8c['error'][_0x4adf('0x15')]);}else{logger[_0x4adf('0xd')](_0x4adf('0x14'),_0x49164d,_0x4adf('0x10'));_0x95a763(_0x3f5e8c['result']['message']);}})[_0x4adf('0x16')](function(_0x17046c){logger[_0x4adf('0x12')](_0x4adf('0x14'),_0x49164d,_0x17046c);_0x2e8b80(_0x17046c);});});}exports[_0x4adf('0x17')]=function(_0x109acc){var _0x170cfc=this;return new Promise(function(_0xbc6fed,_0x436a3a){return db[_0x4adf('0x18')][_0x4adf('0x19')](_0x109acc[_0x4adf('0x1a')],{'raw':_0x109acc[_0x4adf('0x1b')]?_0x109acc[_0x4adf('0x1b')][_0x4adf('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x167a4d){logger[_0x4adf('0xd')](_0x4adf('0x17'),_0x109acc);logger[_0x4adf('0xe')](_0x4adf('0x17'),_0x109acc,JSON['stringify'](_0x167a4d));_0xbc6fed(_0x167a4d);})[_0x4adf('0x16')](function(_0x45f6d9){logger[_0x4adf('0x12')](_0x4adf('0x17'),_0x45f6d9[_0x4adf('0x15')],_0x109acc);_0x436a3a(_0x170cfc[_0x4adf('0x12')](0x1f4,_0x45f6d9[_0x4adf('0x15')]));});});};exports[_0x4adf('0x1d')]=function(_0x19086a){var _0x30daed=this;return new Promise(function(_0x474456,_0x3ce796){return db[_0x4adf('0x18')][_0x4adf('0x1e')](_0x19086a[_0x4adf('0x1a')],{'raw':_0x19086a['options']?_0x19086a[_0x4adf('0x1b')][_0x4adf('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x19086a[_0x4adf('0x1b')]?_0x19086a[_0x4adf('0x1b')][_0x4adf('0x1f')]||null:null,'attributes':_0x19086a['options']?_0x19086a[_0x4adf('0x1b')][_0x4adf('0x20')]||null:null,'limit':_0x19086a['options']?_0x19086a[_0x4adf('0x1b')][_0x4adf('0x21')]||null:null})[_0x4adf('0x22')](function(_0x25e1e5){logger[_0x4adf('0xd')](_0x4adf('0x1d'),_0x19086a);logger[_0x4adf('0xe')]('UpdateSmsQueueReport',_0x19086a,JSON[_0x4adf('0x11')](_0x25e1e5));_0x474456(_0x25e1e5);})[_0x4adf('0x16')](function(_0xb8c650){logger[_0x4adf('0x12')](_0x4adf('0x1d'),_0xb8c650[_0x4adf('0x15')],_0x19086a);_0x3ce796(_0x30daed['error'](0x1f4,_0xb8c650[_0x4adf('0x15')]));});});};
\ 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