Built motion from commit (unavailable).|2.5.20
[motion2.git] / server / api / squareReport / squareReport.rpc.js
index 8f34fcc..4a47acb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8d0e=['../../config/environment','http','request','then','info','SquareReport,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','SquareReport','create','options','CreateSquareReport','debug','update','body','raw','where','UpdateSquareReport','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x33f226,_0x101d32){var _0x277648=function(_0x234ba0){while(--_0x234ba0){_0x33f226['push'](_0x33f226['shift']());}};_0x277648(++_0x101d32);}(_0x8d0e,0x1d7));var _0xe8d0=function(_0x3a9b9d,_0x4dd65a){_0x3a9b9d=_0x3a9b9d-0x0;var _0x3ba2f6=_0x8d0e[_0x3a9b9d];return _0x3ba2f6;};'use strict';var _=require(_0xe8d0('0x0'));var util=require(_0xe8d0('0x1'));var moment=require(_0xe8d0('0x2'));var BPromise=require(_0xe8d0('0x3'));var rs=require(_0xe8d0('0x4'));var fs=require('fs');var Redis=require(_0xe8d0('0x5'));var db=require(_0xe8d0('0x6'))['db'];var utils=require(_0xe8d0('0x7'));var logger=require(_0xe8d0('0x8'))('rpc');var config=require(_0xe8d0('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0xe8d0('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x92483d,_0x469d37,_0xcc03d0){return new BPromise(function(_0x2b6dce,_0x13aa63){return client[_0xe8d0('0xb')](_0x92483d,_0xcc03d0)[_0xe8d0('0xc')](function(_0x5605a0){logger[_0xe8d0('0xd')](_0xe8d0('0xe'),_0x469d37,_0xe8d0('0xf'));logger['debug']('SquareReport,\x20%s,\x20%s,\x20%s',_0x469d37,_0xe8d0('0xf'),JSON[_0xe8d0('0x10')](_0x5605a0));if(_0x5605a0[_0xe8d0('0x11')]){if(_0x5605a0[_0xe8d0('0x11')][_0xe8d0('0x12')]===0x1f4){logger[_0xe8d0('0x11')]('SquareReport,\x20%s,\x20%s',_0x469d37,_0x5605a0[_0xe8d0('0x11')][_0xe8d0('0x13')]);return _0x13aa63(_0x5605a0['error'][_0xe8d0('0x13')]);}logger['error']('SquareReport,\x20%s,\x20%s',_0x469d37,_0x5605a0[_0xe8d0('0x11')][_0xe8d0('0x13')]);return _0x2b6dce(_0x5605a0[_0xe8d0('0x11')][_0xe8d0('0x13')]);}else{logger[_0xe8d0('0xd')](_0xe8d0('0xe'),_0x469d37,'request\x20sent');_0x2b6dce(_0x5605a0[_0xe8d0('0x14')]['message']);}})[_0xe8d0('0x15')](function(_0x3c526c){logger[_0xe8d0('0x11')]('SquareReport,\x20%s,\x20%s',_0x469d37,_0x3c526c);_0x13aa63(_0x3c526c);});});}exports['CreateSquareReport']=function(_0x47c67a){var _0x1bdd94=this;return new Promise(function(_0x384854,_0x27b910){return db[_0xe8d0('0x16')][_0xe8d0('0x17')](_0x47c67a['body'],{'raw':_0x47c67a[_0xe8d0('0x18')]?_0x47c67a[_0xe8d0('0x18')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x554402){logger[_0xe8d0('0xd')](_0xe8d0('0x19'),_0x47c67a);logger[_0xe8d0('0x1a')](_0xe8d0('0x19'),_0x47c67a,JSON[_0xe8d0('0x10')](_0x554402));_0x384854(_0x554402);})[_0xe8d0('0x15')](function(_0x1bd25c){logger[_0xe8d0('0x11')](_0xe8d0('0x19'),_0x1bd25c['message'],_0x47c67a);_0x27b910(_0x1bdd94[_0xe8d0('0x11')](0x1f4,_0x1bd25c[_0xe8d0('0x13')]));});});};exports['UpdateSquareReport']=function(_0x106614){var _0x2e69d1=this;return new Promise(function(_0x274cac,_0xd86c76){return db[_0xe8d0('0x16')][_0xe8d0('0x1b')](_0x106614[_0xe8d0('0x1c')],{'raw':_0x106614[_0xe8d0('0x18')]?_0x106614[_0xe8d0('0x18')][_0xe8d0('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x106614[_0xe8d0('0x18')]?_0x106614['options'][_0xe8d0('0x1e')]||null:null,'attributes':_0x106614[_0xe8d0('0x18')]?_0x106614[_0xe8d0('0x18')]['attributes']||null:null,'limit':_0x106614[_0xe8d0('0x18')]?_0x106614[_0xe8d0('0x18')]['limit']||null:null})[_0xe8d0('0xc')](function(_0x3ffcb7){logger[_0xe8d0('0xd')](_0xe8d0('0x1f'),_0x106614);logger[_0xe8d0('0x1a')]('UpdateSquareReport',_0x106614,JSON[_0xe8d0('0x10')](_0x3ffcb7));_0x274cac(_0x3ffcb7);})['catch'](function(_0x5d3276){logger['error'](_0xe8d0('0x1f'),_0x5d3276[_0xe8d0('0x13')],_0x106614);_0xd86c76(_0x2e69d1[_0xe8d0('0x11')](0x1f4,_0x5d3276['message']));});});};
\ No newline at end of file
+var _0x5fc3=['info','request\x20sent','debug','stringify','error','code','message','SquareReport,\x20%s,\x20%s','result','catch','CreateSquareReport','create','body','options','raw','UpdateSquareReport','SquareReport','update','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','request','then'];(function(_0x4d8fe1,_0x3ed474){var _0x46685e=function(_0x268c73){while(--_0x268c73){_0x4d8fe1['push'](_0x4d8fe1['shift']());}};_0x46685e(++_0x3ed474);}(_0x5fc3,0xa8));var _0x35fc=function(_0x4bfade,_0xb26c0e){_0x4bfade=_0x4bfade-0x0;var _0x272465=_0x5fc3[_0x4bfade];return _0x272465;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var moment=require('moment');var BPromise=require(_0x35fc('0x2'));var rs=require(_0x35fc('0x3'));var fs=require('fs');var Redis=require(_0x35fc('0x4'));var db=require(_0x35fc('0x5'))['db'];var utils=require(_0x35fc('0x6'));var logger=require('../../config/logger')(_0x35fc('0x7'));var config=require(_0x35fc('0x8'));var jayson=require(_0x35fc('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x19a0d1,_0x508b32,_0x16e153){return new BPromise(function(_0x27524f,_0xc72d93){return client[_0x35fc('0xa')](_0x19a0d1,_0x16e153)[_0x35fc('0xb')](function(_0xf9d3a6){logger[_0x35fc('0xc')]('SquareReport,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'));logger[_0x35fc('0xe')]('SquareReport,\x20%s,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'),JSON[_0x35fc('0xf')](_0xf9d3a6));if(_0xf9d3a6['error']){if(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x11')]===0x1f4){logger['error']('SquareReport,\x20%s,\x20%s',_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0xc72d93(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x12')]);}logger[_0x35fc('0x10')](_0x35fc('0x13'),_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0x27524f(_0xf9d3a6['error']['message']);}else{logger['info'](_0x35fc('0x13'),_0x508b32,_0x35fc('0xd'));_0x27524f(_0xf9d3a6[_0x35fc('0x14')][_0x35fc('0x12')]);}})[_0x35fc('0x15')](function(_0x1121fa){logger['error'](_0x35fc('0x13'),_0x508b32,_0x1121fa);_0xc72d93(_0x1121fa);});});}exports[_0x35fc('0x16')]=function(_0x553677){var _0x41e165=this;return new Promise(function(_0x363e47,_0x2e513b){return db['SquareReport'][_0x35fc('0x17')](_0x553677[_0x35fc('0x18')],{'raw':_0x553677[_0x35fc('0x19')]?_0x553677['options'][_0x35fc('0x1a')]===undefined?!![]:![]:!![]})[_0x35fc('0xb')](function(_0x3229d1){logger[_0x35fc('0xc')](_0x35fc('0x16'),_0x553677);logger[_0x35fc('0xe')](_0x35fc('0x16'),_0x553677,JSON[_0x35fc('0xf')](_0x3229d1));_0x363e47(_0x3229d1);})[_0x35fc('0x15')](function(_0x427eae){logger['error'](_0x35fc('0x16'),_0x427eae[_0x35fc('0x12')],_0x553677);_0x2e513b(_0x41e165[_0x35fc('0x10')](0x1f4,_0x427eae[_0x35fc('0x12')]));});});};exports[_0x35fc('0x1b')]=function(_0x55e9e7){var _0x33f5e8=this;return new Promise(function(_0x4c587a,_0x561bf8){return db[_0x35fc('0x1c')][_0x35fc('0x1d')](_0x55e9e7[_0x35fc('0x18')],{'raw':_0x55e9e7['options']?_0x55e9e7[_0x35fc('0x19')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x55e9e7[_0x35fc('0x19')]?_0x55e9e7[_0x35fc('0x19')]['where']||null:null,'attributes':_0x55e9e7['options']?_0x55e9e7[_0x35fc('0x19')]['attributes']||null:null,'limit':_0x55e9e7[_0x35fc('0x19')]?_0x55e9e7[_0x35fc('0x19')]['limit']||null:null})[_0x35fc('0xb')](function(_0x645eac){logger[_0x35fc('0xc')](_0x35fc('0x1b'),_0x55e9e7);logger[_0x35fc('0xe')](_0x35fc('0x1b'),_0x55e9e7,JSON[_0x35fc('0xf')](_0x645eac));_0x4c587a(_0x645eac);})[_0x35fc('0x15')](function(_0x54aedc){logger[_0x35fc('0x10')](_0x35fc('0x1b'),_0x54aedc[_0x35fc('0x12')],_0x55e9e7);_0x561bf8(_0x33f5e8['error'](0x1f4,_0x54aedc[_0x35fc('0x12')]));});});};
\ No newline at end of file