Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / smsQueueReport / smsQueueReport.rpc.js
index 43154f6..d39787a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x35e1=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SmsQueueReport,\x20%s,\x20%s','request\x20sent','debug','SmsQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','SmsQueueReport','create','body','options','raw','CreateSmsQueueReport','where','attributes','limit','UpdateSmsQueueReport','moment','bluebird'];(function(_0x262527,_0x145f26){var _0x5b70d2=function(_0x2723e2){while(--_0x2723e2){_0x262527['push'](_0x262527['shift']());}};_0x5b70d2(++_0x145f26);}(_0x35e1,0xec));var _0x135e=function(_0x5d1cb2,_0x2f631e){_0x5d1cb2=_0x5d1cb2-0x0;var _0x55f06a=_0x35e1[_0x5d1cb2];return _0x55f06a;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x135e('0x0'));var BPromise=require(_0x135e('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x135e('0x2'));var db=require(_0x135e('0x3'))['db'];var utils=require(_0x135e('0x4'));var logger=require(_0x135e('0x5'))(_0x135e('0x6'));var config=require(_0x135e('0x7'));var jayson=require(_0x135e('0x8'));var client=jayson[_0x135e('0x9')][_0x135e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x195a83,_0x4ffa0f,_0x208aab){return new BPromise(function(_0x450cbb,_0x3b451d){return client[_0x135e('0xb')](_0x195a83,_0x208aab)[_0x135e('0xc')](function(_0x448310){logger[_0x135e('0xd')](_0x135e('0xe'),_0x4ffa0f,_0x135e('0xf'));logger[_0x135e('0x10')](_0x135e('0x11'),_0x4ffa0f,_0x135e('0xf'),JSON[_0x135e('0x12')](_0x448310));if(_0x448310[_0x135e('0x13')]){if(_0x448310[_0x135e('0x13')][_0x135e('0x14')]===0x1f4){logger[_0x135e('0x13')]('SmsQueueReport,\x20%s,\x20%s',_0x4ffa0f,_0x448310[_0x135e('0x13')][_0x135e('0x15')]);return _0x3b451d(_0x448310[_0x135e('0x13')]['message']);}logger[_0x135e('0x13')](_0x135e('0xe'),_0x4ffa0f,_0x448310['error']['message']);return _0x450cbb(_0x448310[_0x135e('0x13')][_0x135e('0x15')]);}else{logger['info'](_0x135e('0xe'),_0x4ffa0f,_0x135e('0xf'));_0x450cbb(_0x448310[_0x135e('0x16')]['message']);}})[_0x135e('0x17')](function(_0x2954e7){logger['error'](_0x135e('0xe'),_0x4ffa0f,_0x2954e7);_0x3b451d(_0x2954e7);});});}exports['CreateSmsQueueReport']=function(_0x2e5180){var _0x2dad29=this;return new Promise(function(_0x40598f,_0xf3273a){return db[_0x135e('0x18')][_0x135e('0x19')](_0x2e5180[_0x135e('0x1a')],{'raw':_0x2e5180[_0x135e('0x1b')]?_0x2e5180[_0x135e('0x1b')][_0x135e('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x177396){logger[_0x135e('0xd')]('CreateSmsQueueReport',_0x2e5180);logger[_0x135e('0x10')]('CreateSmsQueueReport',_0x2e5180,JSON[_0x135e('0x12')](_0x177396));_0x40598f(_0x177396);})[_0x135e('0x17')](function(_0x3e4a34){logger[_0x135e('0x13')](_0x135e('0x1d'),_0x3e4a34['message'],_0x2e5180);_0xf3273a(_0x2dad29[_0x135e('0x13')](0x1f4,_0x3e4a34['message']));});});};exports['UpdateSmsQueueReport']=function(_0x5e5bf0){var _0x3c406f=this;return new Promise(function(_0x16d784,_0x4bad8a){return db[_0x135e('0x18')]['update'](_0x5e5bf0[_0x135e('0x1a')],{'raw':_0x5e5bf0[_0x135e('0x1b')]?_0x5e5bf0[_0x135e('0x1b')][_0x135e('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5e5bf0[_0x135e('0x1b')]?_0x5e5bf0[_0x135e('0x1b')][_0x135e('0x1e')]||null:null,'attributes':_0x5e5bf0[_0x135e('0x1b')]?_0x5e5bf0['options'][_0x135e('0x1f')]||null:null,'limit':_0x5e5bf0[_0x135e('0x1b')]?_0x5e5bf0[_0x135e('0x1b')][_0x135e('0x20')]||null:null})['then'](function(_0x531fdf){logger[_0x135e('0xd')](_0x135e('0x21'),_0x5e5bf0);logger[_0x135e('0x10')](_0x135e('0x21'),_0x5e5bf0,JSON['stringify'](_0x531fdf));_0x16d784(_0x531fdf);})[_0x135e('0x17')](function(_0x5a9cb4){logger['error'](_0x135e('0x21'),_0x5a9cb4[_0x135e('0x15')],_0x5e5bf0);_0x4bad8a(_0x3c406f[_0x135e('0x13')](0x1f4,_0x5a9cb4[_0x135e('0x15')]));});});};
\ No newline at end of file
+var _0x5199=['rpc','../../config/environment','client','request','info','SmsQueueReport,\x20%s,\x20%s','debug','SmsQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','CreateSmsQueueReport','create','body','raw','then','stringify','UpdateSmsQueueReport','SmsQueueReport','update','options','where','attributes','limit','lodash','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x3b1b22,_0x149522){var _0x6401e1=function(_0x5e9855){while(--_0x5e9855){_0x3b1b22['push'](_0x3b1b22['shift']());}};_0x6401e1(++_0x149522);}(_0x5199,0x165));var _0x9519=function(_0x40ac5e,_0x2de228){_0x40ac5e=_0x40ac5e-0x0;var _0x2839d6=_0x5199[_0x40ac5e];return _0x2839d6;};'use strict';var _=require(_0x9519('0x0'));var util=require('util');var moment=require(_0x9519('0x1'));var BPromise=require(_0x9519('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9519('0x3'))['db'];var utils=require(_0x9519('0x4'));var logger=require(_0x9519('0x5'))(_0x9519('0x6'));var config=require(_0x9519('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x9519('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4e8303,_0x29ccb0,_0x1cb7b2){return new BPromise(function(_0x19978b,_0x51a991){return client[_0x9519('0x9')](_0x4e8303,_0x1cb7b2)['then'](function(_0x186ec3){logger[_0x9519('0xa')](_0x9519('0xb'),_0x29ccb0,'request\x20sent');logger[_0x9519('0xc')](_0x9519('0xd'),_0x29ccb0,_0x9519('0xe'),JSON['stringify'](_0x186ec3));if(_0x186ec3[_0x9519('0xf')]){if(_0x186ec3[_0x9519('0xf')][_0x9519('0x10')]===0x1f4){logger[_0x9519('0xf')](_0x9519('0xb'),_0x29ccb0,_0x186ec3[_0x9519('0xf')]['message']);return _0x51a991(_0x186ec3['error'][_0x9519('0x11')]);}logger[_0x9519('0xf')](_0x9519('0xb'),_0x29ccb0,_0x186ec3[_0x9519('0xf')][_0x9519('0x11')]);return _0x19978b(_0x186ec3[_0x9519('0xf')][_0x9519('0x11')]);}else{logger[_0x9519('0xa')](_0x9519('0xb'),_0x29ccb0,_0x9519('0xe'));_0x19978b(_0x186ec3[_0x9519('0x12')][_0x9519('0x11')]);}})[_0x9519('0x13')](function(_0x295301){logger['error']('SmsQueueReport,\x20%s,\x20%s',_0x29ccb0,_0x295301);_0x51a991(_0x295301);});});}exports[_0x9519('0x14')]=function(_0x54caf2){var _0x39cbed=this;return new Promise(function(_0x3dde2d,_0x20d058){return db['SmsQueueReport'][_0x9519('0x15')](_0x54caf2[_0x9519('0x16')],{'raw':_0x54caf2['options']?_0x54caf2['options'][_0x9519('0x17')]===undefined?!![]:![]:!![]})[_0x9519('0x18')](function(_0x10423a){logger[_0x9519('0xa')]('CreateSmsQueueReport',_0x54caf2);logger[_0x9519('0xc')](_0x9519('0x14'),_0x54caf2,JSON[_0x9519('0x19')](_0x10423a));_0x3dde2d(_0x10423a);})[_0x9519('0x13')](function(_0x21eb69){logger['error'](_0x9519('0x14'),_0x21eb69[_0x9519('0x11')],_0x54caf2);_0x20d058(_0x39cbed['error'](0x1f4,_0x21eb69[_0x9519('0x11')]));});});};exports[_0x9519('0x1a')]=function(_0x26d142){var _0x112910=this;return new Promise(function(_0x589924,_0x398505){return db[_0x9519('0x1b')][_0x9519('0x1c')](_0x26d142[_0x9519('0x16')],{'raw':_0x26d142[_0x9519('0x1d')]?_0x26d142['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x26d142[_0x9519('0x1d')]?_0x26d142[_0x9519('0x1d')][_0x9519('0x1e')]||null:null,'attributes':_0x26d142['options']?_0x26d142['options'][_0x9519('0x1f')]||null:null,'limit':_0x26d142['options']?_0x26d142[_0x9519('0x1d')][_0x9519('0x20')]||null:null})[_0x9519('0x18')](function(_0x31d42d){logger['info']('UpdateSmsQueueReport',_0x26d142);logger['debug'](_0x9519('0x1a'),_0x26d142,JSON['stringify'](_0x31d42d));_0x589924(_0x31d42d);})['catch'](function(_0x2285af){logger['error']('UpdateSmsQueueReport',_0x2285af[_0x9519('0x11')],_0x26d142);_0x398505(_0x112910[_0x9519('0xf')](0x1f4,_0x2285af[_0x9519('0x11')]));});});};
\ No newline at end of file