Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / smsQueueReport / smsQueueReport.rpc.js
index f5caa77..b7ec0f8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1faa=['SmsQueueReport,\x20%s,\x20%s','message','result','catch','CreateSmsQueueReport','SmsQueueReport','create','body','options','raw','UpdateSmsQueueReport','update','where','attributes','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','stringify','error'];(function(_0x2ce372,_0x249815){var _0x5ae5aa=function(_0x17ba14){while(--_0x17ba14){_0x2ce372['push'](_0x2ce372['shift']());}};_0x5ae5aa(++_0x249815);}(_0x1faa,0x16d));var _0xa1fa=function(_0x4bced0,_0x165e70){_0x4bced0=_0x4bced0-0x0;var _0x550879=_0x1faa[_0x4bced0];return _0x550879;};'use strict';var _=require(_0xa1fa('0x0'));var util=require(_0xa1fa('0x1'));var moment=require(_0xa1fa('0x2'));var BPromise=require(_0xa1fa('0x3'));var rs=require(_0xa1fa('0x4'));var fs=require('fs');var Redis=require(_0xa1fa('0x5'));var db=require(_0xa1fa('0x6'))['db'];var utils=require(_0xa1fa('0x7'));var logger=require(_0xa1fa('0x8'))('rpc');var config=require(_0xa1fa('0x9'));var jayson=require(_0xa1fa('0xa'));var client=jayson[_0xa1fa('0xb')][_0xa1fa('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x4ec17a,_0x261678,_0x56ba3a){return new BPromise(function(_0x21ba00,_0x3823d8){return client[_0xa1fa('0xd')](_0x4ec17a,_0x56ba3a)[_0xa1fa('0xe')](function(_0x2cf9f4){logger[_0xa1fa('0xf')]('SmsQueueReport,\x20%s,\x20%s',_0x261678,_0xa1fa('0x10'));logger[_0xa1fa('0x11')]('SmsQueueReport,\x20%s,\x20%s,\x20%s',_0x261678,_0xa1fa('0x10'),JSON[_0xa1fa('0x12')](_0x2cf9f4));if(_0x2cf9f4['error']){if(_0x2cf9f4['error']['code']===0x1f4){logger[_0xa1fa('0x13')](_0xa1fa('0x14'),_0x261678,_0x2cf9f4['error']['message']);return _0x3823d8(_0x2cf9f4['error'][_0xa1fa('0x15')]);}logger[_0xa1fa('0x13')](_0xa1fa('0x14'),_0x261678,_0x2cf9f4['error']['message']);return _0x21ba00(_0x2cf9f4[_0xa1fa('0x13')][_0xa1fa('0x15')]);}else{logger[_0xa1fa('0xf')](_0xa1fa('0x14'),_0x261678,_0xa1fa('0x10'));_0x21ba00(_0x2cf9f4[_0xa1fa('0x16')]['message']);}})[_0xa1fa('0x17')](function(_0x4e53fc){logger[_0xa1fa('0x13')](_0xa1fa('0x14'),_0x261678,_0x4e53fc);_0x3823d8(_0x4e53fc);});});}exports[_0xa1fa('0x18')]=function(_0x44033a){var _0x2a8424=this;return new Promise(function(_0xb97ef2,_0x2ec64c){return db[_0xa1fa('0x19')][_0xa1fa('0x1a')](_0x44033a[_0xa1fa('0x1b')],{'raw':_0x44033a['options']?_0x44033a[_0xa1fa('0x1c')][_0xa1fa('0x1d')]===undefined?!![]:![]:!![]})[_0xa1fa('0xe')](function(_0x57912a){logger[_0xa1fa('0xf')](_0xa1fa('0x18'),_0x44033a);logger[_0xa1fa('0x11')](_0xa1fa('0x18'),_0x44033a,JSON[_0xa1fa('0x12')](_0x57912a));_0xb97ef2(_0x57912a);})['catch'](function(_0x5acf2a){logger[_0xa1fa('0x13')](_0xa1fa('0x18'),_0x5acf2a[_0xa1fa('0x15')],_0x44033a);_0x2ec64c(_0x2a8424[_0xa1fa('0x13')](0x1f4,_0x5acf2a[_0xa1fa('0x15')]));});});};exports[_0xa1fa('0x1e')]=function(_0x445b2a){var _0x5c9d3f=this;return new Promise(function(_0x1685a6,_0x2c6567){return db[_0xa1fa('0x19')][_0xa1fa('0x1f')](_0x445b2a['body'],{'raw':_0x445b2a[_0xa1fa('0x1c')]?_0x445b2a[_0xa1fa('0x1c')][_0xa1fa('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x445b2a['options']?_0x445b2a[_0xa1fa('0x1c')][_0xa1fa('0x20')]||null:null,'attributes':_0x445b2a['options']?_0x445b2a[_0xa1fa('0x1c')][_0xa1fa('0x21')]||null:null,'limit':_0x445b2a['options']?_0x445b2a[_0xa1fa('0x1c')][_0xa1fa('0x22')]||null:null})['then'](function(_0x2f7a1f){logger[_0xa1fa('0xf')]('UpdateSmsQueueReport',_0x445b2a);logger[_0xa1fa('0x11')](_0xa1fa('0x1e'),_0x445b2a,JSON[_0xa1fa('0x12')](_0x2f7a1f));_0x1685a6(_0x2f7a1f);})[_0xa1fa('0x17')](function(_0x3733a2){logger['error'](_0xa1fa('0x1e'),_0x3733a2['message'],_0x445b2a);_0x2c6567(_0x5c9d3f[_0xa1fa('0x13')](0x1f4,_0x3733a2[_0xa1fa('0x15')]));});});};
\ No newline at end of file
+var _0x7a10=['info','catch','CreateSmsQueueReport','SmsQueueReport','create','body','options','UpdateSmsQueueReport','raw','where','attributes','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','request\x20sent','debug','SmsQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','SmsQueueReport,\x20%s,\x20%s','message'];(function(_0x22ddc2,_0x5c9c6d){var _0x45c534=function(_0x2bc0ab){while(--_0x2bc0ab){_0x22ddc2['push'](_0x22ddc2['shift']());}};_0x45c534(++_0x5c9c6d);}(_0x7a10,0x1eb));var _0x07a1=function(_0x16a6fe,_0x5865b5){_0x16a6fe=_0x16a6fe-0x0;var _0x367d5f=_0x7a10[_0x16a6fe];return _0x367d5f;};'use strict';var _=require('lodash');var util=require(_0x07a1('0x0'));var moment=require(_0x07a1('0x1'));var BPromise=require(_0x07a1('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x07a1('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x07a1('0x4'));var logger=require(_0x07a1('0x5'))(_0x07a1('0x6'));var config=require(_0x07a1('0x7'));var jayson=require(_0x07a1('0x8'));var client=jayson[_0x07a1('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5a9d9e,_0x45b702,_0x265dc0){return new BPromise(function(_0x2c6e70,_0xf05a9f){return client['request'](_0x5a9d9e,_0x265dc0)[_0x07a1('0xa')](function(_0x2f8664){logger['info']('SmsQueueReport,\x20%s,\x20%s',_0x45b702,_0x07a1('0xb'));logger[_0x07a1('0xc')](_0x07a1('0xd'),_0x45b702,_0x07a1('0xb'),JSON[_0x07a1('0xe')](_0x2f8664));if(_0x2f8664['error']){if(_0x2f8664[_0x07a1('0xf')][_0x07a1('0x10')]===0x1f4){logger[_0x07a1('0xf')](_0x07a1('0x11'),_0x45b702,_0x2f8664[_0x07a1('0xf')]['message']);return _0xf05a9f(_0x2f8664[_0x07a1('0xf')]['message']);}logger[_0x07a1('0xf')]('SmsQueueReport,\x20%s,\x20%s',_0x45b702,_0x2f8664['error'][_0x07a1('0x12')]);return _0x2c6e70(_0x2f8664[_0x07a1('0xf')]['message']);}else{logger[_0x07a1('0x13')]('SmsQueueReport,\x20%s,\x20%s',_0x45b702,_0x07a1('0xb'));_0x2c6e70(_0x2f8664['result']['message']);}})[_0x07a1('0x14')](function(_0x211d7c){logger['error'](_0x07a1('0x11'),_0x45b702,_0x211d7c);_0xf05a9f(_0x211d7c);});});}exports[_0x07a1('0x15')]=function(_0x24a01c){var _0x2c1690=this;return new Promise(function(_0x121d14,_0x1715bf){return db[_0x07a1('0x16')][_0x07a1('0x17')](_0x24a01c[_0x07a1('0x18')],{'raw':_0x24a01c[_0x07a1('0x19')]?_0x24a01c[_0x07a1('0x19')]['raw']===undefined?!![]:![]:!![]})[_0x07a1('0xa')](function(_0x446175){logger['info']('CreateSmsQueueReport',_0x24a01c);logger[_0x07a1('0xc')]('CreateSmsQueueReport',_0x24a01c,JSON[_0x07a1('0xe')](_0x446175));_0x121d14(_0x446175);})[_0x07a1('0x14')](function(_0x48720e){logger['error'](_0x07a1('0x15'),_0x48720e[_0x07a1('0x12')],_0x24a01c);_0x1715bf(_0x2c1690[_0x07a1('0xf')](0x1f4,_0x48720e[_0x07a1('0x12')]));});});};exports[_0x07a1('0x1a')]=function(_0x464816){var _0x151f18=this;return new Promise(function(_0x20c4e4,_0x49c9af){return db['SmsQueueReport']['update'](_0x464816['body'],{'raw':_0x464816[_0x07a1('0x19')]?_0x464816[_0x07a1('0x19')][_0x07a1('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x464816[_0x07a1('0x19')]?_0x464816['options'][_0x07a1('0x1c')]||null:null,'attributes':_0x464816[_0x07a1('0x19')]?_0x464816['options'][_0x07a1('0x1d')]||null:null,'limit':_0x464816[_0x07a1('0x19')]?_0x464816[_0x07a1('0x19')]['limit']||null:null})[_0x07a1('0xa')](function(_0x16808e){logger[_0x07a1('0x13')](_0x07a1('0x1a'),_0x464816);logger[_0x07a1('0xc')]('UpdateSmsQueueReport',_0x464816,JSON[_0x07a1('0xe')](_0x16808e));_0x20c4e4(_0x16808e);})[_0x07a1('0x14')](function(_0x5b4a33){logger[_0x07a1('0xf')]('UpdateSmsQueueReport',_0x5b4a33['message'],_0x464816);_0x49c9af(_0x151f18['error'](0x1f4,_0x5b4a33['message']));});});};
\ No newline at end of file