Built motion from commit (unavailable).|2.5.13
[motion2.git] / server / api / memberReport / memberReport.rpc.js
index b6c2afa..ebb7120 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0500=['../../config/environment','jayson/promise','client','info','MemberReport,\x20%s,\x20%s','debug','MemberReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','GetMemberReport','MemberReport','findAll','options','raw','where','attributes','include','map','model','then','create','body','CreateMemberReport','UpdateMemberReport','update','limit','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc'];(function(_0x5c9262,_0x538558){var _0x470866=function(_0x3e1f09){while(--_0x3e1f09){_0x5c9262['push'](_0x5c9262['shift']());}};_0x470866(++_0x538558);}(_0x0500,0x146));var _0x0050=function(_0xe31859,_0x5ed378){_0xe31859=_0xe31859-0x0;var _0x255df2=_0x0500[_0xe31859];return _0x255df2;};'use strict';var _=require(_0x0050('0x0'));var util=require('util');var moment=require(_0x0050('0x1'));var BPromise=require(_0x0050('0x2'));var rs=require(_0x0050('0x3'));var fs=require('fs');var Redis=require(_0x0050('0x4'));var db=require(_0x0050('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x0050('0x6'));var config=require(_0x0050('0x7'));var jayson=require(_0x0050('0x8'));var client=jayson[_0x0050('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x943a9a,_0x2cd6a7,_0x2a69a4){return new BPromise(function(_0x20d5f7,_0x57f867){return client['request'](_0x943a9a,_0x2a69a4)['then'](function(_0x4bad18){logger[_0x0050('0xa')](_0x0050('0xb'),_0x2cd6a7,'request\x20sent');logger[_0x0050('0xc')](_0x0050('0xd'),_0x2cd6a7,_0x0050('0xe'),JSON[_0x0050('0xf')](_0x4bad18));if(_0x4bad18['error']){if(_0x4bad18['error']['code']===0x1f4){logger[_0x0050('0x10')]('MemberReport,\x20%s,\x20%s',_0x2cd6a7,_0x4bad18[_0x0050('0x10')]['message']);return _0x57f867(_0x4bad18['error'][_0x0050('0x11')]);}logger[_0x0050('0x10')](_0x0050('0xb'),_0x2cd6a7,_0x4bad18[_0x0050('0x10')][_0x0050('0x11')]);return _0x20d5f7(_0x4bad18[_0x0050('0x10')][_0x0050('0x11')]);}else{logger['info'](_0x0050('0xb'),_0x2cd6a7,_0x0050('0xe'));_0x20d5f7(_0x4bad18[_0x0050('0x12')][_0x0050('0x11')]);}})[_0x0050('0x13')](function(_0x208a82){logger['error'](_0x0050('0xb'),_0x2cd6a7,_0x208a82);_0x57f867(_0x208a82);});});}exports[_0x0050('0x14')]=function(_0x48bb3a){var _0x76bbe8=this;return new Promise(function(_0x3fe2cb,_0x7f0dd4){return db[_0x0050('0x15')][_0x0050('0x16')]({'raw':_0x48bb3a['options']?_0x48bb3a[_0x0050('0x17')][_0x0050('0x18')]===undefined?!![]:![]:!![],'where':_0x48bb3a[_0x0050('0x17')]?_0x48bb3a['options'][_0x0050('0x19')]||null:null,'attributes':_0x48bb3a[_0x0050('0x17')]?_0x48bb3a[_0x0050('0x17')][_0x0050('0x1a')]||null:null,'limit':_0x48bb3a[_0x0050('0x17')]?_0x48bb3a[_0x0050('0x17')]['limit']||null:null,'include':_0x48bb3a['options']?_0x48bb3a[_0x0050('0x17')][_0x0050('0x1b')]?_[_0x0050('0x1c')](_0x48bb3a[_0x0050('0x17')]['include'],function(_0x35c1a8){return{'model':db[_0x35c1a8[_0x0050('0x1d')]],'as':_0x35c1a8['as'],'attributes':_0x35c1a8[_0x0050('0x1a')],'include':_0x35c1a8[_0x0050('0x1b')]?_[_0x0050('0x1c')](_0x35c1a8[_0x0050('0x1b')],function(_0x450473){return{'model':db[_0x450473[_0x0050('0x1d')]],'as':_0x450473['as'],'attributes':_0x450473[_0x0050('0x1a')],'include':_0x450473['include']?_['map'](_0x450473[_0x0050('0x1b')],function(_0x2494fa){return{'model':db[_0x2494fa[_0x0050('0x1d')]],'as':_0x2494fa['as'],'attributes':_0x2494fa[_0x0050('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x0050('0x1e')](function(_0x287fa4){logger[_0x0050('0xa')]('GetMemberReport',_0x48bb3a);logger[_0x0050('0xc')](_0x0050('0x14'),_0x48bb3a,JSON[_0x0050('0xf')](_0x287fa4));_0x3fe2cb(_0x287fa4);})['catch'](function(_0x449745){logger[_0x0050('0x10')]('GetMemberReport',_0x449745[_0x0050('0x11')],_0x48bb3a);_0x7f0dd4(_0x76bbe8['error'](0x1f4,_0x449745['message']));});});};exports['CreateMemberReport']=function(_0x4024d5){var _0x31f3e9=this;return new Promise(function(_0x474ba8,_0x377fbb){return db['MemberReport'][_0x0050('0x1f')](_0x4024d5[_0x0050('0x20')],{'raw':_0x4024d5['options']?_0x4024d5[_0x0050('0x17')][_0x0050('0x18')]===undefined?!![]:![]:!![]})[_0x0050('0x1e')](function(_0x491062){logger[_0x0050('0xa')]('CreateMemberReport',_0x4024d5);logger[_0x0050('0xc')](_0x0050('0x21'),_0x4024d5,JSON[_0x0050('0xf')](_0x491062));_0x474ba8(_0x491062);})[_0x0050('0x13')](function(_0x52e3a7){logger[_0x0050('0x10')](_0x0050('0x21'),_0x52e3a7[_0x0050('0x11')],_0x4024d5);_0x377fbb(_0x31f3e9[_0x0050('0x10')](0x1f4,_0x52e3a7[_0x0050('0x11')]));});});};exports[_0x0050('0x22')]=function(_0x1e7dfb){var _0x3929b9=this;return new Promise(function(_0x5119b9,_0x4f82e5){return db[_0x0050('0x15')][_0x0050('0x23')](_0x1e7dfb[_0x0050('0x20')],{'raw':_0x1e7dfb[_0x0050('0x17')]?_0x1e7dfb[_0x0050('0x17')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1e7dfb['options']?_0x1e7dfb[_0x0050('0x17')][_0x0050('0x19')]||null:null,'attributes':_0x1e7dfb['options']?_0x1e7dfb['options']['attributes']||null:null,'limit':_0x1e7dfb[_0x0050('0x17')]?_0x1e7dfb[_0x0050('0x17')][_0x0050('0x24')]||null:null})[_0x0050('0x1e')](function(_0x4ae4e4){logger[_0x0050('0xa')](_0x0050('0x22'),_0x1e7dfb);logger['debug'](_0x0050('0x22'),_0x1e7dfb,JSON[_0x0050('0xf')](_0x4ae4e4));_0x5119b9(_0x4ae4e4);})[_0x0050('0x13')](function(_0x1a093c){logger[_0x0050('0x10')](_0x0050('0x22'),_0x1a093c[_0x0050('0x11')],_0x1e7dfb);_0x4f82e5(_0x3929b9[_0x0050('0x10')](0x1f4,_0x1a093c[_0x0050('0x11')]));});});};
\ No newline at end of file
+var _0xe7bc=['where','attributes','limit','include','map','model','debug','stringify','CreateMemberReport','body','UpdateMemberReport','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','client','http','request','then','request\x20sent','error','code','message','MemberReport,\x20%s,\x20%s','info','catch','GetMemberReport','MemberReport','findAll','options','raw'];(function(_0x170ee8,_0x1b2c0d){var _0x57595d=function(_0x433cf6){while(--_0x433cf6){_0x170ee8['push'](_0x170ee8['shift']());}};_0x57595d(++_0x1b2c0d);}(_0xe7bc,0x146));var _0xce7b=function(_0x565ed7,_0x398228){_0x565ed7=_0x565ed7-0x0;var _0x183ad7=_0xe7bc[_0x565ed7];return _0x183ad7;};'use strict';var _=require('lodash');var util=require(_0xce7b('0x0'));var moment=require(_0xce7b('0x1'));var BPromise=require(_0xce7b('0x2'));var rs=require(_0xce7b('0x3'));var fs=require('fs');var Redis=require(_0xce7b('0x4'));var db=require(_0xce7b('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xce7b('0x6'))('rpc');var config=require(_0xce7b('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xce7b('0x8')][_0xce7b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x58e883,_0x3c414e,_0x2af7f9){return new BPromise(function(_0x3e9a69,_0x4ed64b){return client[_0xce7b('0xa')](_0x58e883,_0x2af7f9)[_0xce7b('0xb')](function(_0x465841){logger['info']('MemberReport,\x20%s,\x20%s',_0x3c414e,_0xce7b('0xc'));logger['debug']('MemberReport,\x20%s,\x20%s,\x20%s',_0x3c414e,_0xce7b('0xc'),JSON['stringify'](_0x465841));if(_0x465841[_0xce7b('0xd')]){if(_0x465841[_0xce7b('0xd')][_0xce7b('0xe')]===0x1f4){logger[_0xce7b('0xd')]('MemberReport,\x20%s,\x20%s',_0x3c414e,_0x465841[_0xce7b('0xd')][_0xce7b('0xf')]);return _0x4ed64b(_0x465841[_0xce7b('0xd')][_0xce7b('0xf')]);}logger['error'](_0xce7b('0x10'),_0x3c414e,_0x465841[_0xce7b('0xd')][_0xce7b('0xf')]);return _0x3e9a69(_0x465841[_0xce7b('0xd')][_0xce7b('0xf')]);}else{logger[_0xce7b('0x11')](_0xce7b('0x10'),_0x3c414e,_0xce7b('0xc'));_0x3e9a69(_0x465841['result']['message']);}})[_0xce7b('0x12')](function(_0x51608c){logger[_0xce7b('0xd')]('MemberReport,\x20%s,\x20%s',_0x3c414e,_0x51608c);_0x4ed64b(_0x51608c);});});}exports[_0xce7b('0x13')]=function(_0x204b5d){var _0xdac45f=this;return new Promise(function(_0xfff0cd,_0x5e77a1){return db[_0xce7b('0x14')][_0xce7b('0x15')]({'raw':_0x204b5d[_0xce7b('0x16')]?_0x204b5d[_0xce7b('0x16')][_0xce7b('0x17')]===undefined?!![]:![]:!![],'where':_0x204b5d[_0xce7b('0x16')]?_0x204b5d[_0xce7b('0x16')][_0xce7b('0x18')]||null:null,'attributes':_0x204b5d[_0xce7b('0x16')]?_0x204b5d['options'][_0xce7b('0x19')]||null:null,'limit':_0x204b5d[_0xce7b('0x16')]?_0x204b5d[_0xce7b('0x16')][_0xce7b('0x1a')]||null:null,'include':_0x204b5d['options']?_0x204b5d[_0xce7b('0x16')][_0xce7b('0x1b')]?_[_0xce7b('0x1c')](_0x204b5d[_0xce7b('0x16')][_0xce7b('0x1b')],function(_0x529361){return{'model':db[_0x529361[_0xce7b('0x1d')]],'as':_0x529361['as'],'attributes':_0x529361[_0xce7b('0x19')],'include':_0x529361[_0xce7b('0x1b')]?_[_0xce7b('0x1c')](_0x529361[_0xce7b('0x1b')],function(_0x3d52f6){return{'model':db[_0x3d52f6[_0xce7b('0x1d')]],'as':_0x3d52f6['as'],'attributes':_0x3d52f6['attributes'],'include':_0x3d52f6['include']?_['map'](_0x3d52f6[_0xce7b('0x1b')],function(_0x347ee4){return{'model':db[_0x347ee4['model']],'as':_0x347ee4['as'],'attributes':_0x347ee4['attributes']};}):[]};}):[]};}):[]:[]})[_0xce7b('0xb')](function(_0x1b42c5){logger[_0xce7b('0x11')](_0xce7b('0x13'),_0x204b5d);logger[_0xce7b('0x1e')](_0xce7b('0x13'),_0x204b5d,JSON[_0xce7b('0x1f')](_0x1b42c5));_0xfff0cd(_0x1b42c5);})['catch'](function(_0x11ad3b){logger[_0xce7b('0xd')](_0xce7b('0x13'),_0x11ad3b[_0xce7b('0xf')],_0x204b5d);_0x5e77a1(_0xdac45f[_0xce7b('0xd')](0x1f4,_0x11ad3b[_0xce7b('0xf')]));});});};exports[_0xce7b('0x20')]=function(_0x240371){var _0x258566=this;return new Promise(function(_0x232c85,_0x2e8d26){return db[_0xce7b('0x14')]['create'](_0x240371['body'],{'raw':_0x240371[_0xce7b('0x16')]?_0x240371[_0xce7b('0x16')][_0xce7b('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0x2292df){logger[_0xce7b('0x11')](_0xce7b('0x20'),_0x240371);logger[_0xce7b('0x1e')](_0xce7b('0x20'),_0x240371,JSON['stringify'](_0x2292df));_0x232c85(_0x2292df);})['catch'](function(_0x203604){logger['error'](_0xce7b('0x20'),_0x203604[_0xce7b('0xf')],_0x240371);_0x2e8d26(_0x258566[_0xce7b('0xd')](0x1f4,_0x203604[_0xce7b('0xf')]));});});};exports['UpdateMemberReport']=function(_0x546812){var _0x3a224a=this;return new Promise(function(_0x2c8af5,_0x519b9f){return db[_0xce7b('0x14')]['update'](_0x546812[_0xce7b('0x21')],{'raw':_0x546812[_0xce7b('0x16')]?_0x546812[_0xce7b('0x16')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x546812[_0xce7b('0x16')]?_0x546812['options'][_0xce7b('0x18')]||null:null,'attributes':_0x546812[_0xce7b('0x16')]?_0x546812[_0xce7b('0x16')]['attributes']||null:null,'limit':_0x546812[_0xce7b('0x16')]?_0x546812[_0xce7b('0x16')][_0xce7b('0x1a')]||null:null})[_0xce7b('0xb')](function(_0x34d65c){logger[_0xce7b('0x11')]('UpdateMemberReport',_0x546812);logger[_0xce7b('0x1e')]('UpdateMemberReport',_0x546812,JSON['stringify'](_0x34d65c));_0x2c8af5(_0x34d65c);})['catch'](function(_0x134ea9){logger[_0xce7b('0xd')](_0xce7b('0x22'),_0x134ea9['message'],_0x546812);_0x519b9f(_0x3a224a[_0xce7b('0xd')](0x1f4,_0x134ea9['message']));});});};
\ No newline at end of file