Built motion from commit 775e2a94.|2.6.3
[motion2.git] / server / api / cmHopperBlack / cmHopperBlack.rpc.js
index 2a32159..ce52e79 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbb3a=['UpdateCmHopperBlack','update','limit','DestroyCmHopperBlack','destroy','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','CmHopperBlack,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','GetCmHopperBlack','CmHopperBlack','findAll','options','raw','where','include','map','model','attributes','then','stringify'];(function(_0xb83d6b,_0x157d0b){var _0x5932cf=function(_0x359a25){while(--_0x359a25){_0xb83d6b['push'](_0xb83d6b['shift']());}};_0x5932cf(++_0x157d0b);}(_0xbb3a,0x116));var _0xabb3=function(_0x360ad4,_0x5d681d){_0x360ad4=_0x360ad4-0x0;var _0x186d15=_0xbb3a[_0x360ad4];return _0x186d15;};'use strict';var _=require(_0xabb3('0x0'));var util=require(_0xabb3('0x1'));var moment=require(_0xabb3('0x2'));var BPromise=require(_0xabb3('0x3'));var rs=require(_0xabb3('0x4'));var fs=require('fs');var Redis=require(_0xabb3('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xabb3('0x6'));var logger=require(_0xabb3('0x7'))(_0xabb3('0x8'));var config=require(_0xabb3('0x9'));var jayson=require(_0xabb3('0xa'));var client=jayson['client'][_0xabb3('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x24d2e9,_0x519889,_0x4cee1b){return new BPromise(function(_0x5829b9,_0x5e9fb2){return client[_0xabb3('0xc')](_0x24d2e9,_0x4cee1b)['then'](function(_0x5e404e){logger[_0xabb3('0xd')](_0xabb3('0xe'),_0x519889,_0xabb3('0xf'));logger[_0xabb3('0x10')]('CmHopperBlack,\x20%s,\x20%s,\x20%s',_0x519889,_0xabb3('0xf'),JSON['stringify'](_0x5e404e));if(_0x5e404e[_0xabb3('0x11')]){if(_0x5e404e['error'][_0xabb3('0x12')]===0x1f4){logger['error'](_0xabb3('0xe'),_0x519889,_0x5e404e[_0xabb3('0x11')][_0xabb3('0x13')]);return _0x5e9fb2(_0x5e404e[_0xabb3('0x11')][_0xabb3('0x13')]);}logger['error'](_0xabb3('0xe'),_0x519889,_0x5e404e['error'][_0xabb3('0x13')]);return _0x5829b9(_0x5e404e['error'][_0xabb3('0x13')]);}else{logger[_0xabb3('0xd')](_0xabb3('0xe'),_0x519889,_0xabb3('0xf'));_0x5829b9(_0x5e404e[_0xabb3('0x14')][_0xabb3('0x13')]);}})[_0xabb3('0x15')](function(_0x1177b2){logger[_0xabb3('0x11')]('CmHopperBlack,\x20%s,\x20%s',_0x519889,_0x1177b2);_0x5e9fb2(_0x1177b2);});});}exports[_0xabb3('0x16')]=function(_0x5577b7){var _0x3efc3f=this;return new Promise(function(_0x1c9ad8,_0x5f250b){return db[_0xabb3('0x17')][_0xabb3('0x18')]({'raw':_0x5577b7['options']?_0x5577b7[_0xabb3('0x19')][_0xabb3('0x1a')]===undefined?!![]:![]:!![],'where':_0x5577b7['options']?_0x5577b7['options'][_0xabb3('0x1b')]||null:null,'attributes':_0x5577b7[_0xabb3('0x19')]?_0x5577b7[_0xabb3('0x19')]['attributes']||null:null,'limit':_0x5577b7[_0xabb3('0x19')]?_0x5577b7[_0xabb3('0x19')]['limit']||null:null,'include':_0x5577b7[_0xabb3('0x19')]?_0x5577b7[_0xabb3('0x19')][_0xabb3('0x1c')]?_[_0xabb3('0x1d')](_0x5577b7[_0xabb3('0x19')][_0xabb3('0x1c')],function(_0x1a33c9){return{'model':db[_0x1a33c9[_0xabb3('0x1e')]],'as':_0x1a33c9['as'],'attributes':_0x1a33c9[_0xabb3('0x1f')],'include':_0x1a33c9['include']?_[_0xabb3('0x1d')](_0x1a33c9[_0xabb3('0x1c')],function(_0x22b1dc){return{'model':db[_0x22b1dc['model']],'as':_0x22b1dc['as'],'attributes':_0x22b1dc[_0xabb3('0x1f')],'include':_0x22b1dc['include']?_[_0xabb3('0x1d')](_0x22b1dc['include'],function(_0x112ffe){return{'model':db[_0x112ffe[_0xabb3('0x1e')]],'as':_0x112ffe['as'],'attributes':_0x112ffe[_0xabb3('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xabb3('0x20')](function(_0x122a89){logger[_0xabb3('0xd')](_0xabb3('0x16'),_0x5577b7);logger[_0xabb3('0x10')](_0xabb3('0x16'),_0x5577b7,JSON[_0xabb3('0x21')](_0x122a89));_0x1c9ad8(_0x122a89);})['catch'](function(_0x54d746){logger['error'](_0xabb3('0x16'),_0x54d746['message'],_0x5577b7);_0x5f250b(_0x3efc3f[_0xabb3('0x11')](0x1f4,_0x54d746[_0xabb3('0x13')]));});});};exports[_0xabb3('0x22')]=function(_0x47d2d7){var _0x1707ff=this;return new Promise(function(_0x3673d8,_0xf90a28){return db[_0xabb3('0x17')][_0xabb3('0x23')](_0x47d2d7['body'],{'raw':_0x47d2d7[_0xabb3('0x19')]?_0x47d2d7[_0xabb3('0x19')][_0xabb3('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x47d2d7[_0xabb3('0x19')]?_0x47d2d7[_0xabb3('0x19')][_0xabb3('0x1b')]||null:null,'attributes':_0x47d2d7[_0xabb3('0x19')]?_0x47d2d7[_0xabb3('0x19')]['attributes']||null:null,'limit':_0x47d2d7[_0xabb3('0x19')]?_0x47d2d7[_0xabb3('0x19')][_0xabb3('0x24')]||null:null})[_0xabb3('0x20')](function(_0x45e0f0){logger[_0xabb3('0xd')](_0xabb3('0x22'),_0x47d2d7);logger['debug'](_0xabb3('0x22'),_0x47d2d7,JSON[_0xabb3('0x21')](_0x45e0f0));_0x3673d8(_0x45e0f0);})[_0xabb3('0x15')](function(_0x4a9958){logger[_0xabb3('0x11')]('UpdateCmHopperBlack',_0x4a9958[_0xabb3('0x13')],_0x47d2d7);_0xf90a28(_0x1707ff[_0xabb3('0x11')](0x1f4,_0x4a9958[_0xabb3('0x13')]));});});};exports[_0xabb3('0x25')]=function(_0x2c97cd){var _0x395d74=this;return new Promise(function(_0x374637,_0x46a377){return db['CmHopperBlack'][_0xabb3('0x26')]({'where':_0x2c97cd[_0xabb3('0x19')]?_0x2c97cd['options']['where']||null:null})['then'](function(_0x239033){logger[_0xabb3('0xd')]('DestroyCmHopperBlack',_0x2c97cd);logger['debug'](_0xabb3('0x25'),_0x2c97cd,JSON[_0xabb3('0x21')](_0x239033));_0x374637(_0x239033);})[_0xabb3('0x15')](function(_0x37a3bd){logger[_0xabb3('0x11')](_0xabb3('0x25'),_0x37a3bd['message'],_0x2c97cd);_0x46a377(_0x395d74[_0xabb3('0x11')](0x1f4,_0x37a3bd[_0xabb3('0x13')]));});});};
\ No newline at end of file
+var _0x8ef5=['../../config/environment','jayson/promise','client','http','request','then','info','CmHopperBlack,\x20%s,\x20%s','request\x20sent','debug','CmHopperBlack,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','GetCmHopperBlack','CmHopperBlack','findAll','options','raw','where','limit','include','map','model','attributes','catch','UpdateCmHopperBlack','update','body','DestroyCmHopperBlack','destroy','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc'];(function(_0x9df86,_0x1b8e6b){var _0x2e4b5d=function(_0x153df9){while(--_0x153df9){_0x9df86['push'](_0x9df86['shift']());}};_0x2e4b5d(++_0x1b8e6b);}(_0x8ef5,0x169));var _0x58ef=function(_0x567466,_0x542caf){_0x567466=_0x567466-0x0;var _0x5959af=_0x8ef5[_0x567466];return _0x5959af;};'use strict';var _=require(_0x58ef('0x0'));var util=require(_0x58ef('0x1'));var moment=require(_0x58ef('0x2'));var BPromise=require(_0x58ef('0x3'));var rs=require(_0x58ef('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x58ef('0x5'))['db'];var utils=require(_0x58ef('0x6'));var logger=require('../../config/logger')(_0x58ef('0x7'));var config=require(_0x58ef('0x8'));var jayson=require(_0x58ef('0x9'));var client=jayson[_0x58ef('0xa')][_0x58ef('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3725c5,_0x219dbe,_0x347f02){return new BPromise(function(_0x306fdc,_0x67e3cf){return client[_0x58ef('0xc')](_0x3725c5,_0x347f02)[_0x58ef('0xd')](function(_0x492f5f){logger[_0x58ef('0xe')](_0x58ef('0xf'),_0x219dbe,_0x58ef('0x10'));logger[_0x58ef('0x11')](_0x58ef('0x12'),_0x219dbe,'request\x20sent',JSON[_0x58ef('0x13')](_0x492f5f));if(_0x492f5f[_0x58ef('0x14')]){if(_0x492f5f['error'][_0x58ef('0x15')]===0x1f4){logger[_0x58ef('0x14')](_0x58ef('0xf'),_0x219dbe,_0x492f5f[_0x58ef('0x14')][_0x58ef('0x16')]);return _0x67e3cf(_0x492f5f[_0x58ef('0x14')][_0x58ef('0x16')]);}logger[_0x58ef('0x14')](_0x58ef('0xf'),_0x219dbe,_0x492f5f[_0x58ef('0x14')][_0x58ef('0x16')]);return _0x306fdc(_0x492f5f[_0x58ef('0x14')][_0x58ef('0x16')]);}else{logger[_0x58ef('0xe')]('CmHopperBlack,\x20%s,\x20%s',_0x219dbe,_0x58ef('0x10'));_0x306fdc(_0x492f5f[_0x58ef('0x17')][_0x58ef('0x16')]);}})['catch'](function(_0x3b3694){logger[_0x58ef('0x14')](_0x58ef('0xf'),_0x219dbe,_0x3b3694);_0x67e3cf(_0x3b3694);});});}exports[_0x58ef('0x18')]=function(_0x11d4b0){var _0x30ea67=this;return new Promise(function(_0x23dd55,_0x4da454){return db[_0x58ef('0x19')][_0x58ef('0x1a')]({'raw':_0x11d4b0[_0x58ef('0x1b')]?_0x11d4b0['options'][_0x58ef('0x1c')]===undefined?!![]:![]:!![],'where':_0x11d4b0[_0x58ef('0x1b')]?_0x11d4b0[_0x58ef('0x1b')][_0x58ef('0x1d')]||null:null,'attributes':_0x11d4b0['options']?_0x11d4b0[_0x58ef('0x1b')]['attributes']||null:null,'limit':_0x11d4b0[_0x58ef('0x1b')]?_0x11d4b0['options'][_0x58ef('0x1e')]||null:null,'include':_0x11d4b0[_0x58ef('0x1b')]?_0x11d4b0[_0x58ef('0x1b')][_0x58ef('0x1f')]?_[_0x58ef('0x20')](_0x11d4b0['options']['include'],function(_0x1de61d){return{'model':db[_0x1de61d[_0x58ef('0x21')]],'as':_0x1de61d['as'],'attributes':_0x1de61d[_0x58ef('0x22')],'include':_0x1de61d[_0x58ef('0x1f')]?_[_0x58ef('0x20')](_0x1de61d[_0x58ef('0x1f')],function(_0x5e8c4e){return{'model':db[_0x5e8c4e[_0x58ef('0x21')]],'as':_0x5e8c4e['as'],'attributes':_0x5e8c4e[_0x58ef('0x22')],'include':_0x5e8c4e[_0x58ef('0x1f')]?_[_0x58ef('0x20')](_0x5e8c4e['include'],function(_0x28fe6a){return{'model':db[_0x28fe6a[_0x58ef('0x21')]],'as':_0x28fe6a['as'],'attributes':_0x28fe6a[_0x58ef('0x22')]};}):[]};}):[]};}):[]:[]})[_0x58ef('0xd')](function(_0x215d88){logger['info'](_0x58ef('0x18'),_0x11d4b0);logger[_0x58ef('0x11')]('GetCmHopperBlack',_0x11d4b0,JSON[_0x58ef('0x13')](_0x215d88));_0x23dd55(_0x215d88);})[_0x58ef('0x23')](function(_0x3ccf38){logger[_0x58ef('0x14')](_0x58ef('0x18'),_0x3ccf38[_0x58ef('0x16')],_0x11d4b0);_0x4da454(_0x30ea67[_0x58ef('0x14')](0x1f4,_0x3ccf38[_0x58ef('0x16')]));});});};exports[_0x58ef('0x24')]=function(_0x32d49d){var _0x4f49b7=this;return new Promise(function(_0x1214a8,_0x396b6a){return db[_0x58ef('0x19')][_0x58ef('0x25')](_0x32d49d[_0x58ef('0x26')],{'raw':_0x32d49d['options']?_0x32d49d[_0x58ef('0x1b')][_0x58ef('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x32d49d['options']?_0x32d49d[_0x58ef('0x1b')][_0x58ef('0x1d')]||null:null,'attributes':_0x32d49d[_0x58ef('0x1b')]?_0x32d49d[_0x58ef('0x1b')][_0x58ef('0x22')]||null:null,'limit':_0x32d49d[_0x58ef('0x1b')]?_0x32d49d[_0x58ef('0x1b')][_0x58ef('0x1e')]||null:null})[_0x58ef('0xd')](function(_0x514120){logger[_0x58ef('0xe')](_0x58ef('0x24'),_0x32d49d);logger[_0x58ef('0x11')](_0x58ef('0x24'),_0x32d49d,JSON[_0x58ef('0x13')](_0x514120));_0x1214a8(_0x514120);})[_0x58ef('0x23')](function(_0xda1ca9){logger[_0x58ef('0x14')](_0x58ef('0x24'),_0xda1ca9['message'],_0x32d49d);_0x396b6a(_0x4f49b7[_0x58ef('0x14')](0x1f4,_0xda1ca9[_0x58ef('0x16')]));});});};exports[_0x58ef('0x27')]=function(_0x7ea85b){var _0x4fd02c=this;return new Promise(function(_0x2a9341,_0x1ea285){return db['CmHopperBlack'][_0x58ef('0x28')]({'where':_0x7ea85b[_0x58ef('0x1b')]?_0x7ea85b[_0x58ef('0x1b')][_0x58ef('0x1d')]||null:null})['then'](function(_0x21d0fd){logger['info'](_0x58ef('0x27'),_0x7ea85b);logger['debug'](_0x58ef('0x27'),_0x7ea85b,JSON[_0x58ef('0x13')](_0x21d0fd));_0x2a9341(_0x21d0fd);})[_0x58ef('0x23')](function(_0x63b992){logger[_0x58ef('0x14')](_0x58ef('0x27'),_0x63b992[_0x58ef('0x16')],_0x7ea85b);_0x1ea285(_0x4fd02c['error'](0x1f4,_0x63b992[_0x58ef('0x16')]));});});};
\ No newline at end of file