Built motion from commit a61a4a20.|2.5.46
[motion2.git] / server / api / reportAgentPreview / reportAgentPreview.rpc.js
index 9c945f9..368d646 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x97f7=['info','result','catch','ReportAgentPreview','create','body','options','raw','CreateReportAgentPreview','stringify','lodash','util','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug','error','code','message'];(function(_0x4cb3bc,_0x4759bf){var _0x160e55=function(_0x4b7018){while(--_0x4b7018){_0x4cb3bc['push'](_0x4cb3bc['shift']());}};_0x160e55(++_0x4759bf);}(_0x97f7,0x10f));var _0x797f=function(_0x11c573,_0x9e7c6e){_0x11c573=_0x11c573-0x0;var _0x6b72de=_0x97f7[_0x11c573];return _0x6b72de;};'use strict';var _=require(_0x797f('0x0'));var util=require(_0x797f('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x797f('0x2'));var db=require(_0x797f('0x3'))['db'];var utils=require(_0x797f('0x4'));var logger=require(_0x797f('0x5'))(_0x797f('0x6'));var config=require(_0x797f('0x7'));var jayson=require(_0x797f('0x8'));var client=jayson[_0x797f('0x9')][_0x797f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x24742a,_0x2c05d1,_0x41caee){return new BPromise(function(_0x1dbb36,_0x32e1f3){return client[_0x797f('0xb')](_0x24742a,_0x41caee)[_0x797f('0xc')](function(_0x23f2d1){logger['info'](_0x797f('0xd'),_0x2c05d1,_0x797f('0xe'));logger[_0x797f('0xf')]('ReportAgentPreview,\x20%s,\x20%s,\x20%s',_0x2c05d1,_0x797f('0xe'),JSON['stringify'](_0x23f2d1));if(_0x23f2d1[_0x797f('0x10')]){if(_0x23f2d1[_0x797f('0x10')][_0x797f('0x11')]===0x1f4){logger[_0x797f('0x10')](_0x797f('0xd'),_0x2c05d1,_0x23f2d1[_0x797f('0x10')]['message']);return _0x32e1f3(_0x23f2d1[_0x797f('0x10')][_0x797f('0x12')]);}logger['error'](_0x797f('0xd'),_0x2c05d1,_0x23f2d1[_0x797f('0x10')][_0x797f('0x12')]);return _0x1dbb36(_0x23f2d1[_0x797f('0x10')][_0x797f('0x12')]);}else{logger[_0x797f('0x13')](_0x797f('0xd'),_0x2c05d1,_0x797f('0xe'));_0x1dbb36(_0x23f2d1[_0x797f('0x14')][_0x797f('0x12')]);}})[_0x797f('0x15')](function(_0x3a48d2){logger[_0x797f('0x10')](_0x797f('0xd'),_0x2c05d1,_0x3a48d2);_0x32e1f3(_0x3a48d2);});});}exports['CreateReportAgentPreview']=function(_0x164fe7){var _0x1c04f5=this;return new Promise(function(_0x430819,_0x578cac){return db[_0x797f('0x16')][_0x797f('0x17')](_0x164fe7[_0x797f('0x18')],{'raw':_0x164fe7[_0x797f('0x19')]?_0x164fe7[_0x797f('0x19')][_0x797f('0x1a')]===undefined?!![]:![]:!![]})[_0x797f('0xc')](function(_0x2203b0){logger[_0x797f('0x13')](_0x797f('0x1b'),_0x164fe7);logger[_0x797f('0xf')](_0x797f('0x1b'),_0x164fe7,JSON[_0x797f('0x1c')](_0x2203b0));_0x430819(_0x2203b0);})[_0x797f('0x15')](function(_0x59af4a){logger['error'](_0x797f('0x1b'),_0x59af4a[_0x797f('0x12')],_0x164fe7);_0x578cac(_0x1c04f5[_0x797f('0x10')](0x1f4,_0x59af4a['message']));});});};
\ No newline at end of file
+var _0x676f=['CreateReportAgentPreview','debug','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','then','info','request\x20sent','ReportAgentPreview,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ReportAgentPreview,\x20%s,\x20%s','catch','ReportAgentPreview','create','body','options'];(function(_0x103ca3,_0x3b43d8){var _0x4461d9=function(_0x2d7f03){while(--_0x2d7f03){_0x103ca3['push'](_0x103ca3['shift']());}};_0x4461d9(++_0x3b43d8);}(_0x676f,0x197));var _0xf676=function(_0x8f85a4,_0x53689a){_0x8f85a4=_0x8f85a4-0x0;var _0x9b269d=_0x676f[_0x8f85a4];return _0x9b269d;};'use strict';var _=require('lodash');var util=require(_0xf676('0x0'));var moment=require(_0xf676('0x1'));var BPromise=require(_0xf676('0x2'));var rs=require(_0xf676('0x3'));var fs=require('fs');var Redis=require(_0xf676('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xf676('0x5'));var logger=require(_0xf676('0x6'))(_0xf676('0x7'));var config=require('../../config/environment');var jayson=require(_0xf676('0x8'));var client=jayson[_0xf676('0x9')][_0xf676('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5085d1,_0x23d709,_0x5ee9fc){return new BPromise(function(_0x549653,_0x996708){return client['request'](_0x5085d1,_0x5ee9fc)[_0xf676('0xb')](function(_0x4c503b){logger[_0xf676('0xc')]('ReportAgentPreview,\x20%s,\x20%s',_0x23d709,_0xf676('0xd'));logger['debug'](_0xf676('0xe'),_0x23d709,_0xf676('0xd'),JSON[_0xf676('0xf')](_0x4c503b));if(_0x4c503b[_0xf676('0x10')]){if(_0x4c503b[_0xf676('0x10')][_0xf676('0x11')]===0x1f4){logger[_0xf676('0x10')]('ReportAgentPreview,\x20%s,\x20%s',_0x23d709,_0x4c503b[_0xf676('0x10')][_0xf676('0x12')]);return _0x996708(_0x4c503b[_0xf676('0x10')][_0xf676('0x12')]);}logger[_0xf676('0x10')](_0xf676('0x13'),_0x23d709,_0x4c503b[_0xf676('0x10')]['message']);return _0x549653(_0x4c503b[_0xf676('0x10')][_0xf676('0x12')]);}else{logger[_0xf676('0xc')](_0xf676('0x13'),_0x23d709,_0xf676('0xd'));_0x549653(_0x4c503b['result'][_0xf676('0x12')]);}})[_0xf676('0x14')](function(_0x944cdd){logger['error']('ReportAgentPreview,\x20%s,\x20%s',_0x23d709,_0x944cdd);_0x996708(_0x944cdd);});});}exports['CreateReportAgentPreview']=function(_0x411f41){var _0x503b4e=this;return new Promise(function(_0x289581,_0x55349e){return db[_0xf676('0x15')][_0xf676('0x16')](_0x411f41[_0xf676('0x17')],{'raw':_0x411f41[_0xf676('0x18')]?_0x411f41[_0xf676('0x18')]['raw']===undefined?!![]:![]:!![]})[_0xf676('0xb')](function(_0x4357e9){logger[_0xf676('0xc')](_0xf676('0x19'),_0x411f41);logger[_0xf676('0x1a')](_0xf676('0x19'),_0x411f41,JSON[_0xf676('0xf')](_0x4357e9));_0x289581(_0x4357e9);})[_0xf676('0x14')](function(_0x46dd2c){logger[_0xf676('0x10')]('CreateReportAgentPreview',_0x46dd2c['message'],_0x411f41);_0x55349e(_0x503b4e[_0xf676('0x10')](0x1f4,_0x46dd2c['message']));});});};
\ No newline at end of file