Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / api / squareReport / squareReport.rpc.js
index 7b4eec8..0df00f7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xccfd=['UpdateSquareReport','SquareReport','body','where','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','SquareReport,\x20%s,\x20%s','request\x20sent','debug','SquareReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','create','options','raw','CreateSquareReport'];(function(_0x5ccb33,_0xa4bcbe){var _0x4c1db8=function(_0x195494){while(--_0x195494){_0x5ccb33['push'](_0x5ccb33['shift']());}};_0x4c1db8(++_0xa4bcbe);}(_0xccfd,0xf3));var _0xdccf=function(_0x942433,_0x22c9e4){_0x942433=_0x942433-0x0;var _0x2b3cd3=_0xccfd[_0x942433];return _0x2b3cd3;};'use strict';var _=require(_0xdccf('0x0'));var util=require(_0xdccf('0x1'));var moment=require(_0xdccf('0x2'));var BPromise=require(_0xdccf('0x3'));var rs=require(_0xdccf('0x4'));var fs=require('fs');var Redis=require(_0xdccf('0x5'));var db=require(_0xdccf('0x6'))['db'];var utils=require(_0xdccf('0x7'));var logger=require(_0xdccf('0x8'))(_0xdccf('0x9'));var config=require(_0xdccf('0xa'));var jayson=require('jayson/promise');var client=jayson[_0xdccf('0xb')][_0xdccf('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x1d4ee5,_0x4a85a2,_0x5524ec){return new BPromise(function(_0x1569cb,_0x5e45fa){return client[_0xdccf('0xd')](_0x1d4ee5,_0x5524ec)[_0xdccf('0xe')](function(_0xefd5b5){logger['info'](_0xdccf('0xf'),_0x4a85a2,_0xdccf('0x10'));logger[_0xdccf('0x11')](_0xdccf('0x12'),_0x4a85a2,_0xdccf('0x10'),JSON[_0xdccf('0x13')](_0xefd5b5));if(_0xefd5b5['error']){if(_0xefd5b5[_0xdccf('0x14')][_0xdccf('0x15')]===0x1f4){logger[_0xdccf('0x14')](_0xdccf('0xf'),_0x4a85a2,_0xefd5b5[_0xdccf('0x14')][_0xdccf('0x16')]);return _0x5e45fa(_0xefd5b5[_0xdccf('0x14')]['message']);}logger[_0xdccf('0x14')]('SquareReport,\x20%s,\x20%s',_0x4a85a2,_0xefd5b5[_0xdccf('0x14')]['message']);return _0x1569cb(_0xefd5b5[_0xdccf('0x14')][_0xdccf('0x16')]);}else{logger[_0xdccf('0x17')](_0xdccf('0xf'),_0x4a85a2,'request\x20sent');_0x1569cb(_0xefd5b5[_0xdccf('0x18')][_0xdccf('0x16')]);}})['catch'](function(_0x44db24){logger[_0xdccf('0x14')](_0xdccf('0xf'),_0x4a85a2,_0x44db24);_0x5e45fa(_0x44db24);});});}exports['CreateSquareReport']=function(_0x3e7e1b){var _0x584f26=this;return new Promise(function(_0x572148,_0x29fb04){return db['SquareReport'][_0xdccf('0x19')](_0x3e7e1b['body'],{'raw':_0x3e7e1b[_0xdccf('0x1a')]?_0x3e7e1b[_0xdccf('0x1a')][_0xdccf('0x1b')]===undefined?!![]:![]:!![]})['then'](function(_0x4690bc){logger[_0xdccf('0x17')](_0xdccf('0x1c'),_0x3e7e1b);logger[_0xdccf('0x11')](_0xdccf('0x1c'),_0x3e7e1b,JSON[_0xdccf('0x13')](_0x4690bc));_0x572148(_0x4690bc);})['catch'](function(_0x2e869b){logger[_0xdccf('0x14')](_0xdccf('0x1c'),_0x2e869b[_0xdccf('0x16')],_0x3e7e1b);_0x29fb04(_0x584f26[_0xdccf('0x14')](0x1f4,_0x2e869b['message']));});});};exports[_0xdccf('0x1d')]=function(_0x764aa2){var _0x5e2ea0=this;return new Promise(function(_0x562175,_0x30fa81){return db[_0xdccf('0x1e')]['update'](_0x764aa2[_0xdccf('0x1f')],{'raw':_0x764aa2[_0xdccf('0x1a')]?_0x764aa2[_0xdccf('0x1a')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x764aa2[_0xdccf('0x1a')]?_0x764aa2['options'][_0xdccf('0x20')]||null:null,'attributes':_0x764aa2[_0xdccf('0x1a')]?_0x764aa2[_0xdccf('0x1a')]['attributes']||null:null,'limit':_0x764aa2[_0xdccf('0x1a')]?_0x764aa2[_0xdccf('0x1a')]['limit']||null:null})['then'](function(_0x4f66e5){logger[_0xdccf('0x17')](_0xdccf('0x1d'),_0x764aa2);logger['debug']('UpdateSquareReport',_0x764aa2,JSON[_0xdccf('0x13')](_0x4f66e5));_0x562175(_0x4f66e5);})[_0xdccf('0x21')](function(_0x37f69f){logger[_0xdccf('0x14')](_0xdccf('0x1d'),_0x37f69f[_0xdccf('0x16')],_0x764aa2);_0x30fa81(_0x5e2ea0['error'](0x1f4,_0x37f69f['message']));});});};
\ No newline at end of file
+var _0xd65e=['UpdateSquareReport','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','info','SquareReport,\x20%s,\x20%s','SquareReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','CreateSquareReport','SquareReport','create','options','debug','catch','update','body','limit'];(function(_0x2b4411,_0x2625ed){var _0x8e41ef=function(_0x2aa8c1){while(--_0x2aa8c1){_0x2b4411['push'](_0x2b4411['shift']());}};_0x8e41ef(++_0x2625ed);}(_0xd65e,0xc1));var _0xed65=function(_0x3f827a,_0x93c7d9){_0x3f827a=_0x3f827a-0x0;var _0x193b12=_0xd65e[_0x3f827a];return _0x193b12;};'use strict';var _=require(_0xed65('0x0'));var util=require(_0xed65('0x1'));var moment=require(_0xed65('0x2'));var BPromise=require(_0xed65('0x3'));var rs=require(_0xed65('0x4'));var fs=require('fs');var Redis=require(_0xed65('0x5'));var db=require(_0xed65('0x6'))['db'];var utils=require(_0xed65('0x7'));var logger=require(_0xed65('0x8'))(_0xed65('0x9'));var config=require('../../config/environment');var jayson=require(_0xed65('0xa'));var client=jayson[_0xed65('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x41f913,_0x4a2b82,_0x1ec23f){return new BPromise(function(_0x681486,_0x231b5f){return client[_0xed65('0xc')](_0x41f913,_0x1ec23f)[_0xed65('0xd')](function(_0x119db9){logger[_0xed65('0xe')](_0xed65('0xf'),_0x4a2b82,'request\x20sent');logger['debug'](_0xed65('0x10'),_0x4a2b82,_0xed65('0x11'),JSON[_0xed65('0x12')](_0x119db9));if(_0x119db9[_0xed65('0x13')]){if(_0x119db9[_0xed65('0x13')][_0xed65('0x14')]===0x1f4){logger[_0xed65('0x13')]('SquareReport,\x20%s,\x20%s',_0x4a2b82,_0x119db9[_0xed65('0x13')]['message']);return _0x231b5f(_0x119db9[_0xed65('0x13')]['message']);}logger[_0xed65('0x13')](_0xed65('0xf'),_0x4a2b82,_0x119db9[_0xed65('0x13')][_0xed65('0x15')]);return _0x681486(_0x119db9[_0xed65('0x13')][_0xed65('0x15')]);}else{logger[_0xed65('0xe')](_0xed65('0xf'),_0x4a2b82,_0xed65('0x11'));_0x681486(_0x119db9['result'][_0xed65('0x15')]);}})['catch'](function(_0x139608){logger[_0xed65('0x13')](_0xed65('0xf'),_0x4a2b82,_0x139608);_0x231b5f(_0x139608);});});}exports[_0xed65('0x16')]=function(_0x5bffb7){var _0x5594dc=this;return new Promise(function(_0x1e4f15,_0x53ec19){return db[_0xed65('0x17')][_0xed65('0x18')](_0x5bffb7['body'],{'raw':_0x5bffb7[_0xed65('0x19')]?_0x5bffb7[_0xed65('0x19')]['raw']===undefined?!![]:![]:!![]})[_0xed65('0xd')](function(_0x2dc0f7){logger[_0xed65('0xe')]('CreateSquareReport',_0x5bffb7);logger[_0xed65('0x1a')](_0xed65('0x16'),_0x5bffb7,JSON['stringify'](_0x2dc0f7));_0x1e4f15(_0x2dc0f7);})[_0xed65('0x1b')](function(_0x13b9b7){logger[_0xed65('0x13')](_0xed65('0x16'),_0x13b9b7[_0xed65('0x15')],_0x5bffb7);_0x53ec19(_0x5594dc[_0xed65('0x13')](0x1f4,_0x13b9b7[_0xed65('0x15')]));});});};exports['UpdateSquareReport']=function(_0x4813c6){var _0x38d223=this;return new Promise(function(_0x36cb56,_0x1a83b6){return db[_0xed65('0x17')][_0xed65('0x1c')](_0x4813c6[_0xed65('0x1d')],{'raw':_0x4813c6[_0xed65('0x19')]?_0x4813c6[_0xed65('0x19')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4813c6[_0xed65('0x19')]?_0x4813c6['options']['where']||null:null,'attributes':_0x4813c6[_0xed65('0x19')]?_0x4813c6[_0xed65('0x19')]['attributes']||null:null,'limit':_0x4813c6[_0xed65('0x19')]?_0x4813c6[_0xed65('0x19')][_0xed65('0x1e')]||null:null})[_0xed65('0xd')](function(_0x5c7e3d){logger[_0xed65('0xe')]('UpdateSquareReport',_0x4813c6);logger[_0xed65('0x1a')](_0xed65('0x1f'),_0x4813c6,JSON['stringify'](_0x5c7e3d));_0x36cb56(_0x5c7e3d);})['catch'](function(_0x3c9d48){logger[_0xed65('0x13')](_0xed65('0x1f'),_0x3c9d48[_0xed65('0x15')],_0x4813c6);_0x1a83b6(_0x38d223[_0xed65('0x13')](0x1f4,_0x3c9d48[_0xed65('0x15')]));});});};
\ No newline at end of file