Built motion from commit 20b39a97.|2.6.29
[motion2.git] / server / api / voiceCallReport / voiceCallReport.rpc.js
index 934bb3a..bd4f956 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf6a8=['raw','where','attributes','limit','include','map','model','GetVoiceCallReport','CreateVoiceCallReport','create','body','UpdateVoiceCallReport','update','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','VoiceCallReport,\x20%s,\x20%s','message','result','catch','VoiceCallReport','options'];(function(_0x1bb6ce,_0x52d276){var _0x29ba72=function(_0x3ae2ec){while(--_0x3ae2ec){_0x1bb6ce['push'](_0x1bb6ce['shift']());}};_0x29ba72(++_0x52d276);}(_0xf6a8,0x1ed));var _0x8f6a=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf6a8[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x8f6a('0x0'));var util=require(_0x8f6a('0x1'));var moment=require(_0x8f6a('0x2'));var BPromise=require(_0x8f6a('0x3'));var rs=require(_0x8f6a('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x8f6a('0x5'));var logger=require(_0x8f6a('0x6'))(_0x8f6a('0x7'));var config=require(_0x8f6a('0x8'));var jayson=require(_0x8f6a('0x9'));var client=jayson[_0x8f6a('0xa')][_0x8f6a('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x283417,_0x1dcbfe,_0x49c942){return new BPromise(function(_0x106774,_0x22c2a0){return client[_0x8f6a('0xc')](_0x283417,_0x49c942)[_0x8f6a('0xd')](function(_0x3422fc){logger[_0x8f6a('0xe')]('VoiceCallReport,\x20%s,\x20%s',_0x1dcbfe,'request\x20sent');logger[_0x8f6a('0xf')](_0x8f6a('0x10'),_0x1dcbfe,_0x8f6a('0x11'),JSON[_0x8f6a('0x12')](_0x3422fc));if(_0x3422fc[_0x8f6a('0x13')]){if(_0x3422fc[_0x8f6a('0x13')][_0x8f6a('0x14')]===0x1f4){logger[_0x8f6a('0x13')](_0x8f6a('0x15'),_0x1dcbfe,_0x3422fc[_0x8f6a('0x13')]['message']);return _0x22c2a0(_0x3422fc[_0x8f6a('0x13')][_0x8f6a('0x16')]);}logger[_0x8f6a('0x13')](_0x8f6a('0x15'),_0x1dcbfe,_0x3422fc[_0x8f6a('0x13')][_0x8f6a('0x16')]);return _0x106774(_0x3422fc[_0x8f6a('0x13')][_0x8f6a('0x16')]);}else{logger[_0x8f6a('0xe')](_0x8f6a('0x15'),_0x1dcbfe,_0x8f6a('0x11'));_0x106774(_0x3422fc[_0x8f6a('0x17')][_0x8f6a('0x16')]);}})[_0x8f6a('0x18')](function(_0x2d2890){logger[_0x8f6a('0x13')](_0x8f6a('0x15'),_0x1dcbfe,_0x2d2890);_0x22c2a0(_0x2d2890);});});}exports['GetVoiceCallReport']=function(_0x1cdabb){var _0x2fd945=this;return new Promise(function(_0x27003c,_0x12c49){return db[_0x8f6a('0x19')]['findAll']({'raw':_0x1cdabb[_0x8f6a('0x1a')]?_0x1cdabb[_0x8f6a('0x1a')][_0x8f6a('0x1b')]===undefined?!![]:![]:!![],'where':_0x1cdabb[_0x8f6a('0x1a')]?_0x1cdabb['options'][_0x8f6a('0x1c')]||null:null,'attributes':_0x1cdabb[_0x8f6a('0x1a')]?_0x1cdabb[_0x8f6a('0x1a')][_0x8f6a('0x1d')]||null:null,'limit':_0x1cdabb[_0x8f6a('0x1a')]?_0x1cdabb[_0x8f6a('0x1a')][_0x8f6a('0x1e')]||null:null,'include':_0x1cdabb[_0x8f6a('0x1a')]?_0x1cdabb['options'][_0x8f6a('0x1f')]?_['map'](_0x1cdabb[_0x8f6a('0x1a')]['include'],function(_0x1654ff){return{'model':db[_0x1654ff['model']],'as':_0x1654ff['as'],'attributes':_0x1654ff['attributes'],'include':_0x1654ff[_0x8f6a('0x1f')]?_[_0x8f6a('0x20')](_0x1654ff['include'],function(_0x392b89){return{'model':db[_0x392b89['model']],'as':_0x392b89['as'],'attributes':_0x392b89[_0x8f6a('0x1d')],'include':_0x392b89['include']?_[_0x8f6a('0x20')](_0x392b89[_0x8f6a('0x1f')],function(_0x400eae){return{'model':db[_0x400eae[_0x8f6a('0x21')]],'as':_0x400eae['as'],'attributes':_0x400eae[_0x8f6a('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x8f6a('0xd')](function(_0x35d3b5){logger['info']('GetVoiceCallReport',_0x1cdabb);logger['debug'](_0x8f6a('0x22'),_0x1cdabb,JSON[_0x8f6a('0x12')](_0x35d3b5));_0x27003c(_0x35d3b5);})[_0x8f6a('0x18')](function(_0x22afb3){logger['error'](_0x8f6a('0x22'),_0x22afb3['message'],_0x1cdabb);_0x12c49(_0x2fd945[_0x8f6a('0x13')](0x1f4,_0x22afb3[_0x8f6a('0x16')]));});});};exports[_0x8f6a('0x23')]=function(_0x3c2cd9){var _0x313348=this;return new Promise(function(_0x23eeed,_0x522952){return db[_0x8f6a('0x19')][_0x8f6a('0x24')](_0x3c2cd9[_0x8f6a('0x25')],{'raw':_0x3c2cd9[_0x8f6a('0x1a')]?_0x3c2cd9[_0x8f6a('0x1a')][_0x8f6a('0x1b')]===undefined?!![]:![]:!![]})[_0x8f6a('0xd')](function(_0x24974e){logger['info'](_0x8f6a('0x23'),_0x3c2cd9);logger[_0x8f6a('0xf')](_0x8f6a('0x23'),_0x3c2cd9,JSON[_0x8f6a('0x12')](_0x24974e));_0x23eeed(_0x24974e);})['catch'](function(_0x303972){logger['error'](_0x8f6a('0x23'),_0x303972[_0x8f6a('0x16')],_0x3c2cd9);_0x522952(_0x313348['error'](0x1f4,_0x303972[_0x8f6a('0x16')]));});});};exports[_0x8f6a('0x26')]=function(_0x42c8d3){var _0x5bf3dd=this;return new Promise(function(_0x4bcef4,_0x43b749){return db[_0x8f6a('0x19')][_0x8f6a('0x27')](_0x42c8d3[_0x8f6a('0x25')],{'raw':_0x42c8d3[_0x8f6a('0x1a')]?_0x42c8d3[_0x8f6a('0x1a')][_0x8f6a('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x42c8d3[_0x8f6a('0x1a')]?_0x42c8d3[_0x8f6a('0x1a')][_0x8f6a('0x1c')]||null:null,'attributes':_0x42c8d3[_0x8f6a('0x1a')]?_0x42c8d3[_0x8f6a('0x1a')][_0x8f6a('0x1d')]||null:null,'limit':_0x42c8d3[_0x8f6a('0x1a')]?_0x42c8d3['options'][_0x8f6a('0x1e')]||null:null})['then'](function(_0x51fc6f){logger[_0x8f6a('0xe')](_0x8f6a('0x26'),_0x42c8d3);logger[_0x8f6a('0xf')](_0x8f6a('0x26'),_0x42c8d3,JSON[_0x8f6a('0x12')](_0x51fc6f));_0x4bcef4(_0x51fc6f);})[_0x8f6a('0x18')](function(_0x9ac7ca){logger[_0x8f6a('0x13')]('UpdateVoiceCallReport',_0x9ac7ca['message'],_0x42c8d3);_0x43b749(_0x5bf3dd[_0x8f6a('0x13')](0x1f4,_0x9ac7ca[_0x8f6a('0x16')]));});});};
\ No newline at end of file
+var _0x9125=['result','findAll','options','raw','where','attributes','limit','include','map','model','catch','GetVoiceCallReport','CreateVoiceCallReport','VoiceCallReport','create','body','update','UpdateVoiceCallReport','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','info','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','VoiceCallReport,\x20%s,\x20%s'];(function(_0x13c1f6,_0x47fbd2){var _0x5800b5=function(_0x19e602){while(--_0x19e602){_0x13c1f6['push'](_0x13c1f6['shift']());}};_0x5800b5(++_0x47fbd2);}(_0x9125,0x152));var _0x5912=function(_0x500a1f,_0x14745f){_0x500a1f=_0x500a1f-0x0;var _0x2f5bd7=_0x9125[_0x500a1f];return _0x2f5bd7;};'use strict';var _=require(_0x5912('0x0'));var util=require(_0x5912('0x1'));var moment=require(_0x5912('0x2'));var BPromise=require(_0x5912('0x3'));var rs=require(_0x5912('0x4'));var fs=require('fs');var Redis=require(_0x5912('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x5912('0x6'));var logger=require(_0x5912('0x7'))(_0x5912('0x8'));var config=require('../../config/environment');var jayson=require(_0x5912('0x9'));var client=jayson[_0x5912('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x180be6,_0x1d2ffd,_0x49a572){return new BPromise(function(_0x1556b0,_0x382346){return client[_0x5912('0xb')](_0x180be6,_0x49a572)[_0x5912('0xc')](function(_0x292b06){logger[_0x5912('0xd')]('VoiceCallReport,\x20%s,\x20%s',_0x1d2ffd,_0x5912('0xe'));logger[_0x5912('0xf')](_0x5912('0x10'),_0x1d2ffd,_0x5912('0xe'),JSON[_0x5912('0x11')](_0x292b06));if(_0x292b06['error']){if(_0x292b06[_0x5912('0x12')][_0x5912('0x13')]===0x1f4){logger[_0x5912('0x12')]('VoiceCallReport,\x20%s,\x20%s',_0x1d2ffd,_0x292b06[_0x5912('0x12')][_0x5912('0x14')]);return _0x382346(_0x292b06[_0x5912('0x12')]['message']);}logger['error'](_0x5912('0x15'),_0x1d2ffd,_0x292b06['error'][_0x5912('0x14')]);return _0x1556b0(_0x292b06['error'][_0x5912('0x14')]);}else{logger[_0x5912('0xd')](_0x5912('0x15'),_0x1d2ffd,'request\x20sent');_0x1556b0(_0x292b06[_0x5912('0x16')][_0x5912('0x14')]);}})['catch'](function(_0x13924c){logger[_0x5912('0x12')](_0x5912('0x15'),_0x1d2ffd,_0x13924c);_0x382346(_0x13924c);});});}exports['GetVoiceCallReport']=function(_0x46c4a3){var _0x26c492=this;return new Promise(function(_0x2162a4,_0x21b1f2){return db['VoiceCallReport'][_0x5912('0x17')]({'raw':_0x46c4a3[_0x5912('0x18')]?_0x46c4a3[_0x5912('0x18')][_0x5912('0x19')]===undefined?!![]:![]:!![],'where':_0x46c4a3[_0x5912('0x18')]?_0x46c4a3[_0x5912('0x18')][_0x5912('0x1a')]||null:null,'attributes':_0x46c4a3[_0x5912('0x18')]?_0x46c4a3['options'][_0x5912('0x1b')]||null:null,'limit':_0x46c4a3['options']?_0x46c4a3[_0x5912('0x18')][_0x5912('0x1c')]||null:null,'include':_0x46c4a3[_0x5912('0x18')]?_0x46c4a3[_0x5912('0x18')][_0x5912('0x1d')]?_[_0x5912('0x1e')](_0x46c4a3[_0x5912('0x18')][_0x5912('0x1d')],function(_0xa0c6cf){return{'model':db[_0xa0c6cf[_0x5912('0x1f')]],'as':_0xa0c6cf['as'],'attributes':_0xa0c6cf['attributes'],'include':_0xa0c6cf['include']?_[_0x5912('0x1e')](_0xa0c6cf['include'],function(_0xc44034){return{'model':db[_0xc44034[_0x5912('0x1f')]],'as':_0xc44034['as'],'attributes':_0xc44034[_0x5912('0x1b')],'include':_0xc44034['include']?_[_0x5912('0x1e')](_0xc44034['include'],function(_0x399711){return{'model':db[_0x399711[_0x5912('0x1f')]],'as':_0x399711['as'],'attributes':_0x399711[_0x5912('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2cde61){logger[_0x5912('0xd')]('GetVoiceCallReport',_0x46c4a3);logger[_0x5912('0xf')]('GetVoiceCallReport',_0x46c4a3,JSON[_0x5912('0x11')](_0x2cde61));_0x2162a4(_0x2cde61);})[_0x5912('0x20')](function(_0xee074c){logger['error'](_0x5912('0x21'),_0xee074c[_0x5912('0x14')],_0x46c4a3);_0x21b1f2(_0x26c492['error'](0x1f4,_0xee074c['message']));});});};exports[_0x5912('0x22')]=function(_0x4c3d9d){var _0x511e1b=this;return new Promise(function(_0x272a12,_0x28dc28){return db[_0x5912('0x23')][_0x5912('0x24')](_0x4c3d9d[_0x5912('0x25')],{'raw':_0x4c3d9d[_0x5912('0x18')]?_0x4c3d9d[_0x5912('0x18')]['raw']===undefined?!![]:![]:!![]})[_0x5912('0xc')](function(_0x487ca7){logger[_0x5912('0xd')](_0x5912('0x22'),_0x4c3d9d);logger['debug'](_0x5912('0x22'),_0x4c3d9d,JSON[_0x5912('0x11')](_0x487ca7));_0x272a12(_0x487ca7);})[_0x5912('0x20')](function(_0xd0908){logger['error'](_0x5912('0x22'),_0xd0908['message'],_0x4c3d9d);_0x28dc28(_0x511e1b[_0x5912('0x12')](0x1f4,_0xd0908[_0x5912('0x14')]));});});};exports['UpdateVoiceCallReport']=function(_0x165dc4){var _0xfab05e=this;return new Promise(function(_0xcd63f1,_0x54b81d){return db['VoiceCallReport'][_0x5912('0x26')](_0x165dc4['body'],{'raw':_0x165dc4[_0x5912('0x18')]?_0x165dc4[_0x5912('0x18')][_0x5912('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x165dc4['options']?_0x165dc4[_0x5912('0x18')][_0x5912('0x1a')]||null:null,'attributes':_0x165dc4[_0x5912('0x18')]?_0x165dc4[_0x5912('0x18')][_0x5912('0x1b')]||null:null,'limit':_0x165dc4[_0x5912('0x18')]?_0x165dc4['options'][_0x5912('0x1c')]||null:null})[_0x5912('0xc')](function(_0x1ffb6c){logger[_0x5912('0xd')](_0x5912('0x27'),_0x165dc4);logger[_0x5912('0xf')](_0x5912('0x27'),_0x165dc4,JSON['stringify'](_0x1ffb6c));_0xcd63f1(_0x1ffb6c);})[_0x5912('0x20')](function(_0x39bf43){logger[_0x5912('0x12')](_0x5912('0x27'),_0x39bf43['message'],_0x165dc4);_0x54b81d(_0xfab05e[_0x5912('0x12')](0x1f4,_0x39bf43[_0x5912('0x14')]));});});};
\ No newline at end of file