Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / api / memberReport / memberReport.rpc.js
index af3e89b..2b25158 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xacf4=['MemberReport,\x20%s,\x20%s,\x20%s','error','message','result','catch','GetMemberReport','MemberReport','findAll','options','raw','where','attributes','limit','include','map','model','debug','stringify','CreateMemberReport','body','UpdateMemberReport','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','then','info','MemberReport,\x20%s,\x20%s','request\x20sent'];(function(_0x17575f,_0x2ac70a){var _0x3741d4=function(_0x13c92c){while(--_0x13c92c){_0x17575f['push'](_0x17575f['shift']());}};_0x3741d4(++_0x2ac70a);}(_0xacf4,0xe7));var _0x4acf=function(_0x1c2f29,_0x5a2668){_0x1c2f29=_0x1c2f29-0x0;var _0x258465=_0xacf4[_0x1c2f29];return _0x258465;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x4acf('0x0'));var BPromise=require(_0x4acf('0x1'));var rs=require(_0x4acf('0x2'));var fs=require('fs');var Redis=require(_0x4acf('0x3'));var db=require(_0x4acf('0x4'))['db'];var utils=require(_0x4acf('0x5'));var logger=require(_0x4acf('0x6'))('rpc');var config=require(_0x4acf('0x7'));var jayson=require(_0x4acf('0x8'));var client=jayson['client'][_0x4acf('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2ba08a,_0x649ad2,_0x45a5a4){return new BPromise(function(_0x25d345,_0x50f5f4){return client['request'](_0x2ba08a,_0x45a5a4)[_0x4acf('0xa')](function(_0x59f559){logger[_0x4acf('0xb')](_0x4acf('0xc'),_0x649ad2,_0x4acf('0xd'));logger['debug'](_0x4acf('0xe'),_0x649ad2,_0x4acf('0xd'),JSON['stringify'](_0x59f559));if(_0x59f559['error']){if(_0x59f559[_0x4acf('0xf')]['code']===0x1f4){logger['error'](_0x4acf('0xc'),_0x649ad2,_0x59f559[_0x4acf('0xf')][_0x4acf('0x10')]);return _0x50f5f4(_0x59f559[_0x4acf('0xf')][_0x4acf('0x10')]);}logger[_0x4acf('0xf')](_0x4acf('0xc'),_0x649ad2,_0x59f559[_0x4acf('0xf')][_0x4acf('0x10')]);return _0x25d345(_0x59f559[_0x4acf('0xf')][_0x4acf('0x10')]);}else{logger['info'](_0x4acf('0xc'),_0x649ad2,'request\x20sent');_0x25d345(_0x59f559[_0x4acf('0x11')][_0x4acf('0x10')]);}})[_0x4acf('0x12')](function(_0x5d934a){logger['error'](_0x4acf('0xc'),_0x649ad2,_0x5d934a);_0x50f5f4(_0x5d934a);});});}exports[_0x4acf('0x13')]=function(_0x240c00){var _0x4b1d93=this;return new Promise(function(_0x2a678b,_0x137302){return db[_0x4acf('0x14')][_0x4acf('0x15')]({'raw':_0x240c00[_0x4acf('0x16')]?_0x240c00[_0x4acf('0x16')][_0x4acf('0x17')]===undefined?!![]:![]:!![],'where':_0x240c00[_0x4acf('0x16')]?_0x240c00[_0x4acf('0x16')][_0x4acf('0x18')]||null:null,'attributes':_0x240c00[_0x4acf('0x16')]?_0x240c00['options'][_0x4acf('0x19')]||null:null,'limit':_0x240c00[_0x4acf('0x16')]?_0x240c00['options'][_0x4acf('0x1a')]||null:null,'include':_0x240c00[_0x4acf('0x16')]?_0x240c00['options'][_0x4acf('0x1b')]?_[_0x4acf('0x1c')](_0x240c00[_0x4acf('0x16')][_0x4acf('0x1b')],function(_0x53885f){return{'model':db[_0x53885f[_0x4acf('0x1d')]],'as':_0x53885f['as'],'attributes':_0x53885f[_0x4acf('0x19')],'include':_0x53885f['include']?_[_0x4acf('0x1c')](_0x53885f[_0x4acf('0x1b')],function(_0x52a84a){return{'model':db[_0x52a84a[_0x4acf('0x1d')]],'as':_0x52a84a['as'],'attributes':_0x52a84a[_0x4acf('0x19')],'include':_0x52a84a[_0x4acf('0x1b')]?_[_0x4acf('0x1c')](_0x52a84a['include'],function(_0x50236d){return{'model':db[_0x50236d[_0x4acf('0x1d')]],'as':_0x50236d['as'],'attributes':_0x50236d[_0x4acf('0x19')]};}):[]};}):[]};}):[]:[]})[_0x4acf('0xa')](function(_0x42c90c){logger[_0x4acf('0xb')](_0x4acf('0x13'),_0x240c00);logger[_0x4acf('0x1e')](_0x4acf('0x13'),_0x240c00,JSON[_0x4acf('0x1f')](_0x42c90c));_0x2a678b(_0x42c90c);})[_0x4acf('0x12')](function(_0x57989e){logger[_0x4acf('0xf')](_0x4acf('0x13'),_0x57989e[_0x4acf('0x10')],_0x240c00);_0x137302(_0x4b1d93[_0x4acf('0xf')](0x1f4,_0x57989e[_0x4acf('0x10')]));});});};exports[_0x4acf('0x20')]=function(_0x27384c){var _0x5d862f=this;return new Promise(function(_0x337b3c,_0x1d221b){return db[_0x4acf('0x14')]['create'](_0x27384c[_0x4acf('0x21')],{'raw':_0x27384c[_0x4acf('0x16')]?_0x27384c[_0x4acf('0x16')][_0x4acf('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0x1dae5){logger[_0x4acf('0xb')](_0x4acf('0x20'),_0x27384c);logger['debug'](_0x4acf('0x20'),_0x27384c,JSON[_0x4acf('0x1f')](_0x1dae5));_0x337b3c(_0x1dae5);})[_0x4acf('0x12')](function(_0x3bb129){logger[_0x4acf('0xf')](_0x4acf('0x20'),_0x3bb129['message'],_0x27384c);_0x1d221b(_0x5d862f[_0x4acf('0xf')](0x1f4,_0x3bb129[_0x4acf('0x10')]));});});};exports['UpdateMemberReport']=function(_0xfd8ab5){var _0x543a37=this;return new Promise(function(_0x4cd020,_0x58aacf){return db['MemberReport']['update'](_0xfd8ab5['body'],{'raw':_0xfd8ab5['options']?_0xfd8ab5[_0x4acf('0x16')][_0x4acf('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xfd8ab5['options']?_0xfd8ab5[_0x4acf('0x16')][_0x4acf('0x18')]||null:null,'attributes':_0xfd8ab5[_0x4acf('0x16')]?_0xfd8ab5[_0x4acf('0x16')][_0x4acf('0x19')]||null:null,'limit':_0xfd8ab5[_0x4acf('0x16')]?_0xfd8ab5[_0x4acf('0x16')][_0x4acf('0x1a')]||null:null})[_0x4acf('0xa')](function(_0x372bab){logger['info']('UpdateMemberReport',_0xfd8ab5);logger[_0x4acf('0x1e')](_0x4acf('0x22'),_0xfd8ab5,JSON['stringify'](_0x372bab));_0x4cd020(_0x372bab);})[_0x4acf('0x12')](function(_0x40455d){logger[_0x4acf('0xf')](_0x4acf('0x22'),_0x40455d['message'],_0xfd8ab5);_0x58aacf(_0x543a37['error'](0x1f4,_0x40455d[_0x4acf('0x10')]));});});};
\ No newline at end of file
+var _0x66c7=['then','create','body','CreateMemberReport','UpdateMemberReport','raw','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','info','MemberReport,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','GetMemberReport','MemberReport','findAll','options','where','limit','include','attributes','map','model'];(function(_0x2c1980,_0x9da7c3){var _0x3bf0bb=function(_0x43dba7){while(--_0x43dba7){_0x2c1980['push'](_0x2c1980['shift']());}};_0x3bf0bb(++_0x9da7c3);}(_0x66c7,0x15c));var _0x766c=function(_0x365c7f,_0xa99915){_0x365c7f=_0x365c7f-0x0;var _0x4a697e=_0x66c7[_0x365c7f];return _0x4a697e;};'use strict';var _=require(_0x766c('0x0'));var util=require(_0x766c('0x1'));var moment=require(_0x766c('0x2'));var BPromise=require('bluebird');var rs=require(_0x766c('0x3'));var fs=require('fs');var Redis=require(_0x766c('0x4'));var db=require(_0x766c('0x5'))['db'];var utils=require(_0x766c('0x6'));var logger=require(_0x766c('0x7'))(_0x766c('0x8'));var config=require('../../config/environment');var jayson=require(_0x766c('0x9'));var client=jayson[_0x766c('0xa')][_0x766c('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xb0b5f7,_0x46d290,_0x3c4683){return new BPromise(function(_0x22a524,_0x4488b8){return client['request'](_0xb0b5f7,_0x3c4683)['then'](function(_0x141744){logger[_0x766c('0xc')](_0x766c('0xd'),_0x46d290,'request\x20sent');logger[_0x766c('0xe')]('MemberReport,\x20%s,\x20%s,\x20%s',_0x46d290,_0x766c('0xf'),JSON[_0x766c('0x10')](_0x141744));if(_0x141744[_0x766c('0x11')]){if(_0x141744[_0x766c('0x11')][_0x766c('0x12')]===0x1f4){logger[_0x766c('0x11')](_0x766c('0xd'),_0x46d290,_0x141744[_0x766c('0x11')][_0x766c('0x13')]);return _0x4488b8(_0x141744[_0x766c('0x11')][_0x766c('0x13')]);}logger[_0x766c('0x11')](_0x766c('0xd'),_0x46d290,_0x141744[_0x766c('0x11')][_0x766c('0x13')]);return _0x22a524(_0x141744['error']['message']);}else{logger['info'](_0x766c('0xd'),_0x46d290,_0x766c('0xf'));_0x22a524(_0x141744[_0x766c('0x14')][_0x766c('0x13')]);}})[_0x766c('0x15')](function(_0x357602){logger['error']('MemberReport,\x20%s,\x20%s',_0x46d290,_0x357602);_0x4488b8(_0x357602);});});}exports[_0x766c('0x16')]=function(_0x23c566){var _0x105f60=this;return new Promise(function(_0x47c887,_0x2cd2e7){return db[_0x766c('0x17')][_0x766c('0x18')]({'raw':_0x23c566['options']?_0x23c566['options']['raw']===undefined?!![]:![]:!![],'where':_0x23c566[_0x766c('0x19')]?_0x23c566['options'][_0x766c('0x1a')]||null:null,'attributes':_0x23c566[_0x766c('0x19')]?_0x23c566['options']['attributes']||null:null,'limit':_0x23c566[_0x766c('0x19')]?_0x23c566[_0x766c('0x19')][_0x766c('0x1b')]||null:null,'include':_0x23c566['options']?_0x23c566[_0x766c('0x19')][_0x766c('0x1c')]?_['map'](_0x23c566['options']['include'],function(_0x43d91f){return{'model':db[_0x43d91f['model']],'as':_0x43d91f['as'],'attributes':_0x43d91f[_0x766c('0x1d')],'include':_0x43d91f[_0x766c('0x1c')]?_[_0x766c('0x1e')](_0x43d91f['include'],function(_0x44659e){return{'model':db[_0x44659e[_0x766c('0x1f')]],'as':_0x44659e['as'],'attributes':_0x44659e[_0x766c('0x1d')],'include':_0x44659e[_0x766c('0x1c')]?_[_0x766c('0x1e')](_0x44659e[_0x766c('0x1c')],function(_0x5ad1d6){return{'model':db[_0x5ad1d6[_0x766c('0x1f')]],'as':_0x5ad1d6['as'],'attributes':_0x5ad1d6[_0x766c('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x766c('0x20')](function(_0x3a6757){logger[_0x766c('0xc')]('GetMemberReport',_0x23c566);logger['debug'](_0x766c('0x16'),_0x23c566,JSON[_0x766c('0x10')](_0x3a6757));_0x47c887(_0x3a6757);})[_0x766c('0x15')](function(_0x549dde){logger[_0x766c('0x11')](_0x766c('0x16'),_0x549dde['message'],_0x23c566);_0x2cd2e7(_0x105f60[_0x766c('0x11')](0x1f4,_0x549dde['message']));});});};exports['CreateMemberReport']=function(_0x3a4561){var _0x10421d=this;return new Promise(function(_0x1eac49,_0x5b94cf){return db[_0x766c('0x17')][_0x766c('0x21')](_0x3a4561[_0x766c('0x22')],{'raw':_0x3a4561[_0x766c('0x19')]?_0x3a4561[_0x766c('0x19')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x4659cc){logger[_0x766c('0xc')](_0x766c('0x23'),_0x3a4561);logger[_0x766c('0xe')](_0x766c('0x23'),_0x3a4561,JSON['stringify'](_0x4659cc));_0x1eac49(_0x4659cc);})[_0x766c('0x15')](function(_0x40c43a){logger[_0x766c('0x11')]('CreateMemberReport',_0x40c43a[_0x766c('0x13')],_0x3a4561);_0x5b94cf(_0x10421d['error'](0x1f4,_0x40c43a['message']));});});};exports[_0x766c('0x24')]=function(_0x4e5eec){var _0x26bd0b=this;return new Promise(function(_0x182a81,_0x2f96e3){return db[_0x766c('0x17')]['update'](_0x4e5eec['body'],{'raw':_0x4e5eec[_0x766c('0x19')]?_0x4e5eec[_0x766c('0x19')][_0x766c('0x25')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4e5eec[_0x766c('0x19')]?_0x4e5eec[_0x766c('0x19')][_0x766c('0x1a')]||null:null,'attributes':_0x4e5eec[_0x766c('0x19')]?_0x4e5eec[_0x766c('0x19')][_0x766c('0x1d')]||null:null,'limit':_0x4e5eec[_0x766c('0x19')]?_0x4e5eec[_0x766c('0x19')][_0x766c('0x1b')]||null:null})[_0x766c('0x20')](function(_0x4b2b06){logger[_0x766c('0xc')]('UpdateMemberReport',_0x4e5eec);logger[_0x766c('0xe')]('UpdateMemberReport',_0x4e5eec,JSON[_0x766c('0x10')](_0x4b2b06));_0x182a81(_0x4b2b06);})[_0x766c('0x15')](function(_0x4832da){logger[_0x766c('0x11')](_0x766c('0x24'),_0x4832da['message'],_0x4e5eec);_0x2f96e3(_0x26bd0b[_0x766c('0x11')](0x1f4,_0x4832da['message']));});});};
\ No newline at end of file