Built motion from commit (unavailable).|2.5.6
[motion2.git] / server / api / voiceCallReport / voiceCallReport.rpc.js
index b50fe57..d2b534a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xffb7=['attributes','limit','include','map','model','CreateVoiceCallReport','create','body','UpdateVoiceCallReport','update','where','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','VoiceCallReport,\x20%s,\x20%s','request\x20sent','result','catch','GetVoiceCallReport','VoiceCallReport','findAll','options','raw'];(function(_0x2e812d,_0x5c69fa){var _0x173ec0=function(_0x16808d){while(--_0x16808d){_0x2e812d['push'](_0x2e812d['shift']());}};_0x173ec0(++_0x5c69fa);}(_0xffb7,0x1a5));var _0x7ffb=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xffb7[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x7ffb('0x0'));var util=require(_0x7ffb('0x1'));var moment=require(_0x7ffb('0x2'));var BPromise=require(_0x7ffb('0x3'));var rs=require(_0x7ffb('0x4'));var fs=require('fs');var Redis=require(_0x7ffb('0x5'));var db=require(_0x7ffb('0x6'))['db'];var utils=require(_0x7ffb('0x7'));var logger=require(_0x7ffb('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0x7ffb('0x9'));var client=jayson[_0x7ffb('0xa')][_0x7ffb('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4830d8,_0x54563b,_0x2590f6){return new BPromise(function(_0x520848,_0x182d52){return client[_0x7ffb('0xc')](_0x4830d8,_0x2590f6)[_0x7ffb('0xd')](function(_0x5cc848){logger['info']('VoiceCallReport,\x20%s,\x20%s',_0x54563b,'request\x20sent');logger[_0x7ffb('0xe')](_0x7ffb('0xf'),_0x54563b,'request\x20sent',JSON[_0x7ffb('0x10')](_0x5cc848));if(_0x5cc848[_0x7ffb('0x11')]){if(_0x5cc848[_0x7ffb('0x11')][_0x7ffb('0x12')]===0x1f4){logger[_0x7ffb('0x11')]('VoiceCallReport,\x20%s,\x20%s',_0x54563b,_0x5cc848[_0x7ffb('0x11')][_0x7ffb('0x13')]);return _0x182d52(_0x5cc848[_0x7ffb('0x11')]['message']);}logger[_0x7ffb('0x11')]('VoiceCallReport,\x20%s,\x20%s',_0x54563b,_0x5cc848[_0x7ffb('0x11')][_0x7ffb('0x13')]);return _0x520848(_0x5cc848[_0x7ffb('0x11')]['message']);}else{logger[_0x7ffb('0x14')](_0x7ffb('0x15'),_0x54563b,_0x7ffb('0x16'));_0x520848(_0x5cc848[_0x7ffb('0x17')]['message']);}})[_0x7ffb('0x18')](function(_0x947b9c){logger[_0x7ffb('0x11')](_0x7ffb('0x15'),_0x54563b,_0x947b9c);_0x182d52(_0x947b9c);});});}exports[_0x7ffb('0x19')]=function(_0x411e1a){var _0x13b849=this;return new Promise(function(_0x461df5,_0x1ce69d){return db[_0x7ffb('0x1a')][_0x7ffb('0x1b')]({'raw':_0x411e1a[_0x7ffb('0x1c')]?_0x411e1a[_0x7ffb('0x1c')][_0x7ffb('0x1d')]===undefined?!![]:![]:!![],'where':_0x411e1a[_0x7ffb('0x1c')]?_0x411e1a[_0x7ffb('0x1c')]['where']||null:null,'attributes':_0x411e1a[_0x7ffb('0x1c')]?_0x411e1a[_0x7ffb('0x1c')][_0x7ffb('0x1e')]||null:null,'limit':_0x411e1a[_0x7ffb('0x1c')]?_0x411e1a[_0x7ffb('0x1c')][_0x7ffb('0x1f')]||null:null,'include':_0x411e1a[_0x7ffb('0x1c')]?_0x411e1a[_0x7ffb('0x1c')][_0x7ffb('0x20')]?_[_0x7ffb('0x21')](_0x411e1a[_0x7ffb('0x1c')][_0x7ffb('0x20')],function(_0x4c2d46){return{'model':db[_0x4c2d46[_0x7ffb('0x22')]],'as':_0x4c2d46['as'],'attributes':_0x4c2d46[_0x7ffb('0x1e')],'include':_0x4c2d46[_0x7ffb('0x20')]?_[_0x7ffb('0x21')](_0x4c2d46[_0x7ffb('0x20')],function(_0x3c06f5){return{'model':db[_0x3c06f5[_0x7ffb('0x22')]],'as':_0x3c06f5['as'],'attributes':_0x3c06f5[_0x7ffb('0x1e')],'include':_0x3c06f5[_0x7ffb('0x20')]?_['map'](_0x3c06f5[_0x7ffb('0x20')],function(_0x453610){return{'model':db[_0x453610[_0x7ffb('0x22')]],'as':_0x453610['as'],'attributes':_0x453610[_0x7ffb('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x7ffb('0xd')](function(_0x36cf38){logger[_0x7ffb('0x14')](_0x7ffb('0x19'),_0x411e1a);logger['debug'](_0x7ffb('0x19'),_0x411e1a,JSON[_0x7ffb('0x10')](_0x36cf38));_0x461df5(_0x36cf38);})[_0x7ffb('0x18')](function(_0x14b620){logger[_0x7ffb('0x11')](_0x7ffb('0x19'),_0x14b620[_0x7ffb('0x13')],_0x411e1a);_0x1ce69d(_0x13b849[_0x7ffb('0x11')](0x1f4,_0x14b620[_0x7ffb('0x13')]));});});};exports[_0x7ffb('0x23')]=function(_0x15dc8a){var _0xe3c9a0=this;return new Promise(function(_0x12a91f,_0xb52748){return db['VoiceCallReport'][_0x7ffb('0x24')](_0x15dc8a[_0x7ffb('0x25')],{'raw':_0x15dc8a[_0x7ffb('0x1c')]?_0x15dc8a[_0x7ffb('0x1c')][_0x7ffb('0x1d')]===undefined?!![]:![]:!![]})['then'](function(_0x2ff5eb){logger[_0x7ffb('0x14')](_0x7ffb('0x23'),_0x15dc8a);logger[_0x7ffb('0xe')](_0x7ffb('0x23'),_0x15dc8a,JSON[_0x7ffb('0x10')](_0x2ff5eb));_0x12a91f(_0x2ff5eb);})['catch'](function(_0x778837){logger[_0x7ffb('0x11')]('CreateVoiceCallReport',_0x778837[_0x7ffb('0x13')],_0x15dc8a);_0xb52748(_0xe3c9a0[_0x7ffb('0x11')](0x1f4,_0x778837['message']));});});};exports[_0x7ffb('0x26')]=function(_0x3ff130){var _0x50de8e=this;return new Promise(function(_0x302fc9,_0x20b352){return db[_0x7ffb('0x1a')][_0x7ffb('0x27')](_0x3ff130[_0x7ffb('0x25')],{'raw':_0x3ff130['options']?_0x3ff130['options'][_0x7ffb('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3ff130['options']?_0x3ff130['options'][_0x7ffb('0x28')]||null:null,'attributes':_0x3ff130[_0x7ffb('0x1c')]?_0x3ff130['options'][_0x7ffb('0x1e')]||null:null,'limit':_0x3ff130[_0x7ffb('0x1c')]?_0x3ff130['options']['limit']||null:null})[_0x7ffb('0xd')](function(_0x2ac94d){logger[_0x7ffb('0x14')](_0x7ffb('0x26'),_0x3ff130);logger[_0x7ffb('0xe')](_0x7ffb('0x26'),_0x3ff130,JSON['stringify'](_0x2ac94d));_0x302fc9(_0x2ac94d);})['catch'](function(_0x414274){logger[_0x7ffb('0x11')](_0x7ffb('0x26'),_0x414274[_0x7ffb('0x13')],_0x3ff130);_0x20b352(_0x50de8e['error'](0x1f4,_0x414274['message']));});});};
\ No newline at end of file
+var _0x64b6=['VoiceCallReport','findAll','options','raw','where','include','model','map','attributes','info','CreateVoiceCallReport','create','body','update','limit','UpdateVoiceCallReport','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','VoiceCallReport,\x20%s,\x20%s','result','catch','GetVoiceCallReport'];(function(_0x51e42a,_0x2e2098){var _0x483535=function(_0x2f453a){while(--_0x2f453a){_0x51e42a['push'](_0x51e42a['shift']());}};_0x483535(++_0x2e2098);}(_0x64b6,0xd3));var _0x664b=function(_0x146ef3,_0x1c7bb0){_0x146ef3=_0x146ef3-0x0;var _0x5d9bae=_0x64b6[_0x146ef3];return _0x5d9bae;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x664b('0x0'));var BPromise=require(_0x664b('0x1'));var rs=require(_0x664b('0x2'));var fs=require('fs');var Redis=require(_0x664b('0x3'));var db=require(_0x664b('0x4'))['db'];var utils=require(_0x664b('0x5'));var logger=require(_0x664b('0x6'))('rpc');var config=require(_0x664b('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x664b('0x8')][_0x664b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3e4188,_0x1dedc7,_0x50180d){return new BPromise(function(_0x321b17,_0x1e098e){return client[_0x664b('0xa')](_0x3e4188,_0x50180d)[_0x664b('0xb')](function(_0x157971){logger['info']('VoiceCallReport,\x20%s,\x20%s',_0x1dedc7,_0x664b('0xc'));logger[_0x664b('0xd')](_0x664b('0xe'),_0x1dedc7,'request\x20sent',JSON[_0x664b('0xf')](_0x157971));if(_0x157971['error']){if(_0x157971[_0x664b('0x10')][_0x664b('0x11')]===0x1f4){logger[_0x664b('0x10')]('VoiceCallReport,\x20%s,\x20%s',_0x1dedc7,_0x157971[_0x664b('0x10')][_0x664b('0x12')]);return _0x1e098e(_0x157971[_0x664b('0x10')][_0x664b('0x12')]);}logger[_0x664b('0x10')]('VoiceCallReport,\x20%s,\x20%s',_0x1dedc7,_0x157971[_0x664b('0x10')]['message']);return _0x321b17(_0x157971[_0x664b('0x10')]['message']);}else{logger['info'](_0x664b('0x13'),_0x1dedc7,_0x664b('0xc'));_0x321b17(_0x157971[_0x664b('0x14')]['message']);}})[_0x664b('0x15')](function(_0x3d62b2){logger['error']('VoiceCallReport,\x20%s,\x20%s',_0x1dedc7,_0x3d62b2);_0x1e098e(_0x3d62b2);});});}exports[_0x664b('0x16')]=function(_0x257f41){var _0x393506=this;return new Promise(function(_0x3fe293,_0x4627c9){return db[_0x664b('0x17')][_0x664b('0x18')]({'raw':_0x257f41[_0x664b('0x19')]?_0x257f41[_0x664b('0x19')][_0x664b('0x1a')]===undefined?!![]:![]:!![],'where':_0x257f41[_0x664b('0x19')]?_0x257f41[_0x664b('0x19')][_0x664b('0x1b')]||null:null,'attributes':_0x257f41[_0x664b('0x19')]?_0x257f41[_0x664b('0x19')]['attributes']||null:null,'limit':_0x257f41[_0x664b('0x19')]?_0x257f41[_0x664b('0x19')]['limit']||null:null,'include':_0x257f41[_0x664b('0x19')]?_0x257f41['options'][_0x664b('0x1c')]?_['map'](_0x257f41[_0x664b('0x19')][_0x664b('0x1c')],function(_0x262630){return{'model':db[_0x262630[_0x664b('0x1d')]],'as':_0x262630['as'],'attributes':_0x262630['attributes'],'include':_0x262630[_0x664b('0x1c')]?_[_0x664b('0x1e')](_0x262630[_0x664b('0x1c')],function(_0x141072){return{'model':db[_0x141072[_0x664b('0x1d')]],'as':_0x141072['as'],'attributes':_0x141072[_0x664b('0x1f')],'include':_0x141072[_0x664b('0x1c')]?_[_0x664b('0x1e')](_0x141072[_0x664b('0x1c')],function(_0x1f787e){return{'model':db[_0x1f787e[_0x664b('0x1d')]],'as':_0x1f787e['as'],'attributes':_0x1f787e['attributes']};}):[]};}):[]};}):[]:[]})[_0x664b('0xb')](function(_0x84f19b){logger[_0x664b('0x20')](_0x664b('0x16'),_0x257f41);logger[_0x664b('0xd')]('GetVoiceCallReport',_0x257f41,JSON[_0x664b('0xf')](_0x84f19b));_0x3fe293(_0x84f19b);})[_0x664b('0x15')](function(_0x1ac386){logger[_0x664b('0x10')](_0x664b('0x16'),_0x1ac386['message'],_0x257f41);_0x4627c9(_0x393506[_0x664b('0x10')](0x1f4,_0x1ac386['message']));});});};exports[_0x664b('0x21')]=function(_0x391e6c){var _0x1f8a99=this;return new Promise(function(_0x5d96fc,_0x2f7f8d){return db[_0x664b('0x17')][_0x664b('0x22')](_0x391e6c[_0x664b('0x23')],{'raw':_0x391e6c['options']?_0x391e6c[_0x664b('0x19')][_0x664b('0x1a')]===undefined?!![]:![]:!![]})[_0x664b('0xb')](function(_0x18370d){logger['info'](_0x664b('0x21'),_0x391e6c);logger['debug'](_0x664b('0x21'),_0x391e6c,JSON[_0x664b('0xf')](_0x18370d));_0x5d96fc(_0x18370d);})['catch'](function(_0x3f24d7){logger[_0x664b('0x10')]('CreateVoiceCallReport',_0x3f24d7[_0x664b('0x12')],_0x391e6c);_0x2f7f8d(_0x1f8a99['error'](0x1f4,_0x3f24d7[_0x664b('0x12')]));});});};exports['UpdateVoiceCallReport']=function(_0x5d1cc8){var _0x7d1bbb=this;return new Promise(function(_0x17770a,_0x52e75a){return db['VoiceCallReport'][_0x664b('0x24')](_0x5d1cc8[_0x664b('0x23')],{'raw':_0x5d1cc8[_0x664b('0x19')]?_0x5d1cc8['options'][_0x664b('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5d1cc8[_0x664b('0x19')]?_0x5d1cc8['options'][_0x664b('0x1b')]||null:null,'attributes':_0x5d1cc8[_0x664b('0x19')]?_0x5d1cc8[_0x664b('0x19')][_0x664b('0x1f')]||null:null,'limit':_0x5d1cc8[_0x664b('0x19')]?_0x5d1cc8['options'][_0x664b('0x25')]||null:null})[_0x664b('0xb')](function(_0x51a7aa){logger[_0x664b('0x20')](_0x664b('0x26'),_0x5d1cc8);logger['debug'](_0x664b('0x26'),_0x5d1cc8,JSON['stringify'](_0x51a7aa));_0x17770a(_0x51a7aa);})[_0x664b('0x15')](function(_0x4f38e3){logger[_0x664b('0x10')](_0x664b('0x26'),_0x4f38e3[_0x664b('0x12')],_0x5d1cc8);_0x52e75a(_0x7d1bbb[_0x664b('0x10')](0x1f4,_0x4f38e3[_0x664b('0x12')]));});});};
\ No newline at end of file