Built motion from commit (unavailable).|2.5.0
[motion2.git] / server / api / voiceCallReport / voiceCallReport.rpc.js
index 2fc256a..baf5b34 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8cc1=['attributes','map','GetVoiceCallReport','CreateVoiceCallReport','create','body','raw','update','UpdateVoiceCallReport','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','info','request\x20sent','debug','stringify','error','code','VoiceCallReport,\x20%s,\x20%s','message','catch','VoiceCallReport','findAll','options','where','limit','include','model'];(function(_0x4ce1b9,_0x397a4b){var _0x2bb15d=function(_0x3790ad){while(--_0x3790ad){_0x4ce1b9['push'](_0x4ce1b9['shift']());}};_0x2bb15d(++_0x397a4b);}(_0x8cc1,0x7b));var _0x18cc=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x8cc1[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x18cc('0x0'));var util=require('util');var moment=require(_0x18cc('0x1'));var BPromise=require(_0x18cc('0x2'));var rs=require(_0x18cc('0x3'));var fs=require('fs');var Redis=require(_0x18cc('0x4'));var db=require(_0x18cc('0x5'))['db'];var utils=require(_0x18cc('0x6'));var logger=require(_0x18cc('0x7'))('rpc');var config=require(_0x18cc('0x8'));var jayson=require(_0x18cc('0x9'));var client=jayson['client'][_0x18cc('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x34c460,_0x18030e,_0xd7b407){return new BPromise(function(_0x19850d,_0x6c0d72){return client[_0x18cc('0xb')](_0x34c460,_0xd7b407)[_0x18cc('0xc')](function(_0x517678){logger[_0x18cc('0xd')]('VoiceCallReport,\x20%s,\x20%s',_0x18030e,_0x18cc('0xe'));logger[_0x18cc('0xf')]('VoiceCallReport,\x20%s,\x20%s,\x20%s',_0x18030e,_0x18cc('0xe'),JSON[_0x18cc('0x10')](_0x517678));if(_0x517678[_0x18cc('0x11')]){if(_0x517678['error'][_0x18cc('0x12')]===0x1f4){logger[_0x18cc('0x11')](_0x18cc('0x13'),_0x18030e,_0x517678[_0x18cc('0x11')][_0x18cc('0x14')]);return _0x6c0d72(_0x517678[_0x18cc('0x11')][_0x18cc('0x14')]);}logger[_0x18cc('0x11')](_0x18cc('0x13'),_0x18030e,_0x517678[_0x18cc('0x11')][_0x18cc('0x14')]);return _0x19850d(_0x517678[_0x18cc('0x11')]['message']);}else{logger[_0x18cc('0xd')](_0x18cc('0x13'),_0x18030e,_0x18cc('0xe'));_0x19850d(_0x517678['result']['message']);}})[_0x18cc('0x15')](function(_0x3f6ea1){logger[_0x18cc('0x11')](_0x18cc('0x13'),_0x18030e,_0x3f6ea1);_0x6c0d72(_0x3f6ea1);});});}exports['GetVoiceCallReport']=function(_0xd11c12){var _0x5b9a95=this;return new Promise(function(_0x330e73,_0x11bd5d){return db[_0x18cc('0x16')][_0x18cc('0x17')]({'raw':_0xd11c12[_0x18cc('0x18')]?_0xd11c12['options']['raw']===undefined?!![]:![]:!![],'where':_0xd11c12['options']?_0xd11c12[_0x18cc('0x18')][_0x18cc('0x19')]||null:null,'attributes':_0xd11c12[_0x18cc('0x18')]?_0xd11c12[_0x18cc('0x18')]['attributes']||null:null,'limit':_0xd11c12['options']?_0xd11c12[_0x18cc('0x18')][_0x18cc('0x1a')]||null:null,'include':_0xd11c12[_0x18cc('0x18')]?_0xd11c12['options'][_0x18cc('0x1b')]?_['map'](_0xd11c12[_0x18cc('0x18')]['include'],function(_0x309294){return{'model':db[_0x309294[_0x18cc('0x1c')]],'as':_0x309294['as'],'attributes':_0x309294[_0x18cc('0x1d')],'include':_0x309294[_0x18cc('0x1b')]?_[_0x18cc('0x1e')](_0x309294['include'],function(_0x251124){return{'model':db[_0x251124[_0x18cc('0x1c')]],'as':_0x251124['as'],'attributes':_0x251124[_0x18cc('0x1d')],'include':_0x251124[_0x18cc('0x1b')]?_[_0x18cc('0x1e')](_0x251124['include'],function(_0x416f1d){return{'model':db[_0x416f1d[_0x18cc('0x1c')]],'as':_0x416f1d['as'],'attributes':_0x416f1d['attributes']};}):[]};}):[]};}):[]:[]})[_0x18cc('0xc')](function(_0x5c2b39){logger['info']('GetVoiceCallReport',_0xd11c12);logger[_0x18cc('0xf')](_0x18cc('0x1f'),_0xd11c12,JSON['stringify'](_0x5c2b39));_0x330e73(_0x5c2b39);})[_0x18cc('0x15')](function(_0x360b85){logger[_0x18cc('0x11')](_0x18cc('0x1f'),_0x360b85[_0x18cc('0x14')],_0xd11c12);_0x11bd5d(_0x5b9a95['error'](0x1f4,_0x360b85[_0x18cc('0x14')]));});});};exports[_0x18cc('0x20')]=function(_0x41f881){var _0x617760=this;return new Promise(function(_0x290235,_0xe871f){return db[_0x18cc('0x16')][_0x18cc('0x21')](_0x41f881[_0x18cc('0x22')],{'raw':_0x41f881[_0x18cc('0x18')]?_0x41f881[_0x18cc('0x18')][_0x18cc('0x23')]===undefined?!![]:![]:!![]})[_0x18cc('0xc')](function(_0x1cb20a){logger[_0x18cc('0xd')](_0x18cc('0x20'),_0x41f881);logger['debug'](_0x18cc('0x20'),_0x41f881,JSON[_0x18cc('0x10')](_0x1cb20a));_0x290235(_0x1cb20a);})[_0x18cc('0x15')](function(_0x420590){logger['error'](_0x18cc('0x20'),_0x420590[_0x18cc('0x14')],_0x41f881);_0xe871f(_0x617760[_0x18cc('0x11')](0x1f4,_0x420590[_0x18cc('0x14')]));});});};exports['UpdateVoiceCallReport']=function(_0x12d25c){var _0x562c4e=this;return new Promise(function(_0x445dcc,_0x57ff8e){return db[_0x18cc('0x16')][_0x18cc('0x24')](_0x12d25c[_0x18cc('0x22')],{'raw':_0x12d25c[_0x18cc('0x18')]?_0x12d25c[_0x18cc('0x18')][_0x18cc('0x23')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x12d25c[_0x18cc('0x18')]?_0x12d25c[_0x18cc('0x18')][_0x18cc('0x19')]||null:null,'attributes':_0x12d25c['options']?_0x12d25c[_0x18cc('0x18')]['attributes']||null:null,'limit':_0x12d25c['options']?_0x12d25c[_0x18cc('0x18')][_0x18cc('0x1a')]||null:null})['then'](function(_0x3b35a0){logger[_0x18cc('0xd')]('UpdateVoiceCallReport',_0x12d25c);logger[_0x18cc('0xf')](_0x18cc('0x25'),_0x12d25c,JSON[_0x18cc('0x10')](_0x3b35a0));_0x445dcc(_0x3b35a0);})[_0x18cc('0x15')](function(_0x45ca53){logger[_0x18cc('0x11')](_0x18cc('0x25'),_0x45ca53['message'],_0x12d25c);_0x57ff8e(_0x562c4e[_0x18cc('0x11')](0x1f4,_0x45ca53[_0x18cc('0x14')]));});});};
\ No newline at end of file
+var _0x7527=['error','message','result','catch','VoiceCallReport','findAll','options','raw','where','attributes','limit','include','map','model','GetVoiceCallReport','stringify','CreateVoiceCallReport','create','body','UpdateVoiceCallReport','update','lodash','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http','then','info','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s'];(function(_0x20fb02,_0x96c029){var _0x24a33e=function(_0x4b5c8a){while(--_0x4b5c8a){_0x20fb02['push'](_0x20fb02['shift']());}};_0x24a33e(++_0x96c029);}(_0x7527,0x173));var _0x7752=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7527[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x7752('0x0'));var util=require('util');var moment=require(_0x7752('0x1'));var BPromise=require('bluebird');var rs=require(_0x7752('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7752('0x3'))['db'];var utils=require(_0x7752('0x4'));var logger=require(_0x7752('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x7752('0x6'));var client=jayson['client'][_0x7752('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x4befc1,_0x19e4cf,_0xa5fdb){return new BPromise(function(_0x1d0a98,_0x465699){return client['request'](_0x4befc1,_0xa5fdb)[_0x7752('0x8')](function(_0x40dc51){logger[_0x7752('0x9')](_0x7752('0xa'),_0x19e4cf,_0x7752('0xb'));logger[_0x7752('0xc')](_0x7752('0xd'),_0x19e4cf,'request\x20sent',JSON['stringify'](_0x40dc51));if(_0x40dc51['error']){if(_0x40dc51['error']['code']===0x1f4){logger[_0x7752('0xe')](_0x7752('0xa'),_0x19e4cf,_0x40dc51[_0x7752('0xe')][_0x7752('0xf')]);return _0x465699(_0x40dc51[_0x7752('0xe')]['message']);}logger[_0x7752('0xe')](_0x7752('0xa'),_0x19e4cf,_0x40dc51['error'][_0x7752('0xf')]);return _0x1d0a98(_0x40dc51[_0x7752('0xe')][_0x7752('0xf')]);}else{logger[_0x7752('0x9')]('VoiceCallReport,\x20%s,\x20%s',_0x19e4cf,_0x7752('0xb'));_0x1d0a98(_0x40dc51[_0x7752('0x10')][_0x7752('0xf')]);}})[_0x7752('0x11')](function(_0x15f4b7){logger['error'](_0x7752('0xa'),_0x19e4cf,_0x15f4b7);_0x465699(_0x15f4b7);});});}exports['GetVoiceCallReport']=function(_0x393e3d){var _0x227725=this;return new Promise(function(_0x62df5b,_0x302634){return db[_0x7752('0x12')][_0x7752('0x13')]({'raw':_0x393e3d[_0x7752('0x14')]?_0x393e3d[_0x7752('0x14')][_0x7752('0x15')]===undefined?!![]:![]:!![],'where':_0x393e3d[_0x7752('0x14')]?_0x393e3d[_0x7752('0x14')][_0x7752('0x16')]||null:null,'attributes':_0x393e3d[_0x7752('0x14')]?_0x393e3d[_0x7752('0x14')][_0x7752('0x17')]||null:null,'limit':_0x393e3d[_0x7752('0x14')]?_0x393e3d[_0x7752('0x14')][_0x7752('0x18')]||null:null,'include':_0x393e3d[_0x7752('0x14')]?_0x393e3d[_0x7752('0x14')][_0x7752('0x19')]?_[_0x7752('0x1a')](_0x393e3d[_0x7752('0x14')]['include'],function(_0x85c9f4){return{'model':db[_0x85c9f4['model']],'as':_0x85c9f4['as'],'attributes':_0x85c9f4[_0x7752('0x17')],'include':_0x85c9f4[_0x7752('0x19')]?_[_0x7752('0x1a')](_0x85c9f4[_0x7752('0x19')],function(_0x2c8c50){return{'model':db[_0x2c8c50[_0x7752('0x1b')]],'as':_0x2c8c50['as'],'attributes':_0x2c8c50[_0x7752('0x17')],'include':_0x2c8c50[_0x7752('0x19')]?_[_0x7752('0x1a')](_0x2c8c50[_0x7752('0x19')],function(_0xebdf00){return{'model':db[_0xebdf00[_0x7752('0x1b')]],'as':_0xebdf00['as'],'attributes':_0xebdf00[_0x7752('0x17')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x20ee09){logger[_0x7752('0x9')](_0x7752('0x1c'),_0x393e3d);logger[_0x7752('0xc')](_0x7752('0x1c'),_0x393e3d,JSON[_0x7752('0x1d')](_0x20ee09));_0x62df5b(_0x20ee09);})[_0x7752('0x11')](function(_0x579659){logger[_0x7752('0xe')](_0x7752('0x1c'),_0x579659[_0x7752('0xf')],_0x393e3d);_0x302634(_0x227725[_0x7752('0xe')](0x1f4,_0x579659[_0x7752('0xf')]));});});};exports[_0x7752('0x1e')]=function(_0x1d8867){var _0x428ff4=this;return new Promise(function(_0xf32cf6,_0x271abe){return db[_0x7752('0x12')][_0x7752('0x1f')](_0x1d8867[_0x7752('0x20')],{'raw':_0x1d8867[_0x7752('0x14')]?_0x1d8867[_0x7752('0x14')][_0x7752('0x15')]===undefined?!![]:![]:!![]})[_0x7752('0x8')](function(_0x447b23){logger[_0x7752('0x9')](_0x7752('0x1e'),_0x1d8867);logger[_0x7752('0xc')](_0x7752('0x1e'),_0x1d8867,JSON[_0x7752('0x1d')](_0x447b23));_0xf32cf6(_0x447b23);})[_0x7752('0x11')](function(_0x2c327a){logger['error'](_0x7752('0x1e'),_0x2c327a['message'],_0x1d8867);_0x271abe(_0x428ff4[_0x7752('0xe')](0x1f4,_0x2c327a[_0x7752('0xf')]));});});};exports[_0x7752('0x21')]=function(_0x46977b){var _0x396e=this;return new Promise(function(_0x542103,_0x5e64e3){return db['VoiceCallReport'][_0x7752('0x22')](_0x46977b[_0x7752('0x20')],{'raw':_0x46977b['options']?_0x46977b['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x46977b[_0x7752('0x14')]?_0x46977b[_0x7752('0x14')][_0x7752('0x16')]||null:null,'attributes':_0x46977b[_0x7752('0x14')]?_0x46977b[_0x7752('0x14')][_0x7752('0x17')]||null:null,'limit':_0x46977b['options']?_0x46977b[_0x7752('0x14')]['limit']||null:null})[_0x7752('0x8')](function(_0xce0bc0){logger[_0x7752('0x9')](_0x7752('0x21'),_0x46977b);logger['debug']('UpdateVoiceCallReport',_0x46977b,JSON[_0x7752('0x1d')](_0xce0bc0));_0x542103(_0xce0bc0);})[_0x7752('0x11')](function(_0x25364d){logger[_0x7752('0xe')](_0x7752('0x21'),_0x25364d[_0x7752('0xf')],_0x46977b);_0x5e64e3(_0x396e[_0x7752('0xe')](0x1f4,_0x25364d['message']));});});};
\ No newline at end of file