Built motion from commit a61a4a20.|2.5.46
[motion2.git] / server / api / squareReport / squareReport.rpc.js
index c3caee3..baf9876 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x99f9=['CreateSquareReport','SquareReport','create','body','options','raw','UpdateSquareReport','update','where','attributes','limit','then','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','info','SquareReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch'];(function(_0x299908,_0xadc128){var _0x22dc34=function(_0x53413b){while(--_0x53413b){_0x299908['push'](_0x299908['shift']());}};_0x22dc34(++_0xadc128);}(_0x99f9,0x88));var _0x999f=function(_0x774895,_0x441885){_0x774895=_0x774895-0x0;var _0x56c0bb=_0x99f9[_0x774895];return _0x56c0bb;};'use strict';var _=require(_0x999f('0x0'));var util=require(_0x999f('0x1'));var moment=require(_0x999f('0x2'));var BPromise=require('bluebird');var rs=require(_0x999f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x999f('0x4'))['db'];var utils=require(_0x999f('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x999f('0x6'));var jayson=require(_0x999f('0x7'));var client=jayson[_0x999f('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2994d0,_0x543ba7,_0x195711){return new BPromise(function(_0x33b87d,_0xb13c54){return client['request'](_0x2994d0,_0x195711)['then'](function(_0x1e05fd){logger[_0x999f('0x9')](_0x999f('0xa'),_0x543ba7,_0x999f('0xb'));logger[_0x999f('0xc')]('SquareReport,\x20%s,\x20%s,\x20%s',_0x543ba7,_0x999f('0xb'),JSON[_0x999f('0xd')](_0x1e05fd));if(_0x1e05fd[_0x999f('0xe')]){if(_0x1e05fd[_0x999f('0xe')][_0x999f('0xf')]===0x1f4){logger[_0x999f('0xe')]('SquareReport,\x20%s,\x20%s',_0x543ba7,_0x1e05fd[_0x999f('0xe')]['message']);return _0xb13c54(_0x1e05fd[_0x999f('0xe')][_0x999f('0x10')]);}logger[_0x999f('0xe')]('SquareReport,\x20%s,\x20%s',_0x543ba7,_0x1e05fd[_0x999f('0xe')][_0x999f('0x10')]);return _0x33b87d(_0x1e05fd['error'][_0x999f('0x10')]);}else{logger['info'](_0x999f('0xa'),_0x543ba7,_0x999f('0xb'));_0x33b87d(_0x1e05fd[_0x999f('0x11')][_0x999f('0x10')]);}})[_0x999f('0x12')](function(_0x6037c6){logger[_0x999f('0xe')](_0x999f('0xa'),_0x543ba7,_0x6037c6);_0xb13c54(_0x6037c6);});});}exports[_0x999f('0x13')]=function(_0x165add){var _0x241341=this;return new Promise(function(_0x9e07b,_0x52b60e){return db[_0x999f('0x14')][_0x999f('0x15')](_0x165add[_0x999f('0x16')],{'raw':_0x165add[_0x999f('0x17')]?_0x165add[_0x999f('0x17')][_0x999f('0x18')]===undefined?!![]:![]:!![]})['then'](function(_0x4e841f){logger[_0x999f('0x9')](_0x999f('0x13'),_0x165add);logger[_0x999f('0xc')](_0x999f('0x13'),_0x165add,JSON['stringify'](_0x4e841f));_0x9e07b(_0x4e841f);})[_0x999f('0x12')](function(_0x4823a4){logger['error']('CreateSquareReport',_0x4823a4[_0x999f('0x10')],_0x165add);_0x52b60e(_0x241341[_0x999f('0xe')](0x1f4,_0x4823a4[_0x999f('0x10')]));});});};exports[_0x999f('0x19')]=function(_0x2ea2c5){var _0x233ba7=this;return new Promise(function(_0x31cee0,_0x32eb60){return db[_0x999f('0x14')][_0x999f('0x1a')](_0x2ea2c5[_0x999f('0x16')],{'raw':_0x2ea2c5[_0x999f('0x17')]?_0x2ea2c5[_0x999f('0x17')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2ea2c5['options']?_0x2ea2c5[_0x999f('0x17')][_0x999f('0x1b')]||null:null,'attributes':_0x2ea2c5[_0x999f('0x17')]?_0x2ea2c5['options'][_0x999f('0x1c')]||null:null,'limit':_0x2ea2c5['options']?_0x2ea2c5[_0x999f('0x17')][_0x999f('0x1d')]||null:null})[_0x999f('0x1e')](function(_0x434da9){logger[_0x999f('0x9')](_0x999f('0x19'),_0x2ea2c5);logger['debug']('UpdateSquareReport',_0x2ea2c5,JSON['stringify'](_0x434da9));_0x31cee0(_0x434da9);})[_0x999f('0x12')](function(_0x13837d){logger['error'](_0x999f('0x19'),_0x13837d[_0x999f('0x10')],_0x2ea2c5);_0x32eb60(_0x233ba7['error'](0x1f4,_0x13837d[_0x999f('0x10')]));});});};
\ No newline at end of file
+var _0xc25b=['message','catch','create','body','options','raw','then','CreateSquareReport','UpdateSquareReport','SquareReport','where','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','request\x20sent','debug','SquareReport,\x20%s,\x20%s,\x20%s','stringify','error','code','SquareReport,\x20%s,\x20%s'];(function(_0x358c2d,_0x3a19d1){var _0xe37de8=function(_0x33b3f6){while(--_0x33b3f6){_0x358c2d['push'](_0x358c2d['shift']());}};_0xe37de8(++_0x3a19d1);}(_0xc25b,0x1ec));var _0xbc25=function(_0x1494b5,_0x17054f){_0x1494b5=_0x1494b5-0x0;var _0x5c5a27=_0xc25b[_0x1494b5];return _0x5c5a27;};'use strict';var _=require(_0xbc25('0x0'));var util=require(_0xbc25('0x1'));var moment=require(_0xbc25('0x2'));var BPromise=require(_0xbc25('0x3'));var rs=require(_0xbc25('0x4'));var fs=require('fs');var Redis=require(_0xbc25('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xbc25('0x6'))(_0xbc25('0x7'));var config=require(_0xbc25('0x8'));var jayson=require(_0xbc25('0x9'));var client=jayson['client'][_0xbc25('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5394fa,_0x4e291b,_0x5033f3){return new BPromise(function(_0x3a8dad,_0x36ade0){return client[_0xbc25('0xb')](_0x5394fa,_0x5033f3)['then'](function(_0x5464df){logger[_0xbc25('0xc')]('SquareReport,\x20%s,\x20%s',_0x4e291b,_0xbc25('0xd'));logger[_0xbc25('0xe')](_0xbc25('0xf'),_0x4e291b,_0xbc25('0xd'),JSON[_0xbc25('0x10')](_0x5464df));if(_0x5464df[_0xbc25('0x11')]){if(_0x5464df[_0xbc25('0x11')][_0xbc25('0x12')]===0x1f4){logger[_0xbc25('0x11')](_0xbc25('0x13'),_0x4e291b,_0x5464df[_0xbc25('0x11')][_0xbc25('0x14')]);return _0x36ade0(_0x5464df[_0xbc25('0x11')][_0xbc25('0x14')]);}logger[_0xbc25('0x11')](_0xbc25('0x13'),_0x4e291b,_0x5464df['error'][_0xbc25('0x14')]);return _0x3a8dad(_0x5464df[_0xbc25('0x11')][_0xbc25('0x14')]);}else{logger[_0xbc25('0xc')]('SquareReport,\x20%s,\x20%s',_0x4e291b,_0xbc25('0xd'));_0x3a8dad(_0x5464df['result'][_0xbc25('0x14')]);}})[_0xbc25('0x15')](function(_0x413320){logger[_0xbc25('0x11')]('SquareReport,\x20%s,\x20%s',_0x4e291b,_0x413320);_0x36ade0(_0x413320);});});}exports['CreateSquareReport']=function(_0x8033ec){var _0x5dfb79=this;return new Promise(function(_0x2655d0,_0x4073dd){return db['SquareReport'][_0xbc25('0x16')](_0x8033ec[_0xbc25('0x17')],{'raw':_0x8033ec['options']?_0x8033ec[_0xbc25('0x18')][_0xbc25('0x19')]===undefined?!![]:![]:!![]})[_0xbc25('0x1a')](function(_0x2c286b){logger[_0xbc25('0xc')]('CreateSquareReport',_0x8033ec);logger[_0xbc25('0xe')](_0xbc25('0x1b'),_0x8033ec,JSON[_0xbc25('0x10')](_0x2c286b));_0x2655d0(_0x2c286b);})[_0xbc25('0x15')](function(_0x19ca93){logger[_0xbc25('0x11')](_0xbc25('0x1b'),_0x19ca93['message'],_0x8033ec);_0x4073dd(_0x5dfb79[_0xbc25('0x11')](0x1f4,_0x19ca93[_0xbc25('0x14')]));});});};exports[_0xbc25('0x1c')]=function(_0x5d3d22){var _0x32b6db=this;return new Promise(function(_0x2268de,_0xde864d){return db[_0xbc25('0x1d')]['update'](_0x5d3d22['body'],{'raw':_0x5d3d22[_0xbc25('0x18')]?_0x5d3d22[_0xbc25('0x18')][_0xbc25('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5d3d22[_0xbc25('0x18')]?_0x5d3d22[_0xbc25('0x18')][_0xbc25('0x1e')]||null:null,'attributes':_0x5d3d22[_0xbc25('0x18')]?_0x5d3d22[_0xbc25('0x18')]['attributes']||null:null,'limit':_0x5d3d22['options']?_0x5d3d22[_0xbc25('0x18')][_0xbc25('0x1f')]||null:null})[_0xbc25('0x1a')](function(_0x400b82){logger[_0xbc25('0xc')]('UpdateSquareReport',_0x5d3d22);logger['debug'](_0xbc25('0x1c'),_0x5d3d22,JSON[_0xbc25('0x10')](_0x400b82));_0x2268de(_0x400b82);})[_0xbc25('0x15')](function(_0x58b5a5){logger[_0xbc25('0x11')](_0xbc25('0x1c'),_0x58b5a5[_0xbc25('0x14')],_0x5d3d22);_0xde864d(_0x32b6db[_0xbc25('0x11')](0x1f4,_0x58b5a5[_0xbc25('0x14')]));});});};
\ No newline at end of file