Built motion from commit (unavailable).|2.4.4
[motion2.git] / server / api / cmHopperBlack / cmHopperBlack.rpc.js
index fc4c19e..1a4c1d7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x42cf=['bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug','CmHopperBlack,\x20%s,\x20%s,\x20%s','error','code','CmHopperBlack,\x20%s,\x20%s','message','result','catch','CmHopperBlack','findAll','options','raw','where','attributes','limit','map','include','model','GetCmHopperBlack','update','body','UpdateCmHopperBlack','DestroyCmHopperBlack','destroy','stringify','lodash','util','moment'];(function(_0x308a9a,_0xd452bb){var _0xf317d1=function(_0x2df45c){while(--_0x2df45c){_0x308a9a['push'](_0x308a9a['shift']());}};_0xf317d1(++_0xd452bb);}(_0x42cf,0x9d));var _0xf42c=function(_0xaa0309,_0x1c8008){_0xaa0309=_0xaa0309-0x0;var _0x5de7ce=_0x42cf[_0xaa0309];return _0x5de7ce;};'use strict';var _=require(_0xf42c('0x0'));var util=require(_0xf42c('0x1'));var moment=require(_0xf42c('0x2'));var BPromise=require(_0xf42c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf42c('0x4'))['db'];var utils=require(_0xf42c('0x5'));var logger=require(_0xf42c('0x6'))(_0xf42c('0x7'));var config=require(_0xf42c('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xf42c('0x9')][_0xf42c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x49f53e,_0x1dc1d3,_0xb2178a){return new BPromise(function(_0x21617a,_0x4e70ec){return client[_0xf42c('0xb')](_0x49f53e,_0xb2178a)[_0xf42c('0xc')](function(_0x283015){logger[_0xf42c('0xd')]('CmHopperBlack,\x20%s,\x20%s',_0x1dc1d3,_0xf42c('0xe'));logger[_0xf42c('0xf')](_0xf42c('0x10'),_0x1dc1d3,_0xf42c('0xe'),JSON['stringify'](_0x283015));if(_0x283015[_0xf42c('0x11')]){if(_0x283015[_0xf42c('0x11')][_0xf42c('0x12')]===0x1f4){logger[_0xf42c('0x11')](_0xf42c('0x13'),_0x1dc1d3,_0x283015[_0xf42c('0x11')][_0xf42c('0x14')]);return _0x4e70ec(_0x283015[_0xf42c('0x11')][_0xf42c('0x14')]);}logger[_0xf42c('0x11')](_0xf42c('0x13'),_0x1dc1d3,_0x283015[_0xf42c('0x11')][_0xf42c('0x14')]);return _0x21617a(_0x283015[_0xf42c('0x11')]['message']);}else{logger['info']('CmHopperBlack,\x20%s,\x20%s',_0x1dc1d3,_0xf42c('0xe'));_0x21617a(_0x283015[_0xf42c('0x15')][_0xf42c('0x14')]);}})[_0xf42c('0x16')](function(_0x261ebf){logger[_0xf42c('0x11')](_0xf42c('0x13'),_0x1dc1d3,_0x261ebf);_0x4e70ec(_0x261ebf);});});}exports['GetCmHopperBlack']=function(_0x5d8279){var _0xa50f22=this;return new Promise(function(_0x2025cb,_0x9338a1){return db[_0xf42c('0x17')][_0xf42c('0x18')]({'raw':_0x5d8279[_0xf42c('0x19')]?_0x5d8279['options'][_0xf42c('0x1a')]===undefined?!![]:![]:!![],'where':_0x5d8279[_0xf42c('0x19')]?_0x5d8279[_0xf42c('0x19')][_0xf42c('0x1b')]||null:null,'attributes':_0x5d8279[_0xf42c('0x19')]?_0x5d8279[_0xf42c('0x19')][_0xf42c('0x1c')]||null:null,'limit':_0x5d8279[_0xf42c('0x19')]?_0x5d8279['options'][_0xf42c('0x1d')]||null:null,'include':_0x5d8279[_0xf42c('0x19')]?_0x5d8279['options']['include']?_[_0xf42c('0x1e')](_0x5d8279['options'][_0xf42c('0x1f')],function(_0x28af58){return{'model':db[_0x28af58[_0xf42c('0x20')]],'as':_0x28af58['as'],'attributes':_0x28af58[_0xf42c('0x1c')],'include':_0x28af58[_0xf42c('0x1f')]?_['map'](_0x28af58['include'],function(_0x3e1a28){return{'model':db[_0x3e1a28[_0xf42c('0x20')]],'as':_0x3e1a28['as'],'attributes':_0x3e1a28[_0xf42c('0x1c')],'include':_0x3e1a28[_0xf42c('0x1f')]?_[_0xf42c('0x1e')](_0x3e1a28[_0xf42c('0x1f')],function(_0x292c0f){return{'model':db[_0x292c0f['model']],'as':_0x292c0f['as'],'attributes':_0x292c0f[_0xf42c('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xf42c('0xc')](function(_0x335c71){logger[_0xf42c('0xd')]('GetCmHopperBlack',_0x5d8279);logger[_0xf42c('0xf')](_0xf42c('0x21'),_0x5d8279,JSON['stringify'](_0x335c71));_0x2025cb(_0x335c71);})[_0xf42c('0x16')](function(_0xc380cb){logger[_0xf42c('0x11')](_0xf42c('0x21'),_0xc380cb['message'],_0x5d8279);_0x9338a1(_0xa50f22[_0xf42c('0x11')](0x1f4,_0xc380cb[_0xf42c('0x14')]));});});};exports['UpdateCmHopperBlack']=function(_0x5a6816){var _0xf2409c=this;return new Promise(function(_0x376d1c,_0x1f76c4){return db[_0xf42c('0x17')][_0xf42c('0x22')](_0x5a6816[_0xf42c('0x23')],{'raw':_0x5a6816[_0xf42c('0x19')]?_0x5a6816[_0xf42c('0x19')][_0xf42c('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5a6816[_0xf42c('0x19')]?_0x5a6816[_0xf42c('0x19')][_0xf42c('0x1b')]||null:null,'attributes':_0x5a6816[_0xf42c('0x19')]?_0x5a6816['options']['attributes']||null:null,'limit':_0x5a6816[_0xf42c('0x19')]?_0x5a6816[_0xf42c('0x19')][_0xf42c('0x1d')]||null:null})[_0xf42c('0xc')](function(_0x14f5c2){logger['info'](_0xf42c('0x24'),_0x5a6816);logger[_0xf42c('0xf')](_0xf42c('0x24'),_0x5a6816,JSON['stringify'](_0x14f5c2));_0x376d1c(_0x14f5c2);})[_0xf42c('0x16')](function(_0x2bf13d){logger[_0xf42c('0x11')](_0xf42c('0x24'),_0x2bf13d[_0xf42c('0x14')],_0x5a6816);_0x1f76c4(_0xf2409c[_0xf42c('0x11')](0x1f4,_0x2bf13d[_0xf42c('0x14')]));});});};exports[_0xf42c('0x25')]=function(_0x48665b){var _0x33d9f9=this;return new Promise(function(_0x4f13d7,_0x289a4a){return db[_0xf42c('0x17')][_0xf42c('0x26')]({'where':_0x48665b[_0xf42c('0x19')]?_0x48665b[_0xf42c('0x19')]['where']||null:null})['then'](function(_0x376a43){logger[_0xf42c('0xd')](_0xf42c('0x25'),_0x48665b);logger['debug'](_0xf42c('0x25'),_0x48665b,JSON[_0xf42c('0x27')](_0x376a43));_0x4f13d7(_0x376a43);})[_0xf42c('0x16')](function(_0x112f8f){logger[_0xf42c('0x11')](_0xf42c('0x25'),_0x112f8f[_0xf42c('0x14')],_0x48665b);_0x289a4a(_0x33d9f9[_0xf42c('0x11')](0x1f4,_0x112f8f[_0xf42c('0x14')]));});});};
\ No newline at end of file
+var _0x8473=['util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','debug','request\x20sent','stringify','error','CmHopperBlack,\x20%s,\x20%s','message','result','catch','GetCmHopperBlack','CmHopperBlack','options','raw','where','attributes','limit','include','map','model','UpdateCmHopperBlack','DestroyCmHopperBlack'];(function(_0x59820d,_0xc8e6ba){var _0x3c72b1=function(_0x1f8971){while(--_0x1f8971){_0x59820d['push'](_0x59820d['shift']());}};_0x3c72b1(++_0xc8e6ba);}(_0x8473,0xcc));var _0x3847=function(_0x5402b,_0x4820ad){_0x5402b=_0x5402b-0x0;var _0x329004=_0x8473[_0x5402b];return _0x329004;};'use strict';var _=require('lodash');var util=require(_0x3847('0x0'));var moment=require(_0x3847('0x1'));var BPromise=require(_0x3847('0x2'));var rs=require(_0x3847('0x3'));var fs=require('fs');var Redis=require(_0x3847('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x3847('0x5'));var logger=require(_0x3847('0x6'))('rpc');var config=require(_0x3847('0x7'));var jayson=require(_0x3847('0x8'));var client=jayson[_0x3847('0x9')][_0x3847('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x57cc3e,_0xb6e0a3,_0x1d8f17){return new BPromise(function(_0x2a08bb,_0x13e62c){return client[_0x3847('0xb')](_0x57cc3e,_0x1d8f17)[_0x3847('0xc')](function(_0x602464){logger[_0x3847('0xd')]('CmHopperBlack,\x20%s,\x20%s',_0xb6e0a3,'request\x20sent');logger[_0x3847('0xe')]('CmHopperBlack,\x20%s,\x20%s,\x20%s',_0xb6e0a3,_0x3847('0xf'),JSON[_0x3847('0x10')](_0x602464));if(_0x602464[_0x3847('0x11')]){if(_0x602464[_0x3847('0x11')]['code']===0x1f4){logger[_0x3847('0x11')](_0x3847('0x12'),_0xb6e0a3,_0x602464[_0x3847('0x11')][_0x3847('0x13')]);return _0x13e62c(_0x602464[_0x3847('0x11')]['message']);}logger[_0x3847('0x11')](_0x3847('0x12'),_0xb6e0a3,_0x602464['error'][_0x3847('0x13')]);return _0x2a08bb(_0x602464[_0x3847('0x11')]['message']);}else{logger[_0x3847('0xd')]('CmHopperBlack,\x20%s,\x20%s',_0xb6e0a3,_0x3847('0xf'));_0x2a08bb(_0x602464[_0x3847('0x14')][_0x3847('0x13')]);}})[_0x3847('0x15')](function(_0x574586){logger[_0x3847('0x11')](_0x3847('0x12'),_0xb6e0a3,_0x574586);_0x13e62c(_0x574586);});});}exports[_0x3847('0x16')]=function(_0x348d60){var _0x5f1a60=this;return new Promise(function(_0x3a578d,_0x745fdf){return db[_0x3847('0x17')]['findAll']({'raw':_0x348d60[_0x3847('0x18')]?_0x348d60['options'][_0x3847('0x19')]===undefined?!![]:![]:!![],'where':_0x348d60[_0x3847('0x18')]?_0x348d60[_0x3847('0x18')][_0x3847('0x1a')]||null:null,'attributes':_0x348d60[_0x3847('0x18')]?_0x348d60[_0x3847('0x18')][_0x3847('0x1b')]||null:null,'limit':_0x348d60[_0x3847('0x18')]?_0x348d60['options'][_0x3847('0x1c')]||null:null,'include':_0x348d60[_0x3847('0x18')]?_0x348d60[_0x3847('0x18')][_0x3847('0x1d')]?_[_0x3847('0x1e')](_0x348d60[_0x3847('0x18')][_0x3847('0x1d')],function(_0x52f06d){return{'model':db[_0x52f06d['model']],'as':_0x52f06d['as'],'attributes':_0x52f06d[_0x3847('0x1b')],'include':_0x52f06d[_0x3847('0x1d')]?_[_0x3847('0x1e')](_0x52f06d[_0x3847('0x1d')],function(_0x1ef955){return{'model':db[_0x1ef955[_0x3847('0x1f')]],'as':_0x1ef955['as'],'attributes':_0x1ef955[_0x3847('0x1b')],'include':_0x1ef955[_0x3847('0x1d')]?_['map'](_0x1ef955[_0x3847('0x1d')],function(_0x33bbdb){return{'model':db[_0x33bbdb['model']],'as':_0x33bbdb['as'],'attributes':_0x33bbdb[_0x3847('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x3847('0xc')](function(_0x5d098e){logger[_0x3847('0xd')]('GetCmHopperBlack',_0x348d60);logger[_0x3847('0xe')](_0x3847('0x16'),_0x348d60,JSON[_0x3847('0x10')](_0x5d098e));_0x3a578d(_0x5d098e);})[_0x3847('0x15')](function(_0x57c70c){logger[_0x3847('0x11')](_0x3847('0x16'),_0x57c70c[_0x3847('0x13')],_0x348d60);_0x745fdf(_0x5f1a60[_0x3847('0x11')](0x1f4,_0x57c70c[_0x3847('0x13')]));});});};exports['UpdateCmHopperBlack']=function(_0x371bc9){var _0x339347=this;return new Promise(function(_0x579a5f,_0x25bd82){return db[_0x3847('0x17')]['update'](_0x371bc9['body'],{'raw':_0x371bc9[_0x3847('0x18')]?_0x371bc9[_0x3847('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x371bc9[_0x3847('0x18')]?_0x371bc9['options'][_0x3847('0x1a')]||null:null,'attributes':_0x371bc9[_0x3847('0x18')]?_0x371bc9['options'][_0x3847('0x1b')]||null:null,'limit':_0x371bc9[_0x3847('0x18')]?_0x371bc9['options']['limit']||null:null})[_0x3847('0xc')](function(_0x56709d){logger[_0x3847('0xd')](_0x3847('0x20'),_0x371bc9);logger[_0x3847('0xe')](_0x3847('0x20'),_0x371bc9,JSON['stringify'](_0x56709d));_0x579a5f(_0x56709d);})[_0x3847('0x15')](function(_0x142944){logger[_0x3847('0x11')]('UpdateCmHopperBlack',_0x142944[_0x3847('0x13')],_0x371bc9);_0x25bd82(_0x339347[_0x3847('0x11')](0x1f4,_0x142944[_0x3847('0x13')]));});});};exports[_0x3847('0x21')]=function(_0x438772){var _0x26828e=this;return new Promise(function(_0x3cc3a1,_0x45343f){return db['CmHopperBlack']['destroy']({'where':_0x438772[_0x3847('0x18')]?_0x438772[_0x3847('0x18')][_0x3847('0x1a')]||null:null})[_0x3847('0xc')](function(_0x253e41){logger[_0x3847('0xd')](_0x3847('0x21'),_0x438772);logger[_0x3847('0xe')](_0x3847('0x21'),_0x438772,JSON[_0x3847('0x10')](_0x253e41));_0x3cc3a1(_0x253e41);})[_0x3847('0x15')](function(_0x1ea82b){logger[_0x3847('0x11')](_0x3847('0x21'),_0x1ea82b[_0x3847('0x13')],_0x438772);_0x45343f(_0x26828e[_0x3847('0x11')](0x1f4,_0x1ea82b[_0x3847('0x13')]));});});};
\ No newline at end of file