Built motion from commit f25620e4.|2.6.30
[motion2.git] / server / api / voiceCallReport / voiceCallReport.rpc.js
index e8a3cfc..8b10d3c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb5b6=['CreateVoiceCallReport','VoiceCallReport','create','body','update','UpdateVoiceCallReport','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','VoiceCallReport,\x20%s,\x20%s','VoiceCallReport,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','info','result','catch','GetVoiceCallReport','options','raw','where','attributes','limit','include','map','model','debug','stringify'];(function(_0x283127,_0x54d4d5){var _0x43da5d=function(_0x10947f){while(--_0x10947f){_0x283127['push'](_0x283127['shift']());}};_0x43da5d(++_0x54d4d5);}(_0xb5b6,0x14e));var _0x6b5b=function(_0x34166c,_0xd53d21){_0x34166c=_0x34166c-0x0;var _0x210bf7=_0xb5b6[_0x34166c];return _0x210bf7;};'use strict';var _=require(_0x6b5b('0x0'));var util=require(_0x6b5b('0x1'));var moment=require(_0x6b5b('0x2'));var BPromise=require(_0x6b5b('0x3'));var rs=require(_0x6b5b('0x4'));var fs=require('fs');var Redis=require(_0x6b5b('0x5'));var db=require(_0x6b5b('0x6'))['db'];var utils=require(_0x6b5b('0x7'));var logger=require(_0x6b5b('0x8'))(_0x6b5b('0x9'));var config=require(_0x6b5b('0xa'));var jayson=require(_0x6b5b('0xb'));var client=jayson[_0x6b5b('0xc')][_0x6b5b('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x1d06a9,_0x5ed7ee,_0x1e366b){return new BPromise(function(_0xe6c0a1,_0x5898bb){return client[_0x6b5b('0xe')](_0x1d06a9,_0x1e366b)[_0x6b5b('0xf')](function(_0x304a66){logger['info'](_0x6b5b('0x10'),_0x5ed7ee,'request\x20sent');logger['debug'](_0x6b5b('0x11'),_0x5ed7ee,_0x6b5b('0x12'),JSON['stringify'](_0x304a66));if(_0x304a66[_0x6b5b('0x13')]){if(_0x304a66[_0x6b5b('0x13')]['code']===0x1f4){logger['error'](_0x6b5b('0x10'),_0x5ed7ee,_0x304a66[_0x6b5b('0x13')][_0x6b5b('0x14')]);return _0x5898bb(_0x304a66[_0x6b5b('0x13')][_0x6b5b('0x14')]);}logger[_0x6b5b('0x13')](_0x6b5b('0x10'),_0x5ed7ee,_0x304a66['error']['message']);return _0xe6c0a1(_0x304a66[_0x6b5b('0x13')]['message']);}else{logger[_0x6b5b('0x15')](_0x6b5b('0x10'),_0x5ed7ee,_0x6b5b('0x12'));_0xe6c0a1(_0x304a66[_0x6b5b('0x16')][_0x6b5b('0x14')]);}})[_0x6b5b('0x17')](function(_0x162433){logger[_0x6b5b('0x13')](_0x6b5b('0x10'),_0x5ed7ee,_0x162433);_0x5898bb(_0x162433);});});}exports[_0x6b5b('0x18')]=function(_0x47420f){var _0x227638=this;return new Promise(function(_0x41478d,_0x4fd44e){return db['VoiceCallReport']['findAll']({'raw':_0x47420f[_0x6b5b('0x19')]?_0x47420f['options'][_0x6b5b('0x1a')]===undefined?!![]:![]:!![],'where':_0x47420f[_0x6b5b('0x19')]?_0x47420f['options'][_0x6b5b('0x1b')]||null:null,'attributes':_0x47420f[_0x6b5b('0x19')]?_0x47420f['options'][_0x6b5b('0x1c')]||null:null,'limit':_0x47420f['options']?_0x47420f['options'][_0x6b5b('0x1d')]||null:null,'include':_0x47420f[_0x6b5b('0x19')]?_0x47420f['options'][_0x6b5b('0x1e')]?_[_0x6b5b('0x1f')](_0x47420f[_0x6b5b('0x19')]['include'],function(_0x5b98b8){return{'model':db[_0x5b98b8[_0x6b5b('0x20')]],'as':_0x5b98b8['as'],'attributes':_0x5b98b8[_0x6b5b('0x1c')],'include':_0x5b98b8['include']?_[_0x6b5b('0x1f')](_0x5b98b8[_0x6b5b('0x1e')],function(_0x1296de){return{'model':db[_0x1296de[_0x6b5b('0x20')]],'as':_0x1296de['as'],'attributes':_0x1296de[_0x6b5b('0x1c')],'include':_0x1296de[_0x6b5b('0x1e')]?_['map'](_0x1296de['include'],function(_0x3c99d4){return{'model':db[_0x3c99d4[_0x6b5b('0x20')]],'as':_0x3c99d4['as'],'attributes':_0x3c99d4['attributes']};}):[]};}):[]};}):[]:[]})[_0x6b5b('0xf')](function(_0x1ae5e5){logger['info'](_0x6b5b('0x18'),_0x47420f);logger[_0x6b5b('0x21')](_0x6b5b('0x18'),_0x47420f,JSON[_0x6b5b('0x22')](_0x1ae5e5));_0x41478d(_0x1ae5e5);})[_0x6b5b('0x17')](function(_0x1f6230){logger[_0x6b5b('0x13')]('GetVoiceCallReport',_0x1f6230[_0x6b5b('0x14')],_0x47420f);_0x4fd44e(_0x227638[_0x6b5b('0x13')](0x1f4,_0x1f6230[_0x6b5b('0x14')]));});});};exports[_0x6b5b('0x23')]=function(_0x35b50f){var _0x325f6c=this;return new Promise(function(_0x488d88,_0x2a413a){return db[_0x6b5b('0x24')][_0x6b5b('0x25')](_0x35b50f[_0x6b5b('0x26')],{'raw':_0x35b50f['options']?_0x35b50f[_0x6b5b('0x19')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0xea8fe5){logger[_0x6b5b('0x15')](_0x6b5b('0x23'),_0x35b50f);logger[_0x6b5b('0x21')]('CreateVoiceCallReport',_0x35b50f,JSON[_0x6b5b('0x22')](_0xea8fe5));_0x488d88(_0xea8fe5);})[_0x6b5b('0x17')](function(_0xad080a){logger['error'](_0x6b5b('0x23'),_0xad080a[_0x6b5b('0x14')],_0x35b50f);_0x2a413a(_0x325f6c[_0x6b5b('0x13')](0x1f4,_0xad080a[_0x6b5b('0x14')]));});});};exports['UpdateVoiceCallReport']=function(_0x4fc59d){var _0xc3153a=this;return new Promise(function(_0x28c4a1,_0xb93708){return db['VoiceCallReport'][_0x6b5b('0x27')](_0x4fc59d['body'],{'raw':_0x4fc59d[_0x6b5b('0x19')]?_0x4fc59d[_0x6b5b('0x19')][_0x6b5b('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4fc59d[_0x6b5b('0x19')]?_0x4fc59d['options'][_0x6b5b('0x1b')]||null:null,'attributes':_0x4fc59d['options']?_0x4fc59d[_0x6b5b('0x19')][_0x6b5b('0x1c')]||null:null,'limit':_0x4fc59d[_0x6b5b('0x19')]?_0x4fc59d[_0x6b5b('0x19')][_0x6b5b('0x1d')]||null:null})[_0x6b5b('0xf')](function(_0x283196){logger['info'](_0x6b5b('0x28'),_0x4fc59d);logger[_0x6b5b('0x21')](_0x6b5b('0x28'),_0x4fc59d,JSON[_0x6b5b('0x22')](_0x283196));_0x28c4a1(_0x283196);})[_0x6b5b('0x17')](function(_0x6ac05a){logger[_0x6b5b('0x13')](_0x6b5b('0x28'),_0x6ac05a[_0x6b5b('0x14')],_0x4fc59d);_0xb93708(_0xc3153a['error'](0x1f4,_0x6ac05a['message']));});});};
\ No newline at end of file
+var _0xac81=['UpdateVoiceCallReport','update','lodash','util','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','VoiceCallReport,\x20%s,\x20%s','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','VoiceCallReport','findAll','options','raw','where','attributes','limit','include','map','model','GetVoiceCallReport','CreateVoiceCallReport','create','body'];(function(_0x86b219,_0x43038f){var _0x1f320c=function(_0x8cd63f){while(--_0x8cd63f){_0x86b219['push'](_0x86b219['shift']());}};_0x1f320c(++_0x43038f);}(_0xac81,0x16a));var _0x1ac8=function(_0x1cca33,_0x2be37d){_0x1cca33=_0x1cca33-0x0;var _0x305532=_0xac81[_0x1cca33];return _0x305532;};'use strict';var _=require(_0x1ac8('0x0'));var util=require(_0x1ac8('0x1'));var moment=require('moment');var BPromise=require(_0x1ac8('0x2'));var rs=require(_0x1ac8('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1ac8('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x1ac8('0x5'))(_0x1ac8('0x6'));var config=require(_0x1ac8('0x7'));var jayson=require(_0x1ac8('0x8'));var client=jayson[_0x1ac8('0x9')][_0x1ac8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x49a9f5,_0x5c7073,_0x44f330){return new BPromise(function(_0x2063ad,_0x48bc3a){return client[_0x1ac8('0xb')](_0x49a9f5,_0x44f330)[_0x1ac8('0xc')](function(_0x2f4b9f){logger[_0x1ac8('0xd')](_0x1ac8('0xe'),_0x5c7073,'request\x20sent');logger[_0x1ac8('0xf')](_0x1ac8('0x10'),_0x5c7073,_0x1ac8('0x11'),JSON[_0x1ac8('0x12')](_0x2f4b9f));if(_0x2f4b9f[_0x1ac8('0x13')]){if(_0x2f4b9f['error'][_0x1ac8('0x14')]===0x1f4){logger[_0x1ac8('0x13')](_0x1ac8('0xe'),_0x5c7073,_0x2f4b9f[_0x1ac8('0x13')][_0x1ac8('0x15')]);return _0x48bc3a(_0x2f4b9f[_0x1ac8('0x13')][_0x1ac8('0x15')]);}logger[_0x1ac8('0x13')]('VoiceCallReport,\x20%s,\x20%s',_0x5c7073,_0x2f4b9f[_0x1ac8('0x13')][_0x1ac8('0x15')]);return _0x2063ad(_0x2f4b9f[_0x1ac8('0x13')][_0x1ac8('0x15')]);}else{logger[_0x1ac8('0xd')](_0x1ac8('0xe'),_0x5c7073,_0x1ac8('0x11'));_0x2063ad(_0x2f4b9f[_0x1ac8('0x16')]['message']);}})[_0x1ac8('0x17')](function(_0x4a1553){logger[_0x1ac8('0x13')]('VoiceCallReport,\x20%s,\x20%s',_0x5c7073,_0x4a1553);_0x48bc3a(_0x4a1553);});});}exports['GetVoiceCallReport']=function(_0x462195){var _0x464bfb=this;return new Promise(function(_0x51c3fe,_0x571400){return db[_0x1ac8('0x18')][_0x1ac8('0x19')]({'raw':_0x462195[_0x1ac8('0x1a')]?_0x462195['options'][_0x1ac8('0x1b')]===undefined?!![]:![]:!![],'where':_0x462195[_0x1ac8('0x1a')]?_0x462195['options'][_0x1ac8('0x1c')]||null:null,'attributes':_0x462195['options']?_0x462195['options'][_0x1ac8('0x1d')]||null:null,'limit':_0x462195['options']?_0x462195['options'][_0x1ac8('0x1e')]||null:null,'include':_0x462195[_0x1ac8('0x1a')]?_0x462195[_0x1ac8('0x1a')][_0x1ac8('0x1f')]?_[_0x1ac8('0x20')](_0x462195[_0x1ac8('0x1a')][_0x1ac8('0x1f')],function(_0x4b24bd){return{'model':db[_0x4b24bd[_0x1ac8('0x21')]],'as':_0x4b24bd['as'],'attributes':_0x4b24bd[_0x1ac8('0x1d')],'include':_0x4b24bd[_0x1ac8('0x1f')]?_[_0x1ac8('0x20')](_0x4b24bd['include'],function(_0x382d45){return{'model':db[_0x382d45[_0x1ac8('0x21')]],'as':_0x382d45['as'],'attributes':_0x382d45[_0x1ac8('0x1d')],'include':_0x382d45[_0x1ac8('0x1f')]?_[_0x1ac8('0x20')](_0x382d45['include'],function(_0x1abca9){return{'model':db[_0x1abca9[_0x1ac8('0x21')]],'as':_0x1abca9['as'],'attributes':_0x1abca9['attributes']};}):[]};}):[]};}):[]:[]})[_0x1ac8('0xc')](function(_0x5b4e86){logger['info'](_0x1ac8('0x22'),_0x462195);logger[_0x1ac8('0xf')](_0x1ac8('0x22'),_0x462195,JSON[_0x1ac8('0x12')](_0x5b4e86));_0x51c3fe(_0x5b4e86);})[_0x1ac8('0x17')](function(_0x179ded){logger[_0x1ac8('0x13')](_0x1ac8('0x22'),_0x179ded['message'],_0x462195);_0x571400(_0x464bfb[_0x1ac8('0x13')](0x1f4,_0x179ded['message']));});});};exports[_0x1ac8('0x23')]=function(_0x2aa66c){var _0x520086=this;return new Promise(function(_0x292178,_0x230bcb){return db[_0x1ac8('0x18')][_0x1ac8('0x24')](_0x2aa66c[_0x1ac8('0x25')],{'raw':_0x2aa66c[_0x1ac8('0x1a')]?_0x2aa66c[_0x1ac8('0x1a')][_0x1ac8('0x1b')]===undefined?!![]:![]:!![]})['then'](function(_0x42af16){logger['info']('CreateVoiceCallReport',_0x2aa66c);logger[_0x1ac8('0xf')](_0x1ac8('0x23'),_0x2aa66c,JSON[_0x1ac8('0x12')](_0x42af16));_0x292178(_0x42af16);})['catch'](function(_0x280d95){logger[_0x1ac8('0x13')]('CreateVoiceCallReport',_0x280d95[_0x1ac8('0x15')],_0x2aa66c);_0x230bcb(_0x520086[_0x1ac8('0x13')](0x1f4,_0x280d95[_0x1ac8('0x15')]));});});};exports[_0x1ac8('0x26')]=function(_0x54efa8){var _0x28bf3d=this;return new Promise(function(_0x1fc4bc,_0xbd9870){return db[_0x1ac8('0x18')][_0x1ac8('0x27')](_0x54efa8[_0x1ac8('0x25')],{'raw':_0x54efa8[_0x1ac8('0x1a')]?_0x54efa8['options'][_0x1ac8('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x54efa8[_0x1ac8('0x1a')]?_0x54efa8[_0x1ac8('0x1a')]['where']||null:null,'attributes':_0x54efa8[_0x1ac8('0x1a')]?_0x54efa8[_0x1ac8('0x1a')][_0x1ac8('0x1d')]||null:null,'limit':_0x54efa8[_0x1ac8('0x1a')]?_0x54efa8[_0x1ac8('0x1a')][_0x1ac8('0x1e')]||null:null})[_0x1ac8('0xc')](function(_0x8075f4){logger['info'](_0x1ac8('0x26'),_0x54efa8);logger[_0x1ac8('0xf')]('UpdateVoiceCallReport',_0x54efa8,JSON[_0x1ac8('0x12')](_0x8075f4));_0x1fc4bc(_0x8075f4);})['catch'](function(_0x3d366d){logger[_0x1ac8('0x13')]('UpdateVoiceCallReport',_0x3d366d[_0x1ac8('0x15')],_0x54efa8);_0xbd9870(_0x28bf3d['error'](0x1f4,_0x3d366d['message']));});});};
\ No newline at end of file