Built motion from commit eddce310.|2.6.12
[motion2.git] / server / api / memberReport / memberReport.rpc.js
index 457b39d..36e4025 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc9b=['update','UpdateMemberReport','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','http','then','info','request\x20sent','debug','MemberReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','MemberReport,\x20%s,\x20%s','result','catch','GetMemberReport','MemberReport','findAll','options','raw','where','attributes','limit','include','map','model','CreateMemberReport','body'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xfc9b,0x74));var _0xbfc9=function(_0x59cf85,_0x35005e){_0x59cf85=_0x59cf85-0x0;var _0x36fb0d=_0xfc9b[_0x59cf85];return _0x36fb0d;};'use strict';var _=require(_0xbfc9('0x0'));var util=require(_0xbfc9('0x1'));var moment=require(_0xbfc9('0x2'));var BPromise=require(_0xbfc9('0x3'));var rs=require(_0xbfc9('0x4'));var fs=require('fs');var Redis=require(_0xbfc9('0x5'));var db=require(_0xbfc9('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xbfc9('0x7'))('rpc');var config=require(_0xbfc9('0x8'));var jayson=require(_0xbfc9('0x9'));var client=jayson['client'][_0xbfc9('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x266c05,_0xed6492,_0xe288d1){return new BPromise(function(_0x4e0f74,_0x12bf13){return client['request'](_0x266c05,_0xe288d1)[_0xbfc9('0xb')](function(_0x5073cf){logger[_0xbfc9('0xc')]('MemberReport,\x20%s,\x20%s',_0xed6492,_0xbfc9('0xd'));logger[_0xbfc9('0xe')](_0xbfc9('0xf'),_0xed6492,_0xbfc9('0xd'),JSON[_0xbfc9('0x10')](_0x5073cf));if(_0x5073cf[_0xbfc9('0x11')]){if(_0x5073cf['error'][_0xbfc9('0x12')]===0x1f4){logger[_0xbfc9('0x11')]('MemberReport,\x20%s,\x20%s',_0xed6492,_0x5073cf[_0xbfc9('0x11')]['message']);return _0x12bf13(_0x5073cf[_0xbfc9('0x11')][_0xbfc9('0x13')]);}logger[_0xbfc9('0x11')](_0xbfc9('0x14'),_0xed6492,_0x5073cf['error'][_0xbfc9('0x13')]);return _0x4e0f74(_0x5073cf[_0xbfc9('0x11')][_0xbfc9('0x13')]);}else{logger[_0xbfc9('0xc')](_0xbfc9('0x14'),_0xed6492,_0xbfc9('0xd'));_0x4e0f74(_0x5073cf[_0xbfc9('0x15')][_0xbfc9('0x13')]);}})[_0xbfc9('0x16')](function(_0x42cacd){logger[_0xbfc9('0x11')](_0xbfc9('0x14'),_0xed6492,_0x42cacd);_0x12bf13(_0x42cacd);});});}exports[_0xbfc9('0x17')]=function(_0x21e216){var _0x12755a=this;return new Promise(function(_0x345e7a,_0xa78e78){return db[_0xbfc9('0x18')][_0xbfc9('0x19')]({'raw':_0x21e216[_0xbfc9('0x1a')]?_0x21e216[_0xbfc9('0x1a')][_0xbfc9('0x1b')]===undefined?!![]:![]:!![],'where':_0x21e216['options']?_0x21e216[_0xbfc9('0x1a')][_0xbfc9('0x1c')]||null:null,'attributes':_0x21e216[_0xbfc9('0x1a')]?_0x21e216[_0xbfc9('0x1a')][_0xbfc9('0x1d')]||null:null,'limit':_0x21e216[_0xbfc9('0x1a')]?_0x21e216[_0xbfc9('0x1a')][_0xbfc9('0x1e')]||null:null,'include':_0x21e216[_0xbfc9('0x1a')]?_0x21e216[_0xbfc9('0x1a')][_0xbfc9('0x1f')]?_[_0xbfc9('0x20')](_0x21e216[_0xbfc9('0x1a')][_0xbfc9('0x1f')],function(_0x5a3420){return{'model':db[_0x5a3420[_0xbfc9('0x21')]],'as':_0x5a3420['as'],'attributes':_0x5a3420[_0xbfc9('0x1d')],'include':_0x5a3420[_0xbfc9('0x1f')]?_[_0xbfc9('0x20')](_0x5a3420[_0xbfc9('0x1f')],function(_0x4ab0ec){return{'model':db[_0x4ab0ec[_0xbfc9('0x21')]],'as':_0x4ab0ec['as'],'attributes':_0x4ab0ec[_0xbfc9('0x1d')],'include':_0x4ab0ec[_0xbfc9('0x1f')]?_[_0xbfc9('0x20')](_0x4ab0ec[_0xbfc9('0x1f')],function(_0xfa504){return{'model':db[_0xfa504[_0xbfc9('0x21')]],'as':_0xfa504['as'],'attributes':_0xfa504[_0xbfc9('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xbfc9('0xb')](function(_0x4f5e21){logger['info']('GetMemberReport',_0x21e216);logger[_0xbfc9('0xe')]('GetMemberReport',_0x21e216,JSON['stringify'](_0x4f5e21));_0x345e7a(_0x4f5e21);})[_0xbfc9('0x16')](function(_0x2aa754){logger[_0xbfc9('0x11')](_0xbfc9('0x17'),_0x2aa754[_0xbfc9('0x13')],_0x21e216);_0xa78e78(_0x12755a[_0xbfc9('0x11')](0x1f4,_0x2aa754[_0xbfc9('0x13')]));});});};exports[_0xbfc9('0x22')]=function(_0x283d2d){var _0x56c98e=this;return new Promise(function(_0x310f94,_0xd845d7){return db[_0xbfc9('0x18')]['create'](_0x283d2d[_0xbfc9('0x23')],{'raw':_0x283d2d[_0xbfc9('0x1a')]?_0x283d2d[_0xbfc9('0x1a')][_0xbfc9('0x1b')]===undefined?!![]:![]:!![]})[_0xbfc9('0xb')](function(_0x4155db){logger[_0xbfc9('0xc')](_0xbfc9('0x22'),_0x283d2d);logger[_0xbfc9('0xe')](_0xbfc9('0x22'),_0x283d2d,JSON['stringify'](_0x4155db));_0x310f94(_0x4155db);})['catch'](function(_0x143f91){logger[_0xbfc9('0x11')](_0xbfc9('0x22'),_0x143f91[_0xbfc9('0x13')],_0x283d2d);_0xd845d7(_0x56c98e[_0xbfc9('0x11')](0x1f4,_0x143f91[_0xbfc9('0x13')]));});});};exports['UpdateMemberReport']=function(_0x1bd473){var _0x4b438d=this;return new Promise(function(_0x5509b6,_0x2bec44){return db['MemberReport'][_0xbfc9('0x24')](_0x1bd473[_0xbfc9('0x23')],{'raw':_0x1bd473[_0xbfc9('0x1a')]?_0x1bd473['options'][_0xbfc9('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1bd473['options']?_0x1bd473['options'][_0xbfc9('0x1c')]||null:null,'attributes':_0x1bd473[_0xbfc9('0x1a')]?_0x1bd473['options'][_0xbfc9('0x1d')]||null:null,'limit':_0x1bd473['options']?_0x1bd473['options'][_0xbfc9('0x1e')]||null:null})[_0xbfc9('0xb')](function(_0x3260e6){logger[_0xbfc9('0xc')](_0xbfc9('0x25'),_0x1bd473);logger[_0xbfc9('0xe')](_0xbfc9('0x25'),_0x1bd473,JSON[_0xbfc9('0x10')](_0x3260e6));_0x5509b6(_0x3260e6);})['catch'](function(_0x23d4b1){logger[_0xbfc9('0x11')]('UpdateMemberReport',_0x23d4b1['message'],_0x1bd473);_0x2bec44(_0x4b438d[_0xbfc9('0x11')](0x1f4,_0x23d4b1[_0xbfc9('0x13')]));});});};
\ No newline at end of file
+var _0xcedf=['message','info','result','catch','GetMemberReport','MemberReport','findAll','options','raw','where','include','map','model','attributes','CreateMemberReport','create','body','UpdateMemberReport','update','limit','lodash','util','moment','bluebird','ioredis','../../mysqldb','rpc','jayson/promise','http','request','then','MemberReport,\x20%s,\x20%s','request\x20sent','debug','MemberReport,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x5dec2b,_0x275a05){var _0x4aea35=function(_0x482153){while(--_0x482153){_0x5dec2b['push'](_0x5dec2b['shift']());}};_0x4aea35(++_0x275a05);}(_0xcedf,0x1b6));var _0xfced=function(_0x3fcb96,_0x443ee0){_0x3fcb96=_0x3fcb96-0x0;var _0x46fa7=_0xcedf[_0x3fcb96];return _0x46fa7;};'use strict';var _=require(_0xfced('0x0'));var util=require(_0xfced('0x1'));var moment=require(_0xfced('0x2'));var BPromise=require(_0xfced('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xfced('0x4'));var db=require(_0xfced('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xfced('0x6'));var config=require('../../config/environment');var jayson=require(_0xfced('0x7'));var client=jayson['client'][_0xfced('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x571725,_0x2cc4d1,_0x5bd518){return new BPromise(function(_0x5c6588,_0x27a65b){return client[_0xfced('0x9')](_0x571725,_0x5bd518)[_0xfced('0xa')](function(_0x1479e5){logger['info'](_0xfced('0xb'),_0x2cc4d1,_0xfced('0xc'));logger[_0xfced('0xd')](_0xfced('0xe'),_0x2cc4d1,_0xfced('0xc'),JSON[_0xfced('0xf')](_0x1479e5));if(_0x1479e5[_0xfced('0x10')]){if(_0x1479e5[_0xfced('0x10')][_0xfced('0x11')]===0x1f4){logger['error'](_0xfced('0xb'),_0x2cc4d1,_0x1479e5['error'][_0xfced('0x12')]);return _0x27a65b(_0x1479e5[_0xfced('0x10')][_0xfced('0x12')]);}logger[_0xfced('0x10')]('MemberReport,\x20%s,\x20%s',_0x2cc4d1,_0x1479e5[_0xfced('0x10')][_0xfced('0x12')]);return _0x5c6588(_0x1479e5[_0xfced('0x10')][_0xfced('0x12')]);}else{logger[_0xfced('0x13')](_0xfced('0xb'),_0x2cc4d1,_0xfced('0xc'));_0x5c6588(_0x1479e5[_0xfced('0x14')]['message']);}})[_0xfced('0x15')](function(_0x5f1ac5){logger[_0xfced('0x10')](_0xfced('0xb'),_0x2cc4d1,_0x5f1ac5);_0x27a65b(_0x5f1ac5);});});}exports[_0xfced('0x16')]=function(_0x2d00dc){var _0x38528a=this;return new Promise(function(_0x27e988,_0x3dc86c){return db[_0xfced('0x17')][_0xfced('0x18')]({'raw':_0x2d00dc[_0xfced('0x19')]?_0x2d00dc['options'][_0xfced('0x1a')]===undefined?!![]:![]:!![],'where':_0x2d00dc[_0xfced('0x19')]?_0x2d00dc[_0xfced('0x19')][_0xfced('0x1b')]||null:null,'attributes':_0x2d00dc[_0xfced('0x19')]?_0x2d00dc['options']['attributes']||null:null,'limit':_0x2d00dc[_0xfced('0x19')]?_0x2d00dc[_0xfced('0x19')]['limit']||null:null,'include':_0x2d00dc[_0xfced('0x19')]?_0x2d00dc[_0xfced('0x19')][_0xfced('0x1c')]?_[_0xfced('0x1d')](_0x2d00dc[_0xfced('0x19')][_0xfced('0x1c')],function(_0x4b3547){return{'model':db[_0x4b3547[_0xfced('0x1e')]],'as':_0x4b3547['as'],'attributes':_0x4b3547[_0xfced('0x1f')],'include':_0x4b3547[_0xfced('0x1c')]?_[_0xfced('0x1d')](_0x4b3547[_0xfced('0x1c')],function(_0x56a26e){return{'model':db[_0x56a26e['model']],'as':_0x56a26e['as'],'attributes':_0x56a26e[_0xfced('0x1f')],'include':_0x56a26e[_0xfced('0x1c')]?_[_0xfced('0x1d')](_0x56a26e[_0xfced('0x1c')],function(_0x4d67bf){return{'model':db[_0x4d67bf[_0xfced('0x1e')]],'as':_0x4d67bf['as'],'attributes':_0x4d67bf['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x328cf1){logger[_0xfced('0x13')]('GetMemberReport',_0x2d00dc);logger[_0xfced('0xd')]('GetMemberReport',_0x2d00dc,JSON[_0xfced('0xf')](_0x328cf1));_0x27e988(_0x328cf1);})[_0xfced('0x15')](function(_0x419875){logger[_0xfced('0x10')]('GetMemberReport',_0x419875[_0xfced('0x12')],_0x2d00dc);_0x3dc86c(_0x38528a[_0xfced('0x10')](0x1f4,_0x419875[_0xfced('0x12')]));});});};exports[_0xfced('0x20')]=function(_0x54faca){var _0x1fab8d=this;return new Promise(function(_0x2691b4,_0x221dc9){return db['MemberReport'][_0xfced('0x21')](_0x54faca[_0xfced('0x22')],{'raw':_0x54faca[_0xfced('0x19')]?_0x54faca[_0xfced('0x19')][_0xfced('0x1a')]===undefined?!![]:![]:!![]})[_0xfced('0xa')](function(_0x249692){logger[_0xfced('0x13')](_0xfced('0x20'),_0x54faca);logger[_0xfced('0xd')](_0xfced('0x20'),_0x54faca,JSON[_0xfced('0xf')](_0x249692));_0x2691b4(_0x249692);})[_0xfced('0x15')](function(_0x54b077){logger['error']('CreateMemberReport',_0x54b077[_0xfced('0x12')],_0x54faca);_0x221dc9(_0x1fab8d[_0xfced('0x10')](0x1f4,_0x54b077[_0xfced('0x12')]));});});};exports[_0xfced('0x23')]=function(_0xe017fd){var _0x5bba5c=this;return new Promise(function(_0x173c1f,_0x3c1131){return db[_0xfced('0x17')][_0xfced('0x24')](_0xe017fd[_0xfced('0x22')],{'raw':_0xe017fd['options']?_0xe017fd['options'][_0xfced('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xe017fd['options']?_0xe017fd[_0xfced('0x19')][_0xfced('0x1b')]||null:null,'attributes':_0xe017fd['options']?_0xe017fd[_0xfced('0x19')]['attributes']||null:null,'limit':_0xe017fd[_0xfced('0x19')]?_0xe017fd[_0xfced('0x19')][_0xfced('0x25')]||null:null})[_0xfced('0xa')](function(_0x22e449){logger[_0xfced('0x13')](_0xfced('0x23'),_0xe017fd);logger[_0xfced('0xd')](_0xfced('0x23'),_0xe017fd,JSON['stringify'](_0x22e449));_0x173c1f(_0x22e449);})[_0xfced('0x15')](function(_0x10276a){logger[_0xfced('0x10')](_0xfced('0x23'),_0x10276a[_0xfced('0x12')],_0xe017fd);_0x3c1131(_0x5bba5c[_0xfced('0x10')](0x1f4,_0x10276a[_0xfced('0x12')]));});});};
\ No newline at end of file