Built motion from commit 56b8093a.|2.6.29
[motion2.git] / server / api / voiceCallReport / voiceCallReport.rpc.js
index ad3309a..574db4e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfa81=['VoiceCallReport','findAll','options','where','attributes','limit','include','map','model','stringify','CreateVoiceCallReport','create','body','raw','UpdateVoiceCallReport','lodash','util','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','error','message','info','catch','GetVoiceCallReport'];(function(_0x41805e,_0x3e14a0){var _0x17c141=function(_0x11a6a7){while(--_0x11a6a7){_0x41805e['push'](_0x41805e['shift']());}};_0x17c141(++_0x3e14a0);}(_0xfa81,0x112));var _0x1fa8=function(_0x2c6b4b,_0x260e7a){_0x2c6b4b=_0x2c6b4b-0x0;var _0x569863=_0xfa81[_0x2c6b4b];return _0x569863;};'use strict';var _=require(_0x1fa8('0x0'));var util=require(_0x1fa8('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1fa8('0x2'));var db=require(_0x1fa8('0x3'))['db'];var utils=require(_0x1fa8('0x4'));var logger=require(_0x1fa8('0x5'))(_0x1fa8('0x6'));var config=require(_0x1fa8('0x7'));var jayson=require(_0x1fa8('0x8'));var client=jayson[_0x1fa8('0x9')][_0x1fa8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x58c719,_0x19ffdc,_0x11dca1){return new BPromise(function(_0x122750,_0x374a05){return client[_0x1fa8('0xb')](_0x58c719,_0x11dca1)[_0x1fa8('0xc')](function(_0x38407a){logger['info'](_0x1fa8('0xd'),_0x19ffdc,_0x1fa8('0xe'));logger[_0x1fa8('0xf')](_0x1fa8('0x10'),_0x19ffdc,_0x1fa8('0xe'),JSON['stringify'](_0x38407a));if(_0x38407a['error']){if(_0x38407a[_0x1fa8('0x11')]['code']===0x1f4){logger[_0x1fa8('0x11')](_0x1fa8('0xd'),_0x19ffdc,_0x38407a[_0x1fa8('0x11')][_0x1fa8('0x12')]);return _0x374a05(_0x38407a[_0x1fa8('0x11')][_0x1fa8('0x12')]);}logger['error'](_0x1fa8('0xd'),_0x19ffdc,_0x38407a[_0x1fa8('0x11')][_0x1fa8('0x12')]);return _0x122750(_0x38407a[_0x1fa8('0x11')]['message']);}else{logger[_0x1fa8('0x13')]('VoiceCallReport,\x20%s,\x20%s',_0x19ffdc,_0x1fa8('0xe'));_0x122750(_0x38407a['result'][_0x1fa8('0x12')]);}})[_0x1fa8('0x14')](function(_0x594df7){logger[_0x1fa8('0x11')]('VoiceCallReport,\x20%s,\x20%s',_0x19ffdc,_0x594df7);_0x374a05(_0x594df7);});});}exports[_0x1fa8('0x15')]=function(_0x3957fa){var _0x1e9bb5=this;return new Promise(function(_0x12e531,_0x27d260){return db[_0x1fa8('0x16')][_0x1fa8('0x17')]({'raw':_0x3957fa[_0x1fa8('0x18')]?_0x3957fa[_0x1fa8('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x3957fa['options']?_0x3957fa[_0x1fa8('0x18')][_0x1fa8('0x19')]||null:null,'attributes':_0x3957fa[_0x1fa8('0x18')]?_0x3957fa[_0x1fa8('0x18')][_0x1fa8('0x1a')]||null:null,'limit':_0x3957fa[_0x1fa8('0x18')]?_0x3957fa[_0x1fa8('0x18')][_0x1fa8('0x1b')]||null:null,'include':_0x3957fa[_0x1fa8('0x18')]?_0x3957fa[_0x1fa8('0x18')][_0x1fa8('0x1c')]?_[_0x1fa8('0x1d')](_0x3957fa['options'][_0x1fa8('0x1c')],function(_0x34cd87){return{'model':db[_0x34cd87[_0x1fa8('0x1e')]],'as':_0x34cd87['as'],'attributes':_0x34cd87[_0x1fa8('0x1a')],'include':_0x34cd87[_0x1fa8('0x1c')]?_[_0x1fa8('0x1d')](_0x34cd87[_0x1fa8('0x1c')],function(_0x2b21db){return{'model':db[_0x2b21db[_0x1fa8('0x1e')]],'as':_0x2b21db['as'],'attributes':_0x2b21db[_0x1fa8('0x1a')],'include':_0x2b21db['include']?_[_0x1fa8('0x1d')](_0x2b21db[_0x1fa8('0x1c')],function(_0x49be73){return{'model':db[_0x49be73[_0x1fa8('0x1e')]],'as':_0x49be73['as'],'attributes':_0x49be73[_0x1fa8('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x1fa8('0xc')](function(_0x53768b){logger[_0x1fa8('0x13')](_0x1fa8('0x15'),_0x3957fa);logger['debug'](_0x1fa8('0x15'),_0x3957fa,JSON[_0x1fa8('0x1f')](_0x53768b));_0x12e531(_0x53768b);})[_0x1fa8('0x14')](function(_0x50e6d1){logger[_0x1fa8('0x11')]('GetVoiceCallReport',_0x50e6d1[_0x1fa8('0x12')],_0x3957fa);_0x27d260(_0x1e9bb5['error'](0x1f4,_0x50e6d1[_0x1fa8('0x12')]));});});};exports[_0x1fa8('0x20')]=function(_0x3c0b2f){var _0x2014aa=this;return new Promise(function(_0x68a692,_0x52187e){return db['VoiceCallReport'][_0x1fa8('0x21')](_0x3c0b2f[_0x1fa8('0x22')],{'raw':_0x3c0b2f['options']?_0x3c0b2f[_0x1fa8('0x18')][_0x1fa8('0x23')]===undefined?!![]:![]:!![]})[_0x1fa8('0xc')](function(_0x1e1686){logger[_0x1fa8('0x13')](_0x1fa8('0x20'),_0x3c0b2f);logger[_0x1fa8('0xf')](_0x1fa8('0x20'),_0x3c0b2f,JSON[_0x1fa8('0x1f')](_0x1e1686));_0x68a692(_0x1e1686);})[_0x1fa8('0x14')](function(_0x2ec91d){logger[_0x1fa8('0x11')]('CreateVoiceCallReport',_0x2ec91d['message'],_0x3c0b2f);_0x52187e(_0x2014aa[_0x1fa8('0x11')](0x1f4,_0x2ec91d[_0x1fa8('0x12')]));});});};exports['UpdateVoiceCallReport']=function(_0x95e447){var _0x17345f=this;return new Promise(function(_0x1d6805,_0x26cddc){return db[_0x1fa8('0x16')]['update'](_0x95e447['body'],{'raw':_0x95e447[_0x1fa8('0x18')]?_0x95e447[_0x1fa8('0x18')][_0x1fa8('0x23')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x95e447[_0x1fa8('0x18')]?_0x95e447[_0x1fa8('0x18')][_0x1fa8('0x19')]||null:null,'attributes':_0x95e447['options']?_0x95e447[_0x1fa8('0x18')][_0x1fa8('0x1a')]||null:null,'limit':_0x95e447[_0x1fa8('0x18')]?_0x95e447['options'][_0x1fa8('0x1b')]||null:null})[_0x1fa8('0xc')](function(_0x4b122f){logger['info']('UpdateVoiceCallReport',_0x95e447);logger[_0x1fa8('0xf')]('UpdateVoiceCallReport',_0x95e447,JSON[_0x1fa8('0x1f')](_0x4b122f));_0x1d6805(_0x4b122f);})['catch'](function(_0x3d750f){logger[_0x1fa8('0x11')](_0x1fa8('0x24'),_0x3d750f[_0x1fa8('0x12')],_0x95e447);_0x26cddc(_0x17345f[_0x1fa8('0x11')](0x1f4,_0x3d750f[_0x1fa8('0x12')]));});});};
\ No newline at end of file
+var _0xc6e7=['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','raw','attributes','limit','include','map','model','create','CreateVoiceCallReport','update','body','where','UpdateVoiceCallReport','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise'];(function(_0x58b698,_0x4b2135){var _0x4f57c0=function(_0x337a36){while(--_0x337a36){_0x58b698['push'](_0x58b698['shift']());}};_0x4f57c0(++_0x4b2135);}(_0xc6e7,0x1a4));var _0x7c6e=function(_0x343abe,_0x5c0a70){_0x343abe=_0x343abe-0x0;var _0x1917e7=_0xc6e7[_0x343abe];return _0x1917e7;};'use strict';var _=require(_0x7c6e('0x0'));var util=require(_0x7c6e('0x1'));var moment=require('moment');var BPromise=require(_0x7c6e('0x2'));var rs=require(_0x7c6e('0x3'));var fs=require('fs');var Redis=require(_0x7c6e('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x7c6e('0x5'));var logger=require(_0x7c6e('0x6'))(_0x7c6e('0x7'));var config=require('../../config/environment');var jayson=require(_0x7c6e('0x8'));var client=jayson[_0x7c6e('0x9')][_0x7c6e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xe0ea99,_0x591fbd,_0x407400){return new BPromise(function(_0x21b582,_0x51ef25){return client[_0x7c6e('0xb')](_0xe0ea99,_0x407400)[_0x7c6e('0xc')](function(_0x4f27f5){logger[_0x7c6e('0xd')](_0x7c6e('0xe'),_0x591fbd,_0x7c6e('0xf'));logger[_0x7c6e('0x10')](_0x7c6e('0x11'),_0x591fbd,_0x7c6e('0xf'),JSON[_0x7c6e('0x12')](_0x4f27f5));if(_0x4f27f5['error']){if(_0x4f27f5[_0x7c6e('0x13')]['code']===0x1f4){logger[_0x7c6e('0x13')](_0x7c6e('0xe'),_0x591fbd,_0x4f27f5['error']['message']);return _0x51ef25(_0x4f27f5[_0x7c6e('0x13')][_0x7c6e('0x14')]);}logger['error'](_0x7c6e('0xe'),_0x591fbd,_0x4f27f5[_0x7c6e('0x13')][_0x7c6e('0x14')]);return _0x21b582(_0x4f27f5[_0x7c6e('0x13')][_0x7c6e('0x14')]);}else{logger['info'](_0x7c6e('0xe'),_0x591fbd,_0x7c6e('0xf'));_0x21b582(_0x4f27f5[_0x7c6e('0x15')][_0x7c6e('0x14')]);}})[_0x7c6e('0x16')](function(_0x774c93){logger[_0x7c6e('0x13')](_0x7c6e('0xe'),_0x591fbd,_0x774c93);_0x51ef25(_0x774c93);});});}exports[_0x7c6e('0x17')]=function(_0x48499d){var _0x4745b2=this;return new Promise(function(_0xf6462c,_0x122a59){return db[_0x7c6e('0x18')][_0x7c6e('0x19')]({'raw':_0x48499d[_0x7c6e('0x1a')]?_0x48499d[_0x7c6e('0x1a')][_0x7c6e('0x1b')]===undefined?!![]:![]:!![],'where':_0x48499d[_0x7c6e('0x1a')]?_0x48499d[_0x7c6e('0x1a')]['where']||null:null,'attributes':_0x48499d['options']?_0x48499d[_0x7c6e('0x1a')][_0x7c6e('0x1c')]||null:null,'limit':_0x48499d[_0x7c6e('0x1a')]?_0x48499d[_0x7c6e('0x1a')][_0x7c6e('0x1d')]||null:null,'include':_0x48499d[_0x7c6e('0x1a')]?_0x48499d['options'][_0x7c6e('0x1e')]?_[_0x7c6e('0x1f')](_0x48499d[_0x7c6e('0x1a')][_0x7c6e('0x1e')],function(_0x401a4e){return{'model':db[_0x401a4e[_0x7c6e('0x20')]],'as':_0x401a4e['as'],'attributes':_0x401a4e[_0x7c6e('0x1c')],'include':_0x401a4e[_0x7c6e('0x1e')]?_[_0x7c6e('0x1f')](_0x401a4e[_0x7c6e('0x1e')],function(_0x1a43f2){return{'model':db[_0x1a43f2[_0x7c6e('0x20')]],'as':_0x1a43f2['as'],'attributes':_0x1a43f2[_0x7c6e('0x1c')],'include':_0x1a43f2[_0x7c6e('0x1e')]?_[_0x7c6e('0x1f')](_0x1a43f2[_0x7c6e('0x1e')],function(_0x41cb72){return{'model':db[_0x41cb72[_0x7c6e('0x20')]],'as':_0x41cb72['as'],'attributes':_0x41cb72[_0x7c6e('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x7c6e('0xc')](function(_0xd6ee1a){logger['info'](_0x7c6e('0x17'),_0x48499d);logger[_0x7c6e('0x10')](_0x7c6e('0x17'),_0x48499d,JSON['stringify'](_0xd6ee1a));_0xf6462c(_0xd6ee1a);})[_0x7c6e('0x16')](function(_0x3351c9){logger[_0x7c6e('0x13')]('GetVoiceCallReport',_0x3351c9['message'],_0x48499d);_0x122a59(_0x4745b2[_0x7c6e('0x13')](0x1f4,_0x3351c9[_0x7c6e('0x14')]));});});};exports['CreateVoiceCallReport']=function(_0x1d67be){var _0x5059ee=this;return new Promise(function(_0x35ce18,_0x322f79){return db[_0x7c6e('0x18')][_0x7c6e('0x21')](_0x1d67be['body'],{'raw':_0x1d67be[_0x7c6e('0x1a')]?_0x1d67be[_0x7c6e('0x1a')][_0x7c6e('0x1b')]===undefined?!![]:![]:!![]})[_0x7c6e('0xc')](function(_0x487d02){logger[_0x7c6e('0xd')](_0x7c6e('0x22'),_0x1d67be);logger['debug'](_0x7c6e('0x22'),_0x1d67be,JSON[_0x7c6e('0x12')](_0x487d02));_0x35ce18(_0x487d02);})[_0x7c6e('0x16')](function(_0x3f7931){logger['error'](_0x7c6e('0x22'),_0x3f7931[_0x7c6e('0x14')],_0x1d67be);_0x322f79(_0x5059ee[_0x7c6e('0x13')](0x1f4,_0x3f7931['message']));});});};exports['UpdateVoiceCallReport']=function(_0x17165c){var _0x1b45fc=this;return new Promise(function(_0x3878f1,_0x43e1d7){return db[_0x7c6e('0x18')][_0x7c6e('0x23')](_0x17165c[_0x7c6e('0x24')],{'raw':_0x17165c[_0x7c6e('0x1a')]?_0x17165c['options'][_0x7c6e('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x17165c[_0x7c6e('0x1a')]?_0x17165c['options'][_0x7c6e('0x25')]||null:null,'attributes':_0x17165c[_0x7c6e('0x1a')]?_0x17165c[_0x7c6e('0x1a')][_0x7c6e('0x1c')]||null:null,'limit':_0x17165c['options']?_0x17165c[_0x7c6e('0x1a')]['limit']||null:null})[_0x7c6e('0xc')](function(_0x134361){logger[_0x7c6e('0xd')](_0x7c6e('0x26'),_0x17165c);logger[_0x7c6e('0x10')](_0x7c6e('0x26'),_0x17165c,JSON['stringify'](_0x134361));_0x3878f1(_0x134361);})['catch'](function(_0x5bccf4){logger['error'](_0x7c6e('0x26'),_0x5bccf4[_0x7c6e('0x14')],_0x17165c);_0x43e1d7(_0x1b45fc[_0x7c6e('0x13')](0x1f4,_0x5bccf4[_0x7c6e('0x14')]));});});};
\ No newline at end of file