Built motion from commit bab6f49e.|2.6.17
[motion2.git] / server / api / cmCompany / cmCompany.rpc.js
index caf6399..1338742 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3168=['util','moment','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','CmCompany,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','info','result','lodash'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3168,0x17b));var _0x8316=function(_0x594cc7,_0x1e625b){_0x594cc7=_0x594cc7-0x0;var _0x3c1cb5=_0x3168[_0x594cc7];return _0x3c1cb5;};'use strict';var _=require(_0x8316('0x0'));var util=require(_0x8316('0x1'));var moment=require(_0x8316('0x2'));var BPromise=require(_0x8316('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x8316('0x4'));var logger=require(_0x8316('0x5'))(_0x8316('0x6'));var config=require(_0x8316('0x7'));var jayson=require(_0x8316('0x8'));var client=jayson[_0x8316('0x9')][_0x8316('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x443dde,_0x179c23,_0xbac269){return new BPromise(function(_0x520e71,_0x5a7fd5){return client['request'](_0x443dde,_0xbac269)['then'](function(_0x177e80){logger['info'](_0x8316('0xb'),_0x179c23,_0x8316('0xc'));logger[_0x8316('0xd')]('CmCompany,\x20%s,\x20%s,\x20%s',_0x179c23,_0x8316('0xc'),JSON[_0x8316('0xe')](_0x177e80));if(_0x177e80['error']){if(_0x177e80[_0x8316('0xf')]['code']===0x1f4){logger[_0x8316('0xf')](_0x8316('0xb'),_0x179c23,_0x177e80['error'][_0x8316('0x10')]);return _0x5a7fd5(_0x177e80[_0x8316('0xf')][_0x8316('0x10')]);}logger[_0x8316('0xf')](_0x8316('0xb'),_0x179c23,_0x177e80[_0x8316('0xf')][_0x8316('0x10')]);return _0x520e71(_0x177e80['error']['message']);}else{logger[_0x8316('0x11')](_0x8316('0xb'),_0x179c23,_0x8316('0xc'));_0x520e71(_0x177e80[_0x8316('0x12')][_0x8316('0x10')]);}})['catch'](function(_0x103cfa){logger['error'](_0x8316('0xb'),_0x179c23,_0x103cfa);_0x5a7fd5(_0x103cfa);});});}
\ No newline at end of file
+var _0x5796=['ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','CmCompany,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring'];(function(_0x538c70,_0x35531f){var _0x42ae01=function(_0x5c7368){while(--_0x5c7368){_0x538c70['push'](_0x538c70['shift']());}};_0x42ae01(++_0x35531f);}(_0x5796,0x6a));var _0x6579=function(_0x1d0c88,_0x30dfbe){_0x1d0c88=_0x1d0c88-0x0;var _0x1196ae=_0x5796[_0x1d0c88];return _0x1196ae;};'use strict';var _=require(_0x6579('0x0'));var util=require('util');var moment=require(_0x6579('0x1'));var BPromise=require(_0x6579('0x2'));var rs=require(_0x6579('0x3'));var fs=require('fs');var Redis=require(_0x6579('0x4'));var db=require(_0x6579('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x6579('0x6'))(_0x6579('0x7'));var config=require(_0x6579('0x8'));var jayson=require(_0x6579('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x10eedb,_0xb30a97,_0xd522c0){return new BPromise(function(_0x19b590,_0xc792cc){return client[_0x6579('0xa')](_0x10eedb,_0xd522c0)[_0x6579('0xb')](function(_0x3de2cc){logger[_0x6579('0xc')](_0x6579('0xd'),_0xb30a97,_0x6579('0xe'));logger[_0x6579('0xf')]('CmCompany,\x20%s,\x20%s,\x20%s',_0xb30a97,_0x6579('0xe'),JSON[_0x6579('0x10')](_0x3de2cc));if(_0x3de2cc[_0x6579('0x11')]){if(_0x3de2cc[_0x6579('0x11')][_0x6579('0x12')]===0x1f4){logger['error'](_0x6579('0xd'),_0xb30a97,_0x3de2cc[_0x6579('0x11')][_0x6579('0x13')]);return _0xc792cc(_0x3de2cc[_0x6579('0x11')][_0x6579('0x13')]);}logger[_0x6579('0x11')](_0x6579('0xd'),_0xb30a97,_0x3de2cc['error'][_0x6579('0x13')]);return _0x19b590(_0x3de2cc[_0x6579('0x11')][_0x6579('0x13')]);}else{logger[_0x6579('0xc')](_0x6579('0xd'),_0xb30a97,_0x6579('0xe'));_0x19b590(_0x3de2cc[_0x6579('0x14')][_0x6579('0x13')]);}})[_0x6579('0x15')](function(_0x3e2fa8){logger[_0x6579('0x11')](_0x6579('0xd'),_0xb30a97,_0x3e2fa8);_0xc792cc(_0x3e2fa8);});});}
\ No newline at end of file