Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / smsQueueReport / smsQueueReport.rpc.js
index 76034aa..d39787a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x435c=['options','raw','CreateSmsQueueReport','stringify','SmsQueueReport','update','where','attributes','limit','UpdateSmsQueueReport','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','SmsQueueReport,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info','result','catch','body'];(function(_0xc51a11,_0x3a217b){var _0x11756f=function(_0x1a5bb0){while(--_0x1a5bb0){_0xc51a11['push'](_0xc51a11['shift']());}};_0x11756f(++_0x3a217b);}(_0x435c,0x1d8));var _0xc435=function(_0x487b0c,_0x14ff74){_0x487b0c=_0x487b0c-0x0;var _0x1adbdc=_0x435c[_0x487b0c];return _0x1adbdc;};'use strict';var _=require('lodash');var util=require(_0xc435('0x0'));var moment=require(_0xc435('0x1'));var BPromise=require('bluebird');var rs=require(_0xc435('0x2'));var fs=require('fs');var Redis=require(_0xc435('0x3'));var db=require(_0xc435('0x4'))['db'];var utils=require(_0xc435('0x5'));var logger=require('../../config/logger')(_0xc435('0x6'));var config=require(_0xc435('0x7'));var jayson=require(_0xc435('0x8'));var client=jayson[_0xc435('0x9')][_0xc435('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x401c2f,_0x468f27,_0xad1958){return new BPromise(function(_0x4c0228,_0x11be65){return client[_0xc435('0xb')](_0x401c2f,_0xad1958)[_0xc435('0xc')](function(_0x1a2adc){logger['info'](_0xc435('0xd'),_0x468f27,_0xc435('0xe'));logger[_0xc435('0xf')]('SmsQueueReport,\x20%s,\x20%s,\x20%s',_0x468f27,'request\x20sent',JSON['stringify'](_0x1a2adc));if(_0x1a2adc[_0xc435('0x10')]){if(_0x1a2adc[_0xc435('0x10')][_0xc435('0x11')]===0x1f4){logger[_0xc435('0x10')](_0xc435('0xd'),_0x468f27,_0x1a2adc[_0xc435('0x10')][_0xc435('0x12')]);return _0x11be65(_0x1a2adc[_0xc435('0x10')][_0xc435('0x12')]);}logger[_0xc435('0x10')]('SmsQueueReport,\x20%s,\x20%s',_0x468f27,_0x1a2adc[_0xc435('0x10')][_0xc435('0x12')]);return _0x4c0228(_0x1a2adc[_0xc435('0x10')][_0xc435('0x12')]);}else{logger[_0xc435('0x13')](_0xc435('0xd'),_0x468f27,_0xc435('0xe'));_0x4c0228(_0x1a2adc[_0xc435('0x14')][_0xc435('0x12')]);}})[_0xc435('0x15')](function(_0x3ffdbe){logger[_0xc435('0x10')](_0xc435('0xd'),_0x468f27,_0x3ffdbe);_0x11be65(_0x3ffdbe);});});}exports['CreateSmsQueueReport']=function(_0x460a43){var _0x5daeee=this;return new Promise(function(_0x307558,_0x14a7ac){return db['SmsQueueReport']['create'](_0x460a43[_0xc435('0x16')],{'raw':_0x460a43[_0xc435('0x17')]?_0x460a43[_0xc435('0x17')][_0xc435('0x18')]===undefined?!![]:![]:!![]})[_0xc435('0xc')](function(_0x51be19){logger[_0xc435('0x13')](_0xc435('0x19'),_0x460a43);logger[_0xc435('0xf')](_0xc435('0x19'),_0x460a43,JSON[_0xc435('0x1a')](_0x51be19));_0x307558(_0x51be19);})[_0xc435('0x15')](function(_0x23c5a0){logger[_0xc435('0x10')]('CreateSmsQueueReport',_0x23c5a0[_0xc435('0x12')],_0x460a43);_0x14a7ac(_0x5daeee[_0xc435('0x10')](0x1f4,_0x23c5a0[_0xc435('0x12')]));});});};exports['UpdateSmsQueueReport']=function(_0x3d6468){var _0x2dc555=this;return new Promise(function(_0x54a27b,_0x2f43f6){return db[_0xc435('0x1b')][_0xc435('0x1c')](_0x3d6468[_0xc435('0x16')],{'raw':_0x3d6468[_0xc435('0x17')]?_0x3d6468['options'][_0xc435('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3d6468[_0xc435('0x17')]?_0x3d6468[_0xc435('0x17')][_0xc435('0x1d')]||null:null,'attributes':_0x3d6468['options']?_0x3d6468[_0xc435('0x17')][_0xc435('0x1e')]||null:null,'limit':_0x3d6468[_0xc435('0x17')]?_0x3d6468['options'][_0xc435('0x1f')]||null:null})[_0xc435('0xc')](function(_0x4ae9d9){logger[_0xc435('0x13')](_0xc435('0x20'),_0x3d6468);logger[_0xc435('0xf')](_0xc435('0x20'),_0x3d6468,JSON[_0xc435('0x1a')](_0x4ae9d9));_0x54a27b(_0x4ae9d9);})['catch'](function(_0x16f248){logger[_0xc435('0x10')](_0xc435('0x20'),_0x16f248[_0xc435('0x12')],_0x3d6468);_0x2f43f6(_0x2dc555[_0xc435('0x10')](0x1f4,_0x16f248['message']));});});};
\ 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