Built motion from commit (unavailable).|2.5.20
[motion2.git] / server / api / smsQueueReport / smsQueueReport.rpc.js
index e561153..b97dbf7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1e0f=['SmsQueueReport','create','body','options','raw','limit','UpdateSmsQueueReport','lodash','util','randomstring','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','info','SmsQueueReport,\x20%s,\x20%s','request\x20sent','debug','SmsQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','CreateSmsQueueReport'];(function(_0x4e50f9,_0x1cf2ab){var _0x4daf9c=function(_0x6291d4){while(--_0x6291d4){_0x4e50f9['push'](_0x4e50f9['shift']());}};_0x4daf9c(++_0x1cf2ab);}(_0x1e0f,0xcb));var _0xf1e0=function(_0x1cd74d,_0x87a9b1){_0x1cd74d=_0x1cd74d-0x0;var _0x380a5a=_0x1e0f[_0x1cd74d];return _0x380a5a;};'use strict';var _=require(_0xf1e0('0x0'));var util=require(_0xf1e0('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xf1e0('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xf1e0('0x3'));var logger=require(_0xf1e0('0x4'))('rpc');var config=require(_0xf1e0('0x5'));var jayson=require('jayson/promise');var client=jayson[_0xf1e0('0x6')][_0xf1e0('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x9354eb,_0xc2a86d,_0x488c48){return new BPromise(function(_0x246655,_0x427ca4){return client[_0xf1e0('0x8')](_0x9354eb,_0x488c48)[_0xf1e0('0x9')](function(_0x1986d0){logger[_0xf1e0('0xa')](_0xf1e0('0xb'),_0xc2a86d,_0xf1e0('0xc'));logger[_0xf1e0('0xd')](_0xf1e0('0xe'),_0xc2a86d,_0xf1e0('0xc'),JSON[_0xf1e0('0xf')](_0x1986d0));if(_0x1986d0[_0xf1e0('0x10')]){if(_0x1986d0[_0xf1e0('0x10')]['code']===0x1f4){logger[_0xf1e0('0x10')](_0xf1e0('0xb'),_0xc2a86d,_0x1986d0[_0xf1e0('0x10')][_0xf1e0('0x11')]);return _0x427ca4(_0x1986d0['error'][_0xf1e0('0x11')]);}logger[_0xf1e0('0x10')](_0xf1e0('0xb'),_0xc2a86d,_0x1986d0[_0xf1e0('0x10')][_0xf1e0('0x11')]);return _0x246655(_0x1986d0['error']['message']);}else{logger[_0xf1e0('0xa')](_0xf1e0('0xb'),_0xc2a86d,_0xf1e0('0xc'));_0x246655(_0x1986d0[_0xf1e0('0x12')][_0xf1e0('0x11')]);}})[_0xf1e0('0x13')](function(_0x48851e){logger[_0xf1e0('0x10')]('SmsQueueReport,\x20%s,\x20%s',_0xc2a86d,_0x48851e);_0x427ca4(_0x48851e);});});}exports[_0xf1e0('0x14')]=function(_0x30bb17){var _0x239483=this;return new Promise(function(_0x4ee9ba,_0x4e9ea5){return db[_0xf1e0('0x15')][_0xf1e0('0x16')](_0x30bb17[_0xf1e0('0x17')],{'raw':_0x30bb17[_0xf1e0('0x18')]?_0x30bb17[_0xf1e0('0x18')][_0xf1e0('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x24b8f2){logger[_0xf1e0('0xa')](_0xf1e0('0x14'),_0x30bb17);logger['debug'](_0xf1e0('0x14'),_0x30bb17,JSON[_0xf1e0('0xf')](_0x24b8f2));_0x4ee9ba(_0x24b8f2);})[_0xf1e0('0x13')](function(_0x45cf5d){logger[_0xf1e0('0x10')]('CreateSmsQueueReport',_0x45cf5d[_0xf1e0('0x11')],_0x30bb17);_0x4e9ea5(_0x239483[_0xf1e0('0x10')](0x1f4,_0x45cf5d[_0xf1e0('0x11')]));});});};exports['UpdateSmsQueueReport']=function(_0x3e4588){var _0x49b374=this;return new Promise(function(_0x26092b,_0x157264){return db['SmsQueueReport']['update'](_0x3e4588['body'],{'raw':_0x3e4588['options']?_0x3e4588[_0xf1e0('0x18')][_0xf1e0('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3e4588[_0xf1e0('0x18')]?_0x3e4588[_0xf1e0('0x18')]['where']||null:null,'attributes':_0x3e4588[_0xf1e0('0x18')]?_0x3e4588['options']['attributes']||null:null,'limit':_0x3e4588[_0xf1e0('0x18')]?_0x3e4588['options'][_0xf1e0('0x1a')]||null:null})[_0xf1e0('0x9')](function(_0x129897){logger['info']('UpdateSmsQueueReport',_0x3e4588);logger['debug'](_0xf1e0('0x1b'),_0x3e4588,JSON[_0xf1e0('0xf')](_0x129897));_0x26092b(_0x129897);})[_0xf1e0('0x13')](function(_0x4fd7e7){logger['error'](_0xf1e0('0x1b'),_0x4fd7e7[_0xf1e0('0x11')],_0x3e4588);_0x157264(_0x49b374[_0xf1e0('0x10')](0x1f4,_0x4fd7e7['message']));});});};
\ No newline at end of file
+var _0xdbc6=['create','body','options','raw','CreateSmsQueueReport','catch','UpdateSmsQueueReport','update','where','attributes','limit','info','lodash','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','then','SmsQueueReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','SmsQueueReport'];(function(_0x303750,_0x129e23){var _0x1dc3ef=function(_0x39e8e2){while(--_0x39e8e2){_0x303750['push'](_0x303750['shift']());}};_0x1dc3ef(++_0x129e23);}(_0xdbc6,0x180));var _0x6dbc=function(_0x1f0e7f,_0x439f2b){_0x1f0e7f=_0x1f0e7f-0x0;var _0xc2d92d=_0xdbc6[_0x1f0e7f];return _0xc2d92d;};'use strict';var _=require(_0x6dbc('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x6dbc('0x1'));var rs=require(_0x6dbc('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6dbc('0x3'))['db'];var utils=require(_0x6dbc('0x4'));var logger=require('../../config/logger')(_0x6dbc('0x5'));var config=require(_0x6dbc('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x6dbc('0x7')][_0x6dbc('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x544060,_0x44a333,_0x2b943f){return new BPromise(function(_0x21c24a,_0x425503){return client['request'](_0x544060,_0x2b943f)[_0x6dbc('0x9')](function(_0x3d1e71){logger['info'](_0x6dbc('0xa'),_0x44a333,_0x6dbc('0xb'));logger[_0x6dbc('0xc')]('SmsQueueReport,\x20%s,\x20%s,\x20%s',_0x44a333,_0x6dbc('0xb'),JSON[_0x6dbc('0xd')](_0x3d1e71));if(_0x3d1e71['error']){if(_0x3d1e71[_0x6dbc('0xe')][_0x6dbc('0xf')]===0x1f4){logger['error'](_0x6dbc('0xa'),_0x44a333,_0x3d1e71['error'][_0x6dbc('0x10')]);return _0x425503(_0x3d1e71[_0x6dbc('0xe')][_0x6dbc('0x10')]);}logger[_0x6dbc('0xe')](_0x6dbc('0xa'),_0x44a333,_0x3d1e71[_0x6dbc('0xe')]['message']);return _0x21c24a(_0x3d1e71[_0x6dbc('0xe')][_0x6dbc('0x10')]);}else{logger['info'](_0x6dbc('0xa'),_0x44a333,_0x6dbc('0xb'));_0x21c24a(_0x3d1e71[_0x6dbc('0x11')]['message']);}})['catch'](function(_0x26c7f4){logger['error'](_0x6dbc('0xa'),_0x44a333,_0x26c7f4);_0x425503(_0x26c7f4);});});}exports['CreateSmsQueueReport']=function(_0x310ca0){var _0x253421=this;return new Promise(function(_0x131abf,_0x268a94){return db[_0x6dbc('0x12')][_0x6dbc('0x13')](_0x310ca0[_0x6dbc('0x14')],{'raw':_0x310ca0[_0x6dbc('0x15')]?_0x310ca0[_0x6dbc('0x15')][_0x6dbc('0x16')]===undefined?!![]:![]:!![]})[_0x6dbc('0x9')](function(_0x190db7){logger['info'](_0x6dbc('0x17'),_0x310ca0);logger['debug'](_0x6dbc('0x17'),_0x310ca0,JSON[_0x6dbc('0xd')](_0x190db7));_0x131abf(_0x190db7);})[_0x6dbc('0x18')](function(_0x1aeec1){logger[_0x6dbc('0xe')](_0x6dbc('0x17'),_0x1aeec1['message'],_0x310ca0);_0x268a94(_0x253421[_0x6dbc('0xe')](0x1f4,_0x1aeec1['message']));});});};exports[_0x6dbc('0x19')]=function(_0x1d6982){var _0x286d00=this;return new Promise(function(_0x933445,_0xf48782){return db[_0x6dbc('0x12')][_0x6dbc('0x1a')](_0x1d6982[_0x6dbc('0x14')],{'raw':_0x1d6982[_0x6dbc('0x15')]?_0x1d6982['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1d6982[_0x6dbc('0x15')]?_0x1d6982[_0x6dbc('0x15')][_0x6dbc('0x1b')]||null:null,'attributes':_0x1d6982['options']?_0x1d6982[_0x6dbc('0x15')][_0x6dbc('0x1c')]||null:null,'limit':_0x1d6982[_0x6dbc('0x15')]?_0x1d6982[_0x6dbc('0x15')][_0x6dbc('0x1d')]||null:null})[_0x6dbc('0x9')](function(_0x431abc){logger[_0x6dbc('0x1e')](_0x6dbc('0x19'),_0x1d6982);logger[_0x6dbc('0xc')](_0x6dbc('0x19'),_0x1d6982,JSON[_0x6dbc('0xd')](_0x431abc));_0x933445(_0x431abc);})[_0x6dbc('0x18')](function(_0x5286d2){logger['error'](_0x6dbc('0x19'),_0x5286d2[_0x6dbc('0x10')],_0x1d6982);_0xf48782(_0x286d00[_0x6dbc('0xe')](0x1f4,_0x5286d2[_0x6dbc('0x10')]));});});};
\ No newline at end of file