Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / voiceCallReport / voiceCallReport.rpc.js
index 62b8c5a..dbd2414 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x004e=['CreateVoiceCallReport','create','body','UpdateVoiceCallReport','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','then','info','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceCallReport,\x20%s,\x20%s','message','request\x20sent','result','GetVoiceCallReport','VoiceCallReport','options','raw','where','limit','include','map','attributes','model','catch'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0x004e,0x9c));var _0xe004=function(_0x3ac661,_0xba5e99){_0x3ac661=_0x3ac661-0x0;var _0x1ef48c=_0x004e[_0x3ac661];return _0x1ef48c;};'use strict';var _=require(_0xe004('0x0'));var util=require(_0xe004('0x1'));var moment=require(_0xe004('0x2'));var BPromise=require(_0xe004('0x3'));var rs=require(_0xe004('0x4'));var fs=require('fs');var Redis=require(_0xe004('0x5'));var db=require(_0xe004('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xe004('0x7'));var config=require(_0xe004('0x8'));var jayson=require(_0xe004('0x9'));var client=jayson[_0xe004('0xa')][_0xe004('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2af9b3,_0x2937ac,_0x331712){return new BPromise(function(_0x50c497,_0x3b3490){return client['request'](_0x2af9b3,_0x331712)[_0xe004('0xc')](function(_0x5dfc38){logger[_0xe004('0xd')]('VoiceCallReport,\x20%s,\x20%s',_0x2937ac,'request\x20sent');logger[_0xe004('0xe')](_0xe004('0xf'),_0x2937ac,'request\x20sent',JSON[_0xe004('0x10')](_0x5dfc38));if(_0x5dfc38[_0xe004('0x11')]){if(_0x5dfc38['error'][_0xe004('0x12')]===0x1f4){logger['error'](_0xe004('0x13'),_0x2937ac,_0x5dfc38[_0xe004('0x11')][_0xe004('0x14')]);return _0x3b3490(_0x5dfc38[_0xe004('0x11')]['message']);}logger[_0xe004('0x11')](_0xe004('0x13'),_0x2937ac,_0x5dfc38[_0xe004('0x11')]['message']);return _0x50c497(_0x5dfc38['error'][_0xe004('0x14')]);}else{logger[_0xe004('0xd')](_0xe004('0x13'),_0x2937ac,_0xe004('0x15'));_0x50c497(_0x5dfc38[_0xe004('0x16')][_0xe004('0x14')]);}})['catch'](function(_0x51cbef){logger['error'](_0xe004('0x13'),_0x2937ac,_0x51cbef);_0x3b3490(_0x51cbef);});});}exports[_0xe004('0x17')]=function(_0x513c0a){var _0x41533e=this;return new Promise(function(_0x54bb43,_0x50b4e8){return db[_0xe004('0x18')]['findAll']({'raw':_0x513c0a[_0xe004('0x19')]?_0x513c0a[_0xe004('0x19')][_0xe004('0x1a')]===undefined?!![]:![]:!![],'where':_0x513c0a['options']?_0x513c0a[_0xe004('0x19')][_0xe004('0x1b')]||null:null,'attributes':_0x513c0a['options']?_0x513c0a[_0xe004('0x19')]['attributes']||null:null,'limit':_0x513c0a[_0xe004('0x19')]?_0x513c0a[_0xe004('0x19')][_0xe004('0x1c')]||null:null,'include':_0x513c0a[_0xe004('0x19')]?_0x513c0a[_0xe004('0x19')][_0xe004('0x1d')]?_[_0xe004('0x1e')](_0x513c0a['options'][_0xe004('0x1d')],function(_0x522362){return{'model':db[_0x522362['model']],'as':_0x522362['as'],'attributes':_0x522362[_0xe004('0x1f')],'include':_0x522362[_0xe004('0x1d')]?_['map'](_0x522362['include'],function(_0x587b48){return{'model':db[_0x587b48['model']],'as':_0x587b48['as'],'attributes':_0x587b48[_0xe004('0x1f')],'include':_0x587b48['include']?_[_0xe004('0x1e')](_0x587b48[_0xe004('0x1d')],function(_0xa52070){return{'model':db[_0xa52070[_0xe004('0x20')]],'as':_0xa52070['as'],'attributes':_0xa52070['attributes']};}):[]};}):[]};}):[]:[]})[_0xe004('0xc')](function(_0x34abed){logger[_0xe004('0xd')](_0xe004('0x17'),_0x513c0a);logger['debug'](_0xe004('0x17'),_0x513c0a,JSON[_0xe004('0x10')](_0x34abed));_0x54bb43(_0x34abed);})[_0xe004('0x21')](function(_0x212041){logger[_0xe004('0x11')](_0xe004('0x17'),_0x212041[_0xe004('0x14')],_0x513c0a);_0x50b4e8(_0x41533e[_0xe004('0x11')](0x1f4,_0x212041[_0xe004('0x14')]));});});};exports[_0xe004('0x22')]=function(_0x6c6092){var _0x307dbb=this;return new Promise(function(_0x16815c,_0x54c677){return db[_0xe004('0x18')][_0xe004('0x23')](_0x6c6092[_0xe004('0x24')],{'raw':_0x6c6092[_0xe004('0x19')]?_0x6c6092[_0xe004('0x19')][_0xe004('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x3b7fca){logger[_0xe004('0xd')]('CreateVoiceCallReport',_0x6c6092);logger['debug'](_0xe004('0x22'),_0x6c6092,JSON['stringify'](_0x3b7fca));_0x16815c(_0x3b7fca);})['catch'](function(_0x39a6f){logger[_0xe004('0x11')](_0xe004('0x22'),_0x39a6f[_0xe004('0x14')],_0x6c6092);_0x54c677(_0x307dbb[_0xe004('0x11')](0x1f4,_0x39a6f[_0xe004('0x14')]));});});};exports[_0xe004('0x25')]=function(_0x136ef7){var _0x5cd3ed=this;return new Promise(function(_0x268287,_0x44553c){return db[_0xe004('0x18')]['update'](_0x136ef7[_0xe004('0x24')],{'raw':_0x136ef7[_0xe004('0x19')]?_0x136ef7[_0xe004('0x19')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x136ef7['options']?_0x136ef7['options']['where']||null:null,'attributes':_0x136ef7[_0xe004('0x19')]?_0x136ef7[_0xe004('0x19')]['attributes']||null:null,'limit':_0x136ef7['options']?_0x136ef7[_0xe004('0x19')][_0xe004('0x1c')]||null:null})[_0xe004('0xc')](function(_0x1e9bac){logger[_0xe004('0xd')](_0xe004('0x25'),_0x136ef7);logger['debug'](_0xe004('0x25'),_0x136ef7,JSON[_0xe004('0x10')](_0x1e9bac));_0x268287(_0x1e9bac);})[_0xe004('0x21')](function(_0x54e6af){logger[_0xe004('0x11')]('UpdateVoiceCallReport',_0x54e6af[_0xe004('0x14')],_0x136ef7);_0x44553c(_0x5cd3ed[_0xe004('0x11')](0x1f4,_0x54e6af[_0xe004('0x14')]));});});};
\ No newline at end of file
+var _0xea15=['CreateVoiceCallReport','body','raw','update','UpdateVoiceCallReport','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','jayson/promise','client','http','request','then','info','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','GetVoiceCallReport','VoiceCallReport','findAll','options','where','attributes','limit','include','map','model'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0xea15,0xe3));var _0x5ea1=function(_0x127168,_0x2d3c4e){_0x127168=_0x127168-0x0;var _0x27e9a1=_0xea15[_0x127168];return _0x27e9a1;};'use strict';var _=require(_0x5ea1('0x0'));var util=require('util');var moment=require(_0x5ea1('0x1'));var BPromise=require(_0x5ea1('0x2'));var rs=require(_0x5ea1('0x3'));var fs=require('fs');var Redis=require(_0x5ea1('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x5ea1('0x5'));var logger=require('../../config/logger')(_0x5ea1('0x6'));var config=require('../../config/environment');var jayson=require(_0x5ea1('0x7'));var client=jayson[_0x5ea1('0x8')][_0x5ea1('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x56b8f2,_0x196cf2,_0x5a53d2){return new BPromise(function(_0x12d177,_0x3ca396){return client[_0x5ea1('0xa')](_0x56b8f2,_0x5a53d2)[_0x5ea1('0xb')](function(_0x1351e3){logger[_0x5ea1('0xc')](_0x5ea1('0xd'),_0x196cf2,_0x5ea1('0xe'));logger[_0x5ea1('0xf')](_0x5ea1('0x10'),_0x196cf2,_0x5ea1('0xe'),JSON[_0x5ea1('0x11')](_0x1351e3));if(_0x1351e3[_0x5ea1('0x12')]){if(_0x1351e3[_0x5ea1('0x12')]['code']===0x1f4){logger[_0x5ea1('0x12')](_0x5ea1('0xd'),_0x196cf2,_0x1351e3[_0x5ea1('0x12')][_0x5ea1('0x13')]);return _0x3ca396(_0x1351e3[_0x5ea1('0x12')][_0x5ea1('0x13')]);}logger[_0x5ea1('0x12')](_0x5ea1('0xd'),_0x196cf2,_0x1351e3['error'][_0x5ea1('0x13')]);return _0x12d177(_0x1351e3[_0x5ea1('0x12')]['message']);}else{logger['info']('VoiceCallReport,\x20%s,\x20%s',_0x196cf2,_0x5ea1('0xe'));_0x12d177(_0x1351e3[_0x5ea1('0x14')][_0x5ea1('0x13')]);}})[_0x5ea1('0x15')](function(_0xf175bc){logger[_0x5ea1('0x12')](_0x5ea1('0xd'),_0x196cf2,_0xf175bc);_0x3ca396(_0xf175bc);});});}exports[_0x5ea1('0x16')]=function(_0x5dc5cc){var _0x43a756=this;return new Promise(function(_0x1bd6b9,_0x5ef636){return db[_0x5ea1('0x17')][_0x5ea1('0x18')]({'raw':_0x5dc5cc['options']?_0x5dc5cc[_0x5ea1('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x5dc5cc['options']?_0x5dc5cc[_0x5ea1('0x19')][_0x5ea1('0x1a')]||null:null,'attributes':_0x5dc5cc['options']?_0x5dc5cc[_0x5ea1('0x19')][_0x5ea1('0x1b')]||null:null,'limit':_0x5dc5cc[_0x5ea1('0x19')]?_0x5dc5cc[_0x5ea1('0x19')][_0x5ea1('0x1c')]||null:null,'include':_0x5dc5cc[_0x5ea1('0x19')]?_0x5dc5cc[_0x5ea1('0x19')][_0x5ea1('0x1d')]?_[_0x5ea1('0x1e')](_0x5dc5cc[_0x5ea1('0x19')][_0x5ea1('0x1d')],function(_0x289543){return{'model':db[_0x289543[_0x5ea1('0x1f')]],'as':_0x289543['as'],'attributes':_0x289543['attributes'],'include':_0x289543[_0x5ea1('0x1d')]?_['map'](_0x289543[_0x5ea1('0x1d')],function(_0x1463de){return{'model':db[_0x1463de['model']],'as':_0x1463de['as'],'attributes':_0x1463de['attributes'],'include':_0x1463de[_0x5ea1('0x1d')]?_[_0x5ea1('0x1e')](_0x1463de[_0x5ea1('0x1d')],function(_0xf8824){return{'model':db[_0xf8824[_0x5ea1('0x1f')]],'as':_0xf8824['as'],'attributes':_0xf8824['attributes']};}):[]};}):[]};}):[]:[]})[_0x5ea1('0xb')](function(_0xaf0d00){logger['info'](_0x5ea1('0x16'),_0x5dc5cc);logger[_0x5ea1('0xf')](_0x5ea1('0x16'),_0x5dc5cc,JSON[_0x5ea1('0x11')](_0xaf0d00));_0x1bd6b9(_0xaf0d00);})['catch'](function(_0x29c576){logger[_0x5ea1('0x12')](_0x5ea1('0x16'),_0x29c576[_0x5ea1('0x13')],_0x5dc5cc);_0x5ef636(_0x43a756['error'](0x1f4,_0x29c576[_0x5ea1('0x13')]));});});};exports[_0x5ea1('0x20')]=function(_0x49ed23){var _0x44eb7c=this;return new Promise(function(_0x1b5def,_0x4a0139){return db['VoiceCallReport']['create'](_0x49ed23[_0x5ea1('0x21')],{'raw':_0x49ed23[_0x5ea1('0x19')]?_0x49ed23[_0x5ea1('0x19')][_0x5ea1('0x22')]===undefined?!![]:![]:!![]})['then'](function(_0x400feb){logger[_0x5ea1('0xc')](_0x5ea1('0x20'),_0x49ed23);logger[_0x5ea1('0xf')]('CreateVoiceCallReport',_0x49ed23,JSON[_0x5ea1('0x11')](_0x400feb));_0x1b5def(_0x400feb);})['catch'](function(_0x143a62){logger[_0x5ea1('0x12')](_0x5ea1('0x20'),_0x143a62[_0x5ea1('0x13')],_0x49ed23);_0x4a0139(_0x44eb7c['error'](0x1f4,_0x143a62[_0x5ea1('0x13')]));});});};exports['UpdateVoiceCallReport']=function(_0x2b24a1){var _0x3a17df=this;return new Promise(function(_0xf7fd1e,_0x3d2a1d){return db[_0x5ea1('0x17')][_0x5ea1('0x23')](_0x2b24a1[_0x5ea1('0x21')],{'raw':_0x2b24a1[_0x5ea1('0x19')]?_0x2b24a1[_0x5ea1('0x19')][_0x5ea1('0x22')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2b24a1[_0x5ea1('0x19')]?_0x2b24a1[_0x5ea1('0x19')][_0x5ea1('0x1a')]||null:null,'attributes':_0x2b24a1[_0x5ea1('0x19')]?_0x2b24a1[_0x5ea1('0x19')][_0x5ea1('0x1b')]||null:null,'limit':_0x2b24a1[_0x5ea1('0x19')]?_0x2b24a1['options'][_0x5ea1('0x1c')]||null:null})[_0x5ea1('0xb')](function(_0x24eb81){logger[_0x5ea1('0xc')](_0x5ea1('0x24'),_0x2b24a1);logger['debug'](_0x5ea1('0x24'),_0x2b24a1,JSON[_0x5ea1('0x11')](_0x24eb81));_0xf7fd1e(_0x24eb81);})[_0x5ea1('0x15')](function(_0x52d926){logger[_0x5ea1('0x12')](_0x5ea1('0x24'),_0x52d926[_0x5ea1('0x13')],_0x2b24a1);_0x3d2a1d(_0x3a17df[_0x5ea1('0x12')](0x1f4,_0x52d926[_0x5ea1('0x13')]));});});};
\ No newline at end of file