Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / smsQueueReport / smsQueueReport.rpc.js
index 34cd9a7..d39787a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x48a7=['info','SmsQueueReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','catch','CreateSmsQueueReport','body','options','raw','SmsQueueReport','update','attributes','limit','UpdateSmsQueueReport','lodash','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','then'];(function(_0x37cde8,_0x398331){var _0x19a8a2=function(_0x49b25c){while(--_0x49b25c){_0x37cde8['push'](_0x37cde8['shift']());}};_0x19a8a2(++_0x398331);}(_0x48a7,0x1cb));var _0x748a=function(_0x410122,_0xa37d5e){_0x410122=_0x410122-0x0;var _0x3f5479=_0x48a7[_0x410122];return _0x3f5479;};'use strict';var _=require(_0x748a('0x0'));var util=require('util');var moment=require(_0x748a('0x1'));var BPromise=require('bluebird');var rs=require(_0x748a('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x748a('0x3'))['db'];var utils=require(_0x748a('0x4'));var logger=require(_0x748a('0x5'))('rpc');var config=require(_0x748a('0x6'));var jayson=require(_0x748a('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x41f236,_0xbf3b11,_0x5a3988){return new BPromise(function(_0x32fb5a,_0x5e1cd5){return client['request'](_0x41f236,_0x5a3988)[_0x748a('0x8')](function(_0x1ce075){logger[_0x748a('0x9')](_0x748a('0xa'),_0xbf3b11,_0x748a('0xb'));logger[_0x748a('0xc')]('SmsQueueReport,\x20%s,\x20%s,\x20%s',_0xbf3b11,'request\x20sent',JSON[_0x748a('0xd')](_0x1ce075));if(_0x1ce075[_0x748a('0xe')]){if(_0x1ce075[_0x748a('0xe')]['code']===0x1f4){logger[_0x748a('0xe')]('SmsQueueReport,\x20%s,\x20%s',_0xbf3b11,_0x1ce075[_0x748a('0xe')][_0x748a('0xf')]);return _0x5e1cd5(_0x1ce075[_0x748a('0xe')][_0x748a('0xf')]);}logger[_0x748a('0xe')](_0x748a('0xa'),_0xbf3b11,_0x1ce075[_0x748a('0xe')][_0x748a('0xf')]);return _0x32fb5a(_0x1ce075[_0x748a('0xe')][_0x748a('0xf')]);}else{logger['info'](_0x748a('0xa'),_0xbf3b11,_0x748a('0xb'));_0x32fb5a(_0x1ce075['result']['message']);}})[_0x748a('0x10')](function(_0x5d649f){logger['error'](_0x748a('0xa'),_0xbf3b11,_0x5d649f);_0x5e1cd5(_0x5d649f);});});}exports[_0x748a('0x11')]=function(_0x2abaf0){var _0x5efa01=this;return new Promise(function(_0x2af010,_0x4034a0){return db['SmsQueueReport']['create'](_0x2abaf0[_0x748a('0x12')],{'raw':_0x2abaf0[_0x748a('0x13')]?_0x2abaf0[_0x748a('0x13')][_0x748a('0x14')]===undefined?!![]:![]:!![]})[_0x748a('0x8')](function(_0x3bdd4b){logger['info']('CreateSmsQueueReport',_0x2abaf0);logger[_0x748a('0xc')]('CreateSmsQueueReport',_0x2abaf0,JSON[_0x748a('0xd')](_0x3bdd4b));_0x2af010(_0x3bdd4b);})[_0x748a('0x10')](function(_0x5beb91){logger[_0x748a('0xe')](_0x748a('0x11'),_0x5beb91['message'],_0x2abaf0);_0x4034a0(_0x5efa01[_0x748a('0xe')](0x1f4,_0x5beb91[_0x748a('0xf')]));});});};exports['UpdateSmsQueueReport']=function(_0x41451e){var _0x36578d=this;return new Promise(function(_0x3108fc,_0x4b984d){return db[_0x748a('0x15')][_0x748a('0x16')](_0x41451e[_0x748a('0x12')],{'raw':_0x41451e[_0x748a('0x13')]?_0x41451e['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x41451e['options']?_0x41451e[_0x748a('0x13')]['where']||null:null,'attributes':_0x41451e[_0x748a('0x13')]?_0x41451e[_0x748a('0x13')][_0x748a('0x17')]||null:null,'limit':_0x41451e['options']?_0x41451e[_0x748a('0x13')][_0x748a('0x18')]||null:null})['then'](function(_0x47e406){logger[_0x748a('0x9')](_0x748a('0x19'),_0x41451e);logger[_0x748a('0xc')](_0x748a('0x19'),_0x41451e,JSON['stringify'](_0x47e406));_0x3108fc(_0x47e406);})[_0x748a('0x10')](function(_0x144d6f){logger[_0x748a('0xe')](_0x748a('0x19'),_0x144d6f[_0x748a('0xf')],_0x41451e);_0x4b984d(_0x36578d[_0x748a('0xe')](0x1f4,_0x144d6f[_0x748a('0xf')]));});});};
\ 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