Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / voiceCallReport / voiceCallReport.rpc.js
index 28122cb..3429cde 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2d0e=['create','body','update','raw','UpdateVoiceCallReport','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetVoiceCallReport','options','where','attributes','include','map','model','CreateVoiceCallReport','VoiceCallReport'];(function(_0x18358a,_0x415717){var _0x350a86=function(_0x4fdab0){while(--_0x4fdab0){_0x18358a['push'](_0x18358a['shift']());}};_0x350a86(++_0x415717);}(_0x2d0e,0x77));var _0xe2d0=function(_0x4bd079,_0x2a81e0){_0x4bd079=_0x4bd079-0x0;var _0x122da9=_0x2d0e[_0x4bd079];return _0x122da9;};'use strict';var _=require(_0xe2d0('0x0'));var util=require(_0xe2d0('0x1'));var moment=require(_0xe2d0('0x2'));var BPromise=require(_0xe2d0('0x3'));var rs=require(_0xe2d0('0x4'));var fs=require('fs');var Redis=require(_0xe2d0('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xe2d0('0x6'))(_0xe2d0('0x7'));var config=require(_0xe2d0('0x8'));var jayson=require(_0xe2d0('0x9'));var client=jayson[_0xe2d0('0xa')][_0xe2d0('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5b5d62,_0x5377f1,_0xa80df){return new BPromise(function(_0x1c2b15,_0xed351d){return client['request'](_0x5b5d62,_0xa80df)[_0xe2d0('0xc')](function(_0x1c8637){logger[_0xe2d0('0xd')](_0xe2d0('0xe'),_0x5377f1,_0xe2d0('0xf'));logger[_0xe2d0('0x10')](_0xe2d0('0x11'),_0x5377f1,_0xe2d0('0xf'),JSON[_0xe2d0('0x12')](_0x1c8637));if(_0x1c8637[_0xe2d0('0x13')]){if(_0x1c8637['error'][_0xe2d0('0x14')]===0x1f4){logger[_0xe2d0('0x13')]('VoiceCallReport,\x20%s,\x20%s',_0x5377f1,_0x1c8637['error']['message']);return _0xed351d(_0x1c8637['error'][_0xe2d0('0x15')]);}logger[_0xe2d0('0x13')]('VoiceCallReport,\x20%s,\x20%s',_0x5377f1,_0x1c8637[_0xe2d0('0x13')][_0xe2d0('0x15')]);return _0x1c2b15(_0x1c8637['error'][_0xe2d0('0x15')]);}else{logger['info'](_0xe2d0('0xe'),_0x5377f1,_0xe2d0('0xf'));_0x1c2b15(_0x1c8637[_0xe2d0('0x16')][_0xe2d0('0x15')]);}})[_0xe2d0('0x17')](function(_0x29daf9){logger['error']('VoiceCallReport,\x20%s,\x20%s',_0x5377f1,_0x29daf9);_0xed351d(_0x29daf9);});});}exports[_0xe2d0('0x18')]=function(_0x34a357){var _0x20ff8f=this;return new Promise(function(_0xc04441,_0x1cbd47){return db['VoiceCallReport']['findAll']({'raw':_0x34a357[_0xe2d0('0x19')]?_0x34a357[_0xe2d0('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x34a357['options']?_0x34a357[_0xe2d0('0x19')][_0xe2d0('0x1a')]||null:null,'attributes':_0x34a357[_0xe2d0('0x19')]?_0x34a357[_0xe2d0('0x19')][_0xe2d0('0x1b')]||null:null,'limit':_0x34a357['options']?_0x34a357[_0xe2d0('0x19')]['limit']||null:null,'include':_0x34a357[_0xe2d0('0x19')]?_0x34a357[_0xe2d0('0x19')][_0xe2d0('0x1c')]?_[_0xe2d0('0x1d')](_0x34a357[_0xe2d0('0x19')]['include'],function(_0x55a118){return{'model':db[_0x55a118['model']],'as':_0x55a118['as'],'attributes':_0x55a118[_0xe2d0('0x1b')],'include':_0x55a118['include']?_[_0xe2d0('0x1d')](_0x55a118[_0xe2d0('0x1c')],function(_0x28ae6c){return{'model':db[_0x28ae6c[_0xe2d0('0x1e')]],'as':_0x28ae6c['as'],'attributes':_0x28ae6c['attributes'],'include':_0x28ae6c['include']?_[_0xe2d0('0x1d')](_0x28ae6c[_0xe2d0('0x1c')],function(_0x463ab3){return{'model':db[_0x463ab3[_0xe2d0('0x1e')]],'as':_0x463ab3['as'],'attributes':_0x463ab3['attributes']};}):[]};}):[]};}):[]:[]})[_0xe2d0('0xc')](function(_0x4f4b4e){logger[_0xe2d0('0xd')](_0xe2d0('0x18'),_0x34a357);logger[_0xe2d0('0x10')](_0xe2d0('0x18'),_0x34a357,JSON[_0xe2d0('0x12')](_0x4f4b4e));_0xc04441(_0x4f4b4e);})['catch'](function(_0x198459){logger[_0xe2d0('0x13')](_0xe2d0('0x18'),_0x198459['message'],_0x34a357);_0x1cbd47(_0x20ff8f[_0xe2d0('0x13')](0x1f4,_0x198459[_0xe2d0('0x15')]));});});};exports[_0xe2d0('0x1f')]=function(_0x27f2f9){var _0x3aa977=this;return new Promise(function(_0x10ec11,_0x45f4d4){return db[_0xe2d0('0x20')][_0xe2d0('0x21')](_0x27f2f9[_0xe2d0('0x22')],{'raw':_0x27f2f9[_0xe2d0('0x19')]?_0x27f2f9[_0xe2d0('0x19')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x28c439){logger['info'](_0xe2d0('0x1f'),_0x27f2f9);logger[_0xe2d0('0x10')]('CreateVoiceCallReport',_0x27f2f9,JSON['stringify'](_0x28c439));_0x10ec11(_0x28c439);})[_0xe2d0('0x17')](function(_0xd3d1b2){logger[_0xe2d0('0x13')](_0xe2d0('0x1f'),_0xd3d1b2['message'],_0x27f2f9);_0x45f4d4(_0x3aa977[_0xe2d0('0x13')](0x1f4,_0xd3d1b2[_0xe2d0('0x15')]));});});};exports['UpdateVoiceCallReport']=function(_0x53d5b6){var _0x41157c=this;return new Promise(function(_0x2ce094,_0x47f8e9){return db[_0xe2d0('0x20')][_0xe2d0('0x23')](_0x53d5b6[_0xe2d0('0x22')],{'raw':_0x53d5b6[_0xe2d0('0x19')]?_0x53d5b6[_0xe2d0('0x19')][_0xe2d0('0x24')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x53d5b6['options']?_0x53d5b6[_0xe2d0('0x19')][_0xe2d0('0x1a')]||null:null,'attributes':_0x53d5b6[_0xe2d0('0x19')]?_0x53d5b6[_0xe2d0('0x19')][_0xe2d0('0x1b')]||null:null,'limit':_0x53d5b6[_0xe2d0('0x19')]?_0x53d5b6[_0xe2d0('0x19')]['limit']||null:null})[_0xe2d0('0xc')](function(_0x21f15f){logger[_0xe2d0('0xd')](_0xe2d0('0x25'),_0x53d5b6);logger[_0xe2d0('0x10')](_0xe2d0('0x25'),_0x53d5b6,JSON[_0xe2d0('0x12')](_0x21f15f));_0x2ce094(_0x21f15f);})[_0xe2d0('0x17')](function(_0x1312a8){logger['error'](_0xe2d0('0x25'),_0x1312a8['message'],_0x53d5b6);_0x47f8e9(_0x41157c[_0xe2d0('0x13')](0x1f4,_0x1312a8['message']));});});};
\ No newline at end of file
+var _0x2c14=['../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetVoiceCallReport','VoiceCallReport','options','where','attributes','limit','include','map','model','CreateVoiceCallReport','create','body','UpdateVoiceCallReport','update','raw','bluebird','randomstring','../../mysqldb'];(function(_0x972b82,_0x527cc0){var _0x474f3e=function(_0x1861b2){while(--_0x1861b2){_0x972b82['push'](_0x972b82['shift']());}};_0x474f3e(++_0x527cc0);}(_0x2c14,0x91));var _0x42c1=function(_0x1ee058,_0x2dcd37){_0x1ee058=_0x1ee058-0x0;var _0x64048=_0x2c14[_0x1ee058];return _0x64048;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0x42c1('0x0'));var rs=require(_0x42c1('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x42c1('0x2'))['db'];var utils=require(_0x42c1('0x3'));var logger=require(_0x42c1('0x4'))('rpc');var config=require(_0x42c1('0x5'));var jayson=require(_0x42c1('0x6'));var client=jayson[_0x42c1('0x7')][_0x42c1('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x20c742,_0x28326a,_0x1bf9c6){return new BPromise(function(_0x143b74,_0x5794ea){return client[_0x42c1('0x9')](_0x20c742,_0x1bf9c6)[_0x42c1('0xa')](function(_0x36c389){logger[_0x42c1('0xb')](_0x42c1('0xc'),_0x28326a,_0x42c1('0xd'));logger[_0x42c1('0xe')](_0x42c1('0xf'),_0x28326a,_0x42c1('0xd'),JSON[_0x42c1('0x10')](_0x36c389));if(_0x36c389['error']){if(_0x36c389[_0x42c1('0x11')][_0x42c1('0x12')]===0x1f4){logger[_0x42c1('0x11')](_0x42c1('0xc'),_0x28326a,_0x36c389[_0x42c1('0x11')]['message']);return _0x5794ea(_0x36c389[_0x42c1('0x11')][_0x42c1('0x13')]);}logger[_0x42c1('0x11')](_0x42c1('0xc'),_0x28326a,_0x36c389[_0x42c1('0x11')][_0x42c1('0x13')]);return _0x143b74(_0x36c389[_0x42c1('0x11')]['message']);}else{logger['info']('VoiceCallReport,\x20%s,\x20%s',_0x28326a,_0x42c1('0xd'));_0x143b74(_0x36c389[_0x42c1('0x14')][_0x42c1('0x13')]);}})[_0x42c1('0x15')](function(_0x5a5924){logger[_0x42c1('0x11')](_0x42c1('0xc'),_0x28326a,_0x5a5924);_0x5794ea(_0x5a5924);});});}exports[_0x42c1('0x16')]=function(_0x4aa70e){var _0x5a6cc2=this;return new Promise(function(_0x56e2a3,_0x503db7){return db[_0x42c1('0x17')]['findAll']({'raw':_0x4aa70e['options']?_0x4aa70e[_0x42c1('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x4aa70e[_0x42c1('0x18')]?_0x4aa70e[_0x42c1('0x18')][_0x42c1('0x19')]||null:null,'attributes':_0x4aa70e[_0x42c1('0x18')]?_0x4aa70e[_0x42c1('0x18')][_0x42c1('0x1a')]||null:null,'limit':_0x4aa70e[_0x42c1('0x18')]?_0x4aa70e[_0x42c1('0x18')][_0x42c1('0x1b')]||null:null,'include':_0x4aa70e['options']?_0x4aa70e[_0x42c1('0x18')][_0x42c1('0x1c')]?_[_0x42c1('0x1d')](_0x4aa70e['options'][_0x42c1('0x1c')],function(_0x554c3a){return{'model':db[_0x554c3a['model']],'as':_0x554c3a['as'],'attributes':_0x554c3a[_0x42c1('0x1a')],'include':_0x554c3a[_0x42c1('0x1c')]?_['map'](_0x554c3a['include'],function(_0x2352bd){return{'model':db[_0x2352bd[_0x42c1('0x1e')]],'as':_0x2352bd['as'],'attributes':_0x2352bd[_0x42c1('0x1a')],'include':_0x2352bd['include']?_['map'](_0x2352bd[_0x42c1('0x1c')],function(_0x23b82c){return{'model':db[_0x23b82c[_0x42c1('0x1e')]],'as':_0x23b82c['as'],'attributes':_0x23b82c[_0x42c1('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x44dd11){logger[_0x42c1('0xb')](_0x42c1('0x16'),_0x4aa70e);logger[_0x42c1('0xe')](_0x42c1('0x16'),_0x4aa70e,JSON[_0x42c1('0x10')](_0x44dd11));_0x56e2a3(_0x44dd11);})[_0x42c1('0x15')](function(_0x17a517){logger[_0x42c1('0x11')]('GetVoiceCallReport',_0x17a517[_0x42c1('0x13')],_0x4aa70e);_0x503db7(_0x5a6cc2[_0x42c1('0x11')](0x1f4,_0x17a517[_0x42c1('0x13')]));});});};exports[_0x42c1('0x1f')]=function(_0x42ba6e){var _0x23932c=this;return new Promise(function(_0x40d75c,_0x1407cd){return db[_0x42c1('0x17')][_0x42c1('0x20')](_0x42ba6e[_0x42c1('0x21')],{'raw':_0x42ba6e['options']?_0x42ba6e['options']['raw']===undefined?!![]:![]:!![]})[_0x42c1('0xa')](function(_0x5deeec){logger[_0x42c1('0xb')](_0x42c1('0x1f'),_0x42ba6e);logger[_0x42c1('0xe')](_0x42c1('0x1f'),_0x42ba6e,JSON[_0x42c1('0x10')](_0x5deeec));_0x40d75c(_0x5deeec);})['catch'](function(_0x413f65){logger[_0x42c1('0x11')](_0x42c1('0x1f'),_0x413f65[_0x42c1('0x13')],_0x42ba6e);_0x1407cd(_0x23932c[_0x42c1('0x11')](0x1f4,_0x413f65[_0x42c1('0x13')]));});});};exports[_0x42c1('0x22')]=function(_0x112f28){var _0x297c57=this;return new Promise(function(_0x27d9e8,_0x20b2b5){return db['VoiceCallReport'][_0x42c1('0x23')](_0x112f28[_0x42c1('0x21')],{'raw':_0x112f28[_0x42c1('0x18')]?_0x112f28['options'][_0x42c1('0x24')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x112f28[_0x42c1('0x18')]?_0x112f28[_0x42c1('0x18')][_0x42c1('0x19')]||null:null,'attributes':_0x112f28[_0x42c1('0x18')]?_0x112f28[_0x42c1('0x18')]['attributes']||null:null,'limit':_0x112f28[_0x42c1('0x18')]?_0x112f28[_0x42c1('0x18')][_0x42c1('0x1b')]||null:null})[_0x42c1('0xa')](function(_0x421366){logger['info'](_0x42c1('0x22'),_0x112f28);logger['debug'](_0x42c1('0x22'),_0x112f28,JSON[_0x42c1('0x10')](_0x421366));_0x27d9e8(_0x421366);})['catch'](function(_0x59cbb4){logger['error'](_0x42c1('0x22'),_0x59cbb4[_0x42c1('0x13')],_0x112f28);_0x20b2b5(_0x297c57[_0x42c1('0x11')](0x1f4,_0x59cbb4[_0x42c1('0x13')]));});});};
\ No newline at end of file