Built motion from commit 06a208af.|2.6.26
[motion2.git] / server / api / voiceTransferReport / voiceTransferReport.rpc.js
index 9005655..6145257 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6997=['jayson/promise','client','then','request\x20sent','VoiceTransferReport,\x20%s,\x20%s,\x20%s','error','code','VoiceTransferReport,\x20%s,\x20%s','message','info','catch','CreateVoiceTransferReport','create','options','raw','debug','stringify','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x586c8b,_0x40a403){var _0xa1cdc5=function(_0x259a6c){while(--_0x259a6c){_0x586c8b['push'](_0x586c8b['shift']());}};_0xa1cdc5(++_0x40a403);}(_0x6997,0x71));var _0x7699=function(_0x4b6bcc,_0x2abddf){_0x4b6bcc=_0x4b6bcc-0x0;var _0x5ca61c=_0x6997[_0x4b6bcc];return _0x5ca61c;};'use strict';var _=require('lodash');var util=require(_0x7699('0x0'));var moment=require(_0x7699('0x1'));var BPromise=require('bluebird');var rs=require(_0x7699('0x2'));var fs=require('fs');var Redis=require(_0x7699('0x3'));var db=require(_0x7699('0x4'))['db'];var utils=require(_0x7699('0x5'));var logger=require(_0x7699('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x7699('0x7'));var client=jayson[_0x7699('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x9a48a5,_0x5f4d68,_0x5f3c3f){return new BPromise(function(_0x114d95,_0x30e868){return client['request'](_0x9a48a5,_0x5f3c3f)[_0x7699('0x9')](function(_0x52668e){logger['info']('VoiceTransferReport,\x20%s,\x20%s',_0x5f4d68,_0x7699('0xa'));logger['debug'](_0x7699('0xb'),_0x5f4d68,_0x7699('0xa'),JSON['stringify'](_0x52668e));if(_0x52668e[_0x7699('0xc')]){if(_0x52668e[_0x7699('0xc')][_0x7699('0xd')]===0x1f4){logger[_0x7699('0xc')](_0x7699('0xe'),_0x5f4d68,_0x52668e['error'][_0x7699('0xf')]);return _0x30e868(_0x52668e[_0x7699('0xc')]['message']);}logger['error'](_0x7699('0xe'),_0x5f4d68,_0x52668e[_0x7699('0xc')]['message']);return _0x114d95(_0x52668e[_0x7699('0xc')][_0x7699('0xf')]);}else{logger[_0x7699('0x10')](_0x7699('0xe'),_0x5f4d68,_0x7699('0xa'));_0x114d95(_0x52668e['result'][_0x7699('0xf')]);}})[_0x7699('0x11')](function(_0x348d71){logger[_0x7699('0xc')]('VoiceTransferReport,\x20%s,\x20%s',_0x5f4d68,_0x348d71);_0x30e868(_0x348d71);});});}exports[_0x7699('0x12')]=function(_0x2613e4){var _0x19d8de=this;return new Promise(function(_0x54f115,_0x1927af){return db['VoiceTransferReport'][_0x7699('0x13')](_0x2613e4['body'],{'raw':_0x2613e4['options']?_0x2613e4[_0x7699('0x14')][_0x7699('0x15')]===undefined?!![]:![]:!![]})['then'](function(_0x2d634e){logger['info'](_0x7699('0x12'),_0x2613e4);logger[_0x7699('0x16')](_0x7699('0x12'),_0x2613e4,JSON[_0x7699('0x17')](_0x2d634e));_0x54f115(_0x2d634e);})[_0x7699('0x11')](function(_0x473b6f){logger['error'](_0x7699('0x12'),_0x473b6f[_0x7699('0xf')],_0x2613e4);_0x1927af(_0x19d8de[_0x7699('0xc')](0x1f4,_0x473b6f[_0x7699('0xf')]));});});};
\ No newline at end of file
+var _0x82a1=['request','info','VoiceTransferReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','options','raw','then','CreateVoiceTransferReport','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','jayson/promise'];(function(_0x4477a8,_0x301586){var _0x236935=function(_0x2acfb8){while(--_0x2acfb8){_0x4477a8['push'](_0x4477a8['shift']());}};_0x236935(++_0x301586);}(_0x82a1,0x1c6));var _0x182a=function(_0x2d65ea,_0x359335){_0x2d65ea=_0x2d65ea-0x0;var _0x584532=_0x82a1[_0x2d65ea];return _0x584532;};'use strict';var _=require('lodash');var util=require(_0x182a('0x0'));var moment=require(_0x182a('0x1'));var BPromise=require(_0x182a('0x2'));var rs=require(_0x182a('0x3'));var fs=require('fs');var Redis=require(_0x182a('0x4'));var db=require(_0x182a('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x182a('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x182a('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x539882,_0x2cac23,_0x4b7767){return new BPromise(function(_0x5ea1e2,_0x55975b){return client[_0x182a('0x8')](_0x539882,_0x4b7767)['then'](function(_0x42ca6f){logger[_0x182a('0x9')](_0x182a('0xa'),_0x2cac23,_0x182a('0xb'));logger[_0x182a('0xc')]('VoiceTransferReport,\x20%s,\x20%s,\x20%s',_0x2cac23,_0x182a('0xb'),JSON[_0x182a('0xd')](_0x42ca6f));if(_0x42ca6f[_0x182a('0xe')]){if(_0x42ca6f[_0x182a('0xe')]['code']===0x1f4){logger['error'](_0x182a('0xa'),_0x2cac23,_0x42ca6f[_0x182a('0xe')]['message']);return _0x55975b(_0x42ca6f['error'][_0x182a('0xf')]);}logger[_0x182a('0xe')](_0x182a('0xa'),_0x2cac23,_0x42ca6f[_0x182a('0xe')][_0x182a('0xf')]);return _0x5ea1e2(_0x42ca6f[_0x182a('0xe')]['message']);}else{logger[_0x182a('0x9')](_0x182a('0xa'),_0x2cac23,_0x182a('0xb'));_0x5ea1e2(_0x42ca6f[_0x182a('0x10')][_0x182a('0xf')]);}})[_0x182a('0x11')](function(_0x3c3460){logger['error'](_0x182a('0xa'),_0x2cac23,_0x3c3460);_0x55975b(_0x3c3460);});});}exports['CreateVoiceTransferReport']=function(_0x5ddd00){var _0x234527=this;return new Promise(function(_0x267fb3,_0xd03173){return db['VoiceTransferReport']['create'](_0x5ddd00['body'],{'raw':_0x5ddd00['options']?_0x5ddd00[_0x182a('0x12')][_0x182a('0x13')]===undefined?!![]:![]:!![]})[_0x182a('0x14')](function(_0x1ed5ab){logger[_0x182a('0x9')]('CreateVoiceTransferReport',_0x5ddd00);logger['debug'](_0x182a('0x15'),_0x5ddd00,JSON[_0x182a('0xd')](_0x1ed5ab));_0x267fb3(_0x1ed5ab);})['catch'](function(_0x451bcd){logger['error'](_0x182a('0x15'),_0x451bcd[_0x182a('0xf')],_0x5ddd00);_0xd03173(_0x234527[_0x182a('0xe')](0x1f4,_0x451bcd[_0x182a('0xf')]));});});};
\ No newline at end of file