Built motion from commit c116dc8b.|2.6.30
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index 28851ab..73044ad 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6910=['debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','stringify','error','code','ReportAgentPreview,\x20%s,\x20%s','message','result','catch','CreateReportAgentPreview','ReportAgentPreview','options','lodash','util','moment','bluebird','randomstring','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent'];(function(_0x10b695,_0x1347c9){var _0x5a5a48=function(_0x421efa){while(--_0x421efa){_0x10b695['push'](_0x10b695['shift']());}};_0x5a5a48(++_0x1347c9);}(_0x6910,0x186));var _0x0691=function(_0xa72931,_0x37d87a){_0xa72931=_0xa72931-0x0;var _0x13b2f5=_0x6910[_0xa72931];return _0x13b2f5;};'use strict';var _=require(_0x0691('0x0'));var util=require(_0x0691('0x1'));var moment=require(_0x0691('0x2'));var BPromise=require(_0x0691('0x3'));var rs=require(_0x0691('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x0691('0x5'));var logger=require('../../config/logger')(_0x0691('0x6'));var config=require(_0x0691('0x7'));var jayson=require(_0x0691('0x8'));var client=jayson[_0x0691('0x9')][_0x0691('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3ce751,_0x1c4d51,_0x380bed){return new BPromise(function(_0x546275,_0x172603){return client[_0x0691('0xb')](_0x3ce751,_0x380bed)[_0x0691('0xc')](function(_0x446f2f){logger[_0x0691('0xd')]('ReportAgentPreview,\x20%s,\x20%s',_0x1c4d51,_0x0691('0xe'));logger[_0x0691('0xf')](_0x0691('0x10'),_0x1c4d51,'request\x20sent',JSON[_0x0691('0x11')](_0x446f2f));if(_0x446f2f['error']){if(_0x446f2f[_0x0691('0x12')][_0x0691('0x13')]===0x1f4){logger[_0x0691('0x12')](_0x0691('0x14'),_0x1c4d51,_0x446f2f[_0x0691('0x12')][_0x0691('0x15')]);return _0x172603(_0x446f2f[_0x0691('0x12')]['message']);}logger[_0x0691('0x12')](_0x0691('0x14'),_0x1c4d51,_0x446f2f[_0x0691('0x12')][_0x0691('0x15')]);return _0x546275(_0x446f2f[_0x0691('0x12')]['message']);}else{logger[_0x0691('0xd')](_0x0691('0x14'),_0x1c4d51,_0x0691('0xe'));_0x546275(_0x446f2f[_0x0691('0x16')]['message']);}})[_0x0691('0x17')](function(_0x586351){logger['error'](_0x0691('0x14'),_0x1c4d51,_0x586351);_0x172603(_0x586351);});});}exports[_0x0691('0x18')]=function(_0x107109){var _0x333a40=this;return new Promise(function(_0x2ab156,_0x5de59c){return db[_0x0691('0x19')]['create'](_0x107109['body'],{'raw':_0x107109['options']?_0x107109[_0x0691('0x1a')]['raw']===undefined?!![]:![]:!![]})[_0x0691('0xc')](function(_0x3af820){logger['info'](_0x0691('0x18'),_0x107109);logger[_0x0691('0xf')](_0x0691('0x18'),_0x107109,JSON[_0x0691('0x11')](_0x3af820));_0x2ab156(_0x3af820);})[_0x0691('0x17')](function(_0x172aaf){logger[_0x0691('0x12')](_0x0691('0x18'),_0x172aaf['message'],_0x107109);_0x5de59c(_0x333a40[_0x0691('0x12')](0x1f4,_0x172aaf[_0x0691('0x15')]));});});};
\ No newline at end of file
+var _0x41af=['body','info','CreateReportAgentPreview','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','then','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','create'];(function(_0x819464,_0x46fc91){var _0x49dcc0=function(_0x36b2b2){while(--_0x36b2b2){_0x819464['push'](_0x819464['shift']());}};_0x49dcc0(++_0x46fc91);}(_0x41af,0x147));var _0xf41a=function(_0x4c0277,_0x4e4ba5){_0x4c0277=_0x4c0277-0x0;var _0x5a84e7=_0x41af[_0x4c0277];return _0x5a84e7;};'use strict';var _=require(_0xf41a('0x0'));var util=require(_0xf41a('0x1'));var moment=require(_0xf41a('0x2'));var BPromise=require(_0xf41a('0x3'));var rs=require(_0xf41a('0x4'));var fs=require('fs');var Redis=require(_0xf41a('0x5'));var db=require(_0xf41a('0x6'))['db'];var utils=require(_0xf41a('0x7'));var logger=require(_0xf41a('0x8'))(_0xf41a('0x9'));var config=require(_0xf41a('0xa'));var jayson=require(_0xf41a('0xb'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x413cfe,_0x24f19c,_0x521bb7){return new BPromise(function(_0x268ea7,_0x300bee){return client['request'](_0x413cfe,_0x521bb7)[_0xf41a('0xc')](function(_0x3c3f2b){logger['info'](_0xf41a('0xd'),_0x24f19c,_0xf41a('0xe'));logger[_0xf41a('0xf')](_0xf41a('0x10'),_0x24f19c,_0xf41a('0xe'),JSON[_0xf41a('0x11')](_0x3c3f2b));if(_0x3c3f2b[_0xf41a('0x12')]){if(_0x3c3f2b[_0xf41a('0x12')][_0xf41a('0x13')]===0x1f4){logger['error'](_0xf41a('0xd'),_0x24f19c,_0x3c3f2b[_0xf41a('0x12')][_0xf41a('0x14')]);return _0x300bee(_0x3c3f2b['error'][_0xf41a('0x14')]);}logger[_0xf41a('0x12')](_0xf41a('0xd'),_0x24f19c,_0x3c3f2b['error'][_0xf41a('0x14')]);return _0x268ea7(_0x3c3f2b[_0xf41a('0x12')][_0xf41a('0x14')]);}else{logger['info']('ReportAgentPreview,\x20%s,\x20%s',_0x24f19c,_0xf41a('0xe'));_0x268ea7(_0x3c3f2b[_0xf41a('0x15')][_0xf41a('0x14')]);}})[_0xf41a('0x16')](function(_0x4bb8f9){logger['error'](_0xf41a('0xd'),_0x24f19c,_0x4bb8f9);_0x300bee(_0x4bb8f9);});});}exports['CreateReportAgentPreview']=function(_0x593e66){var _0x2ba776=this;return new Promise(function(_0x49e2f0,_0x4c4aa2){return db['ReportAgentPreview'][_0xf41a('0x17')](_0x593e66[_0xf41a('0x18')],{'raw':_0x593e66['options']?_0x593e66['options']['raw']===undefined?!![]:![]:!![]})[_0xf41a('0xc')](function(_0x24b519){logger[_0xf41a('0x19')](_0xf41a('0x1a'),_0x593e66);logger[_0xf41a('0xf')](_0xf41a('0x1a'),_0x593e66,JSON['stringify'](_0x24b519));_0x49e2f0(_0x24b519);})[_0xf41a('0x16')](function(_0x41b4d5){logger['error'](_0xf41a('0x1a'),_0x41b4d5[_0xf41a('0x14')],_0x593e66);_0x4c4aa2(_0x2ba776[_0xf41a('0x12')](0x1f4,_0x41b4d5[_0xf41a('0x14')]));});});};
\ No newline at end of file