Built motion from commit 37e1ed56.|2.6.29
[motion2.git] / server / api / voiceCallReport / voiceCallReport.rpc.js
index 9409e3a..e95c0e8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfb9c=['CreateVoiceCallReport','create','body','UpdateVoiceCallReport','update','lodash','bluebird','randomstring','ioredis','../../mysqldb','jayson/promise','request','then','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','result','catch','GetVoiceCallReport','VoiceCallReport','raw','options','where','attributes','limit','include','map','model'];(function(_0x3fab66,_0x3193c8){var _0x181c4b=function(_0x20dd42){while(--_0x20dd42){_0x3fab66['push'](_0x3fab66['shift']());}};_0x181c4b(++_0x3193c8);}(_0xfb9c,0x89));var _0xcfb9=function(_0x426de2,_0x24acaf){_0x426de2=_0x426de2-0x0;var _0x1dbafc=_0xfb9c[_0x426de2];return _0x1dbafc;};'use strict';var _=require(_0xcfb9('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xcfb9('0x1'));var rs=require(_0xcfb9('0x2'));var fs=require('fs');var Redis=require(_0xcfb9('0x3'));var db=require(_0xcfb9('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xcfb9('0x5'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x271db7,_0xe8c006,_0x4f3d96){return new BPromise(function(_0x1369b5,_0x515800){return client[_0xcfb9('0x6')](_0x271db7,_0x4f3d96)[_0xcfb9('0x7')](function(_0x122e85){logger['info'](_0xcfb9('0x8'),_0xe8c006,_0xcfb9('0x9'));logger[_0xcfb9('0xa')]('VoiceCallReport,\x20%s,\x20%s,\x20%s',_0xe8c006,_0xcfb9('0x9'),JSON[_0xcfb9('0xb')](_0x122e85));if(_0x122e85[_0xcfb9('0xc')]){if(_0x122e85[_0xcfb9('0xc')][_0xcfb9('0xd')]===0x1f4){logger[_0xcfb9('0xc')](_0xcfb9('0x8'),_0xe8c006,_0x122e85[_0xcfb9('0xc')]['message']);return _0x515800(_0x122e85[_0xcfb9('0xc')][_0xcfb9('0xe')]);}logger[_0xcfb9('0xc')]('VoiceCallReport,\x20%s,\x20%s',_0xe8c006,_0x122e85[_0xcfb9('0xc')][_0xcfb9('0xe')]);return _0x1369b5(_0x122e85['error']['message']);}else{logger[_0xcfb9('0xf')]('VoiceCallReport,\x20%s,\x20%s',_0xe8c006,_0xcfb9('0x9'));_0x1369b5(_0x122e85[_0xcfb9('0x10')][_0xcfb9('0xe')]);}})[_0xcfb9('0x11')](function(_0x412e99){logger[_0xcfb9('0xc')](_0xcfb9('0x8'),_0xe8c006,_0x412e99);_0x515800(_0x412e99);});});}exports[_0xcfb9('0x12')]=function(_0x2e9a0c){var _0x12538f=this;return new Promise(function(_0x58703d,_0x1d6de0){return db[_0xcfb9('0x13')]['findAll']({'raw':_0x2e9a0c['options']?_0x2e9a0c['options'][_0xcfb9('0x14')]===undefined?!![]:![]:!![],'where':_0x2e9a0c['options']?_0x2e9a0c[_0xcfb9('0x15')][_0xcfb9('0x16')]||null:null,'attributes':_0x2e9a0c['options']?_0x2e9a0c[_0xcfb9('0x15')][_0xcfb9('0x17')]||null:null,'limit':_0x2e9a0c[_0xcfb9('0x15')]?_0x2e9a0c[_0xcfb9('0x15')][_0xcfb9('0x18')]||null:null,'include':_0x2e9a0c['options']?_0x2e9a0c[_0xcfb9('0x15')][_0xcfb9('0x19')]?_[_0xcfb9('0x1a')](_0x2e9a0c[_0xcfb9('0x15')][_0xcfb9('0x19')],function(_0x110864){return{'model':db[_0x110864[_0xcfb9('0x1b')]],'as':_0x110864['as'],'attributes':_0x110864['attributes'],'include':_0x110864[_0xcfb9('0x19')]?_[_0xcfb9('0x1a')](_0x110864[_0xcfb9('0x19')],function(_0x508b2f){return{'model':db[_0x508b2f['model']],'as':_0x508b2f['as'],'attributes':_0x508b2f[_0xcfb9('0x17')],'include':_0x508b2f[_0xcfb9('0x19')]?_[_0xcfb9('0x1a')](_0x508b2f['include'],function(_0x59e204){return{'model':db[_0x59e204['model']],'as':_0x59e204['as'],'attributes':_0x59e204[_0xcfb9('0x17')]};}):[]};}):[]};}):[]:[]})[_0xcfb9('0x7')](function(_0x4013a3){logger[_0xcfb9('0xf')]('GetVoiceCallReport',_0x2e9a0c);logger['debug'](_0xcfb9('0x12'),_0x2e9a0c,JSON[_0xcfb9('0xb')](_0x4013a3));_0x58703d(_0x4013a3);})[_0xcfb9('0x11')](function(_0x19225a){logger['error']('GetVoiceCallReport',_0x19225a['message'],_0x2e9a0c);_0x1d6de0(_0x12538f[_0xcfb9('0xc')](0x1f4,_0x19225a['message']));});});};exports[_0xcfb9('0x1c')]=function(_0x504493){var _0x2c8c95=this;return new Promise(function(_0x5bf7bd,_0x2f05bc){return db[_0xcfb9('0x13')][_0xcfb9('0x1d')](_0x504493[_0xcfb9('0x1e')],{'raw':_0x504493['options']?_0x504493[_0xcfb9('0x15')][_0xcfb9('0x14')]===undefined?!![]:![]:!![]})['then'](function(_0x62c48d){logger[_0xcfb9('0xf')](_0xcfb9('0x1c'),_0x504493);logger[_0xcfb9('0xa')](_0xcfb9('0x1c'),_0x504493,JSON['stringify'](_0x62c48d));_0x5bf7bd(_0x62c48d);})['catch'](function(_0x266952){logger[_0xcfb9('0xc')](_0xcfb9('0x1c'),_0x266952[_0xcfb9('0xe')],_0x504493);_0x2f05bc(_0x2c8c95['error'](0x1f4,_0x266952[_0xcfb9('0xe')]));});});};exports[_0xcfb9('0x1f')]=function(_0x1a48e0){var _0x3e8a9e=this;return new Promise(function(_0x3e1efa,_0x2d51ec){return db[_0xcfb9('0x13')][_0xcfb9('0x20')](_0x1a48e0[_0xcfb9('0x1e')],{'raw':_0x1a48e0[_0xcfb9('0x15')]?_0x1a48e0[_0xcfb9('0x15')][_0xcfb9('0x14')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1a48e0[_0xcfb9('0x15')]?_0x1a48e0[_0xcfb9('0x15')]['where']||null:null,'attributes':_0x1a48e0[_0xcfb9('0x15')]?_0x1a48e0[_0xcfb9('0x15')]['attributes']||null:null,'limit':_0x1a48e0[_0xcfb9('0x15')]?_0x1a48e0[_0xcfb9('0x15')][_0xcfb9('0x18')]||null:null})[_0xcfb9('0x7')](function(_0x2b6d5f){logger[_0xcfb9('0xf')](_0xcfb9('0x1f'),_0x1a48e0);logger[_0xcfb9('0xa')](_0xcfb9('0x1f'),_0x1a48e0,JSON['stringify'](_0x2b6d5f));_0x3e1efa(_0x2b6d5f);})[_0xcfb9('0x11')](function(_0x203e52){logger[_0xcfb9('0xc')]('UpdateVoiceCallReport',_0x203e52['message'],_0x1a48e0);_0x2d51ec(_0x3e8a9e['error'](0x1f4,_0x203e52[_0xcfb9('0xe')]));});});};
\ No newline at end of file
+var _0x8779=['message','result','GetVoiceCallReport','VoiceCallReport','findAll','options','attributes','limit','map','include','model','CreateVoiceCallReport','create','raw','catch','update','body','then','UpdateVoiceCallReport','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','info','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x12e918,_0x338697){var _0x2ddc83=function(_0x924cec){while(--_0x924cec){_0x12e918['push'](_0x12e918['shift']());}};_0x2ddc83(++_0x338697);}(_0x8779,0x14b));var _0x9877=function(_0x1566a7,_0x301ed7){_0x1566a7=_0x1566a7-0x0;var _0x4337bc=_0x8779[_0x1566a7];return _0x4337bc;};'use strict';var _=require('lodash');var util=require(_0x9877('0x0'));var moment=require(_0x9877('0x1'));var BPromise=require(_0x9877('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9877('0x3'));var db=require(_0x9877('0x4'))['db'];var utils=require(_0x9877('0x5'));var logger=require(_0x9877('0x6'))(_0x9877('0x7'));var config=require('../../config/environment');var jayson=require(_0x9877('0x8'));var client=jayson[_0x9877('0x9')][_0x9877('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x576bb4,_0x3b8b1b,_0x31c365){return new BPromise(function(_0x2bea2a,_0x42f432){return client[_0x9877('0xb')](_0x576bb4,_0x31c365)['then'](function(_0x281f18){logger[_0x9877('0xc')](_0x9877('0xd'),_0x3b8b1b,_0x9877('0xe'));logger[_0x9877('0xf')](_0x9877('0x10'),_0x3b8b1b,_0x9877('0xe'),JSON[_0x9877('0x11')](_0x281f18));if(_0x281f18[_0x9877('0x12')]){if(_0x281f18['error'][_0x9877('0x13')]===0x1f4){logger['error'](_0x9877('0xd'),_0x3b8b1b,_0x281f18[_0x9877('0x12')][_0x9877('0x14')]);return _0x42f432(_0x281f18['error'][_0x9877('0x14')]);}logger[_0x9877('0x12')]('VoiceCallReport,\x20%s,\x20%s',_0x3b8b1b,_0x281f18[_0x9877('0x12')][_0x9877('0x14')]);return _0x2bea2a(_0x281f18[_0x9877('0x12')][_0x9877('0x14')]);}else{logger[_0x9877('0xc')]('VoiceCallReport,\x20%s,\x20%s',_0x3b8b1b,'request\x20sent');_0x2bea2a(_0x281f18[_0x9877('0x15')]['message']);}})['catch'](function(_0x109fd3){logger['error'](_0x9877('0xd'),_0x3b8b1b,_0x109fd3);_0x42f432(_0x109fd3);});});}exports[_0x9877('0x16')]=function(_0x947f5f){var _0x2faeae=this;return new Promise(function(_0x4d4bb0,_0x557068){return db[_0x9877('0x17')][_0x9877('0x18')]({'raw':_0x947f5f['options']?_0x947f5f[_0x9877('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x947f5f[_0x9877('0x19')]?_0x947f5f[_0x9877('0x19')]['where']||null:null,'attributes':_0x947f5f[_0x9877('0x19')]?_0x947f5f[_0x9877('0x19')][_0x9877('0x1a')]||null:null,'limit':_0x947f5f[_0x9877('0x19')]?_0x947f5f[_0x9877('0x19')][_0x9877('0x1b')]||null:null,'include':_0x947f5f[_0x9877('0x19')]?_0x947f5f['options']['include']?_[_0x9877('0x1c')](_0x947f5f['options'][_0x9877('0x1d')],function(_0x2ca95e){return{'model':db[_0x2ca95e['model']],'as':_0x2ca95e['as'],'attributes':_0x2ca95e[_0x9877('0x1a')],'include':_0x2ca95e['include']?_['map'](_0x2ca95e['include'],function(_0x46588a){return{'model':db[_0x46588a['model']],'as':_0x46588a['as'],'attributes':_0x46588a[_0x9877('0x1a')],'include':_0x46588a[_0x9877('0x1d')]?_[_0x9877('0x1c')](_0x46588a[_0x9877('0x1d')],function(_0x1e9074){return{'model':db[_0x1e9074[_0x9877('0x1e')]],'as':_0x1e9074['as'],'attributes':_0x1e9074[_0x9877('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x25fb58){logger['info'](_0x9877('0x16'),_0x947f5f);logger['debug'](_0x9877('0x16'),_0x947f5f,JSON[_0x9877('0x11')](_0x25fb58));_0x4d4bb0(_0x25fb58);})['catch'](function(_0x1a5bcd){logger['error'](_0x9877('0x16'),_0x1a5bcd[_0x9877('0x14')],_0x947f5f);_0x557068(_0x2faeae[_0x9877('0x12')](0x1f4,_0x1a5bcd['message']));});});};exports[_0x9877('0x1f')]=function(_0x45f32c){var _0x3c3682=this;return new Promise(function(_0x446098,_0x2be3f9){return db[_0x9877('0x17')][_0x9877('0x20')](_0x45f32c['body'],{'raw':_0x45f32c['options']?_0x45f32c[_0x9877('0x19')][_0x9877('0x21')]===undefined?!![]:![]:!![]})['then'](function(_0x21f9d2){logger[_0x9877('0xc')](_0x9877('0x1f'),_0x45f32c);logger[_0x9877('0xf')](_0x9877('0x1f'),_0x45f32c,JSON[_0x9877('0x11')](_0x21f9d2));_0x446098(_0x21f9d2);})[_0x9877('0x22')](function(_0x409667){logger[_0x9877('0x12')](_0x9877('0x1f'),_0x409667[_0x9877('0x14')],_0x45f32c);_0x2be3f9(_0x3c3682[_0x9877('0x12')](0x1f4,_0x409667['message']));});});};exports['UpdateVoiceCallReport']=function(_0x251c51){var _0x1e8608=this;return new Promise(function(_0x186ff9,_0x3b59e6){return db['VoiceCallReport'][_0x9877('0x23')](_0x251c51[_0x9877('0x24')],{'raw':_0x251c51[_0x9877('0x19')]?_0x251c51[_0x9877('0x19')][_0x9877('0x21')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x251c51[_0x9877('0x19')]?_0x251c51[_0x9877('0x19')]['where']||null:null,'attributes':_0x251c51[_0x9877('0x19')]?_0x251c51['options']['attributes']||null:null,'limit':_0x251c51[_0x9877('0x19')]?_0x251c51[_0x9877('0x19')]['limit']||null:null})[_0x9877('0x25')](function(_0x844a2e){logger[_0x9877('0xc')](_0x9877('0x26'),_0x251c51);logger['debug']('UpdateVoiceCallReport',_0x251c51,JSON['stringify'](_0x844a2e));_0x186ff9(_0x844a2e);})[_0x9877('0x22')](function(_0x50ceff){logger[_0x9877('0x12')](_0x9877('0x26'),_0x50ceff[_0x9877('0x14')],_0x251c51);_0x3b59e6(_0x1e8608[_0x9877('0x12')](0x1f4,_0x50ceff['message']));});});};
\ No newline at end of file