Built motion from commit dbf3a7e2.|2.6.30
[motion2.git] / server / api / memberReport / memberReport.rpc.js
index abdb8d3..2d0c826 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x29af=['code','MemberReport,\x20%s,\x20%s','message','result','catch','GetMemberReport','MemberReport','options','where','limit','include','map','model','attributes','CreateMemberReport','create','body','UpdateMemberReport','update','raw','lodash','util','moment','randomstring','ioredis','../../config/utils','rpc','../../config/environment','http','then','info','debug','MemberReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x4f8bc4,_0x4bf1c3){var _0x4bc429=function(_0x24b69c){while(--_0x24b69c){_0x4f8bc4['push'](_0x4f8bc4['shift']());}};_0x4bc429(++_0x4bf1c3);}(_0x29af,0x134));var _0xf29a=function(_0x51e2a0,_0x458be2){_0x51e2a0=_0x51e2a0-0x0;var _0x9297e7=_0x29af[_0x51e2a0];return _0x9297e7;};'use strict';var _=require(_0xf29a('0x0'));var util=require(_0xf29a('0x1'));var moment=require(_0xf29a('0x2'));var BPromise=require('bluebird');var rs=require(_0xf29a('0x3'));var fs=require('fs');var Redis=require(_0xf29a('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xf29a('0x5'));var logger=require('../../config/logger')(_0xf29a('0x6'));var config=require(_0xf29a('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0xf29a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2c111b,_0x47749d,_0x33a308){return new BPromise(function(_0x347d76,_0x4393dc){return client['request'](_0x2c111b,_0x33a308)[_0xf29a('0x9')](function(_0x145dbb){logger[_0xf29a('0xa')]('MemberReport,\x20%s,\x20%s',_0x47749d,'request\x20sent');logger[_0xf29a('0xb')](_0xf29a('0xc'),_0x47749d,_0xf29a('0xd'),JSON[_0xf29a('0xe')](_0x145dbb));if(_0x145dbb[_0xf29a('0xf')]){if(_0x145dbb[_0xf29a('0xf')][_0xf29a('0x10')]===0x1f4){logger['error'](_0xf29a('0x11'),_0x47749d,_0x145dbb[_0xf29a('0xf')][_0xf29a('0x12')]);return _0x4393dc(_0x145dbb[_0xf29a('0xf')][_0xf29a('0x12')]);}logger[_0xf29a('0xf')](_0xf29a('0x11'),_0x47749d,_0x145dbb['error']['message']);return _0x347d76(_0x145dbb['error'][_0xf29a('0x12')]);}else{logger[_0xf29a('0xa')](_0xf29a('0x11'),_0x47749d,_0xf29a('0xd'));_0x347d76(_0x145dbb[_0xf29a('0x13')]['message']);}})[_0xf29a('0x14')](function(_0x42567e){logger[_0xf29a('0xf')](_0xf29a('0x11'),_0x47749d,_0x42567e);_0x4393dc(_0x42567e);});});}exports[_0xf29a('0x15')]=function(_0xd4ca39){var _0x19e886=this;return new Promise(function(_0x296829,_0x3f9da8){return db[_0xf29a('0x16')]['findAll']({'raw':_0xd4ca39[_0xf29a('0x17')]?_0xd4ca39[_0xf29a('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0xd4ca39[_0xf29a('0x17')]?_0xd4ca39[_0xf29a('0x17')][_0xf29a('0x18')]||null:null,'attributes':_0xd4ca39['options']?_0xd4ca39[_0xf29a('0x17')]['attributes']||null:null,'limit':_0xd4ca39[_0xf29a('0x17')]?_0xd4ca39[_0xf29a('0x17')][_0xf29a('0x19')]||null:null,'include':_0xd4ca39[_0xf29a('0x17')]?_0xd4ca39['options'][_0xf29a('0x1a')]?_[_0xf29a('0x1b')](_0xd4ca39[_0xf29a('0x17')][_0xf29a('0x1a')],function(_0x35af39){return{'model':db[_0x35af39[_0xf29a('0x1c')]],'as':_0x35af39['as'],'attributes':_0x35af39[_0xf29a('0x1d')],'include':_0x35af39['include']?_['map'](_0x35af39['include'],function(_0x262a5f){return{'model':db[_0x262a5f['model']],'as':_0x262a5f['as'],'attributes':_0x262a5f[_0xf29a('0x1d')],'include':_0x262a5f[_0xf29a('0x1a')]?_[_0xf29a('0x1b')](_0x262a5f['include'],function(_0x181c3a){return{'model':db[_0x181c3a[_0xf29a('0x1c')]],'as':_0x181c3a['as'],'attributes':_0x181c3a[_0xf29a('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xf29a('0x9')](function(_0x11d1a6){logger[_0xf29a('0xa')]('GetMemberReport',_0xd4ca39);logger[_0xf29a('0xb')](_0xf29a('0x15'),_0xd4ca39,JSON['stringify'](_0x11d1a6));_0x296829(_0x11d1a6);})['catch'](function(_0x4fdd1b){logger[_0xf29a('0xf')](_0xf29a('0x15'),_0x4fdd1b[_0xf29a('0x12')],_0xd4ca39);_0x3f9da8(_0x19e886[_0xf29a('0xf')](0x1f4,_0x4fdd1b[_0xf29a('0x12')]));});});};exports[_0xf29a('0x1e')]=function(_0x694c05){var _0x50b221=this;return new Promise(function(_0x2b10d1,_0x3e31c3){return db[_0xf29a('0x16')][_0xf29a('0x1f')](_0x694c05[_0xf29a('0x20')],{'raw':_0x694c05[_0xf29a('0x17')]?_0x694c05[_0xf29a('0x17')]['raw']===undefined?!![]:![]:!![]})[_0xf29a('0x9')](function(_0x566b1d){logger[_0xf29a('0xa')](_0xf29a('0x1e'),_0x694c05);logger[_0xf29a('0xb')](_0xf29a('0x1e'),_0x694c05,JSON[_0xf29a('0xe')](_0x566b1d));_0x2b10d1(_0x566b1d);})['catch'](function(_0x12110d){logger['error'](_0xf29a('0x1e'),_0x12110d[_0xf29a('0x12')],_0x694c05);_0x3e31c3(_0x50b221['error'](0x1f4,_0x12110d[_0xf29a('0x12')]));});});};exports[_0xf29a('0x21')]=function(_0x5b1834){var _0x13b011=this;return new Promise(function(_0x399698,_0x422cd8){return db[_0xf29a('0x16')][_0xf29a('0x22')](_0x5b1834[_0xf29a('0x20')],{'raw':_0x5b1834['options']?_0x5b1834[_0xf29a('0x17')][_0xf29a('0x23')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5b1834[_0xf29a('0x17')]?_0x5b1834['options'][_0xf29a('0x18')]||null:null,'attributes':_0x5b1834[_0xf29a('0x17')]?_0x5b1834[_0xf29a('0x17')][_0xf29a('0x1d')]||null:null,'limit':_0x5b1834[_0xf29a('0x17')]?_0x5b1834[_0xf29a('0x17')][_0xf29a('0x19')]||null:null})[_0xf29a('0x9')](function(_0x1fde1e){logger[_0xf29a('0xa')](_0xf29a('0x21'),_0x5b1834);logger[_0xf29a('0xb')]('UpdateMemberReport',_0x5b1834,JSON['stringify'](_0x1fde1e));_0x399698(_0x1fde1e);})[_0xf29a('0x14')](function(_0x1650a7){logger[_0xf29a('0xf')]('UpdateMemberReport',_0x1650a7[_0xf29a('0x12')],_0x5b1834);_0x422cd8(_0x13b011[_0xf29a('0xf')](0x1f4,_0x1650a7[_0xf29a('0x12')]));});});};
\ No newline at end of file
+var _0x14f5=['../../config/environment','jayson/promise','client','http','then','info','MemberReport,\x20%s,\x20%s','request\x20sent','debug','MemberReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','GetMemberReport','MemberReport','options','raw','where','attributes','limit','include','model','map','stringify','CreateMemberReport','create','body','UpdateMemberReport','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger'];(function(_0xaec2a3,_0x5973b9){var _0x56955a=function(_0x277b25){while(--_0x277b25){_0xaec2a3['push'](_0xaec2a3['shift']());}};_0x56955a(++_0x5973b9);}(_0x14f5,0xae));var _0x514f=function(_0x21c7e4,_0x2d61be){_0x21c7e4=_0x21c7e4-0x0;var _0x310cd2=_0x14f5[_0x21c7e4];return _0x310cd2;};'use strict';var _=require('lodash');var util=require(_0x514f('0x0'));var moment=require('moment');var BPromise=require(_0x514f('0x1'));var rs=require(_0x514f('0x2'));var fs=require('fs');var Redis=require(_0x514f('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x514f('0x4'));var logger=require(_0x514f('0x5'))('rpc');var config=require(_0x514f('0x6'));var jayson=require(_0x514f('0x7'));var client=jayson[_0x514f('0x8')][_0x514f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x463985,_0x43ec42,_0xdb9614){return new BPromise(function(_0x4a5497,_0x203b02){return client['request'](_0x463985,_0xdb9614)[_0x514f('0xa')](function(_0x1e3fa7){logger[_0x514f('0xb')](_0x514f('0xc'),_0x43ec42,_0x514f('0xd'));logger[_0x514f('0xe')](_0x514f('0xf'),_0x43ec42,'request\x20sent',JSON['stringify'](_0x1e3fa7));if(_0x1e3fa7['error']){if(_0x1e3fa7[_0x514f('0x10')][_0x514f('0x11')]===0x1f4){logger[_0x514f('0x10')](_0x514f('0xc'),_0x43ec42,_0x1e3fa7[_0x514f('0x10')][_0x514f('0x12')]);return _0x203b02(_0x1e3fa7[_0x514f('0x10')][_0x514f('0x12')]);}logger[_0x514f('0x10')](_0x514f('0xc'),_0x43ec42,_0x1e3fa7[_0x514f('0x10')][_0x514f('0x12')]);return _0x4a5497(_0x1e3fa7[_0x514f('0x10')][_0x514f('0x12')]);}else{logger[_0x514f('0xb')]('MemberReport,\x20%s,\x20%s',_0x43ec42,_0x514f('0xd'));_0x4a5497(_0x1e3fa7[_0x514f('0x13')]['message']);}})[_0x514f('0x14')](function(_0x53851d){logger[_0x514f('0x10')](_0x514f('0xc'),_0x43ec42,_0x53851d);_0x203b02(_0x53851d);});});}exports[_0x514f('0x15')]=function(_0x5a5641){var _0x28e99a=this;return new Promise(function(_0x3673a4,_0x2cdd0d){return db[_0x514f('0x16')]['findAll']({'raw':_0x5a5641['options']?_0x5a5641[_0x514f('0x17')][_0x514f('0x18')]===undefined?!![]:![]:!![],'where':_0x5a5641[_0x514f('0x17')]?_0x5a5641['options'][_0x514f('0x19')]||null:null,'attributes':_0x5a5641[_0x514f('0x17')]?_0x5a5641['options'][_0x514f('0x1a')]||null:null,'limit':_0x5a5641[_0x514f('0x17')]?_0x5a5641['options'][_0x514f('0x1b')]||null:null,'include':_0x5a5641[_0x514f('0x17')]?_0x5a5641[_0x514f('0x17')][_0x514f('0x1c')]?_['map'](_0x5a5641['options']['include'],function(_0x5d80cb){return{'model':db[_0x5d80cb[_0x514f('0x1d')]],'as':_0x5d80cb['as'],'attributes':_0x5d80cb[_0x514f('0x1a')],'include':_0x5d80cb[_0x514f('0x1c')]?_[_0x514f('0x1e')](_0x5d80cb[_0x514f('0x1c')],function(_0x26df04){return{'model':db[_0x26df04[_0x514f('0x1d')]],'as':_0x26df04['as'],'attributes':_0x26df04[_0x514f('0x1a')],'include':_0x26df04[_0x514f('0x1c')]?_['map'](_0x26df04[_0x514f('0x1c')],function(_0x37b3db){return{'model':db[_0x37b3db[_0x514f('0x1d')]],'as':_0x37b3db['as'],'attributes':_0x37b3db[_0x514f('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x514f('0xa')](function(_0x32f3e1){logger[_0x514f('0xb')](_0x514f('0x15'),_0x5a5641);logger[_0x514f('0xe')]('GetMemberReport',_0x5a5641,JSON[_0x514f('0x1f')](_0x32f3e1));_0x3673a4(_0x32f3e1);})['catch'](function(_0x2b43e0){logger['error'](_0x514f('0x15'),_0x2b43e0[_0x514f('0x12')],_0x5a5641);_0x2cdd0d(_0x28e99a[_0x514f('0x10')](0x1f4,_0x2b43e0[_0x514f('0x12')]));});});};exports[_0x514f('0x20')]=function(_0x5d9017){var _0x56e83e=this;return new Promise(function(_0x3e788b,_0x5d564b){return db[_0x514f('0x16')][_0x514f('0x21')](_0x5d9017[_0x514f('0x22')],{'raw':_0x5d9017[_0x514f('0x17')]?_0x5d9017[_0x514f('0x17')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x5eee93){logger[_0x514f('0xb')](_0x514f('0x20'),_0x5d9017);logger[_0x514f('0xe')](_0x514f('0x20'),_0x5d9017,JSON[_0x514f('0x1f')](_0x5eee93));_0x3e788b(_0x5eee93);})[_0x514f('0x14')](function(_0x1cd65a){logger[_0x514f('0x10')](_0x514f('0x20'),_0x1cd65a[_0x514f('0x12')],_0x5d9017);_0x5d564b(_0x56e83e['error'](0x1f4,_0x1cd65a['message']));});});};exports['UpdateMemberReport']=function(_0x63d383){var _0x4e028b=this;return new Promise(function(_0x450d04,_0x50c120){return db[_0x514f('0x16')]['update'](_0x63d383['body'],{'raw':_0x63d383[_0x514f('0x17')]?_0x63d383['options'][_0x514f('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x63d383[_0x514f('0x17')]?_0x63d383[_0x514f('0x17')][_0x514f('0x19')]||null:null,'attributes':_0x63d383[_0x514f('0x17')]?_0x63d383['options'][_0x514f('0x1a')]||null:null,'limit':_0x63d383[_0x514f('0x17')]?_0x63d383[_0x514f('0x17')][_0x514f('0x1b')]||null:null})['then'](function(_0x196a2b){logger[_0x514f('0xb')](_0x514f('0x23'),_0x63d383);logger[_0x514f('0xe')]('UpdateMemberReport',_0x63d383,JSON[_0x514f('0x1f')](_0x196a2b));_0x450d04(_0x196a2b);})[_0x514f('0x14')](function(_0x420c77){logger[_0x514f('0x10')]('UpdateMemberReport',_0x420c77[_0x514f('0x12')],_0x63d383);_0x50c120(_0x4e028b['error'](0x1f4,_0x420c77[_0x514f('0x12')]));});});};
\ No newline at end of file