Built motion from commit d5e4af8c.|2.6.23
[motion2.git] / server / api / mailServerIn / mailServerIn.rpc.js
index 7ed8eac..6d597a4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x602a=['code','message','result','catch','GetMailServerIn','MailServerIn','findAll','options','raw','limit','include','map','attributes','model','debug','stringify','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','MailServerIn,\x20%s,\x20%s','request\x20sent','error'];(function(_0x46aff9,_0x4085d0){var _0x6bc0d1=function(_0x2d169){while(--_0x2d169){_0x46aff9['push'](_0x46aff9['shift']());}};_0x6bc0d1(++_0x4085d0);}(_0x602a,0x1de));var _0xa602=function(_0x363642,_0x364ea1){_0x363642=_0x363642-0x0;var _0x552bbd=_0x602a[_0x363642];return _0x552bbd;};'use strict';var _=require(_0xa602('0x0'));var util=require('util');var moment=require(_0xa602('0x1'));var BPromise=require(_0xa602('0x2'));var rs=require(_0xa602('0x3'));var fs=require('fs');var Redis=require(_0xa602('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xa602('0x5'));var logger=require(_0xa602('0x6'))('rpc');var config=require(_0xa602('0x7'));var jayson=require(_0xa602('0x8'));var client=jayson[_0xa602('0x9')][_0xa602('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x58d7d5,_0x271f6c,_0x1c4ee9){return new BPromise(function(_0x31bc1b,_0xf9f135){return client[_0xa602('0xb')](_0x58d7d5,_0x1c4ee9)[_0xa602('0xc')](function(_0x4a5c4c){logger[_0xa602('0xd')](_0xa602('0xe'),_0x271f6c,_0xa602('0xf'));logger['debug']('MailServerIn,\x20%s,\x20%s,\x20%s',_0x271f6c,'request\x20sent',JSON['stringify'](_0x4a5c4c));if(_0x4a5c4c[_0xa602('0x10')]){if(_0x4a5c4c[_0xa602('0x10')][_0xa602('0x11')]===0x1f4){logger[_0xa602('0x10')]('MailServerIn,\x20%s,\x20%s',_0x271f6c,_0x4a5c4c['error'][_0xa602('0x12')]);return _0xf9f135(_0x4a5c4c[_0xa602('0x10')][_0xa602('0x12')]);}logger['error']('MailServerIn,\x20%s,\x20%s',_0x271f6c,_0x4a5c4c[_0xa602('0x10')][_0xa602('0x12')]);return _0x31bc1b(_0x4a5c4c[_0xa602('0x10')][_0xa602('0x12')]);}else{logger[_0xa602('0xd')](_0xa602('0xe'),_0x271f6c,_0xa602('0xf'));_0x31bc1b(_0x4a5c4c[_0xa602('0x13')][_0xa602('0x12')]);}})[_0xa602('0x14')](function(_0x8c5875){logger[_0xa602('0x10')](_0xa602('0xe'),_0x271f6c,_0x8c5875);_0xf9f135(_0x8c5875);});});}exports[_0xa602('0x15')]=function(_0x2b5c7e){var _0x52b277=this;return new Promise(function(_0x25bb91,_0xe80510){return db[_0xa602('0x16')][_0xa602('0x17')]({'raw':_0x2b5c7e[_0xa602('0x18')]?_0x2b5c7e[_0xa602('0x18')][_0xa602('0x19')]===undefined?!![]:![]:!![],'where':_0x2b5c7e[_0xa602('0x18')]?_0x2b5c7e[_0xa602('0x18')]['where']||null:null,'attributes':_0x2b5c7e[_0xa602('0x18')]?_0x2b5c7e[_0xa602('0x18')]['attributes']||null:null,'limit':_0x2b5c7e['options']?_0x2b5c7e['options'][_0xa602('0x1a')]||null:null,'include':_0x2b5c7e[_0xa602('0x18')]?_0x2b5c7e[_0xa602('0x18')][_0xa602('0x1b')]?_[_0xa602('0x1c')](_0x2b5c7e[_0xa602('0x18')][_0xa602('0x1b')],function(_0x53a407){return{'model':db[_0x53a407['model']],'as':_0x53a407['as'],'attributes':_0x53a407[_0xa602('0x1d')],'include':_0x53a407[_0xa602('0x1b')]?_[_0xa602('0x1c')](_0x53a407[_0xa602('0x1b')],function(_0x3c3c63){return{'model':db[_0x3c3c63[_0xa602('0x1e')]],'as':_0x3c3c63['as'],'attributes':_0x3c3c63[_0xa602('0x1d')],'include':_0x3c3c63[_0xa602('0x1b')]?_['map'](_0x3c3c63['include'],function(_0x177ebe){return{'model':db[_0x177ebe[_0xa602('0x1e')]],'as':_0x177ebe['as'],'attributes':_0x177ebe['attributes']};}):[]};}):[]};}):[]:[]})[_0xa602('0xc')](function(_0x3f06ca){logger[_0xa602('0xd')](_0xa602('0x15'),_0x2b5c7e);logger[_0xa602('0x1f')](_0xa602('0x15'),_0x2b5c7e,JSON[_0xa602('0x20')](_0x3f06ca));_0x25bb91(_0x3f06ca);})[_0xa602('0x14')](function(_0x464696){logger['error']('GetMailServerIn',_0x464696['message'],_0x2b5c7e);_0xe80510(_0x52b277[_0xa602('0x10')](0x1f4,_0x464696[_0xa602('0x12')]));});});};
\ No newline at end of file
+var _0xf72b=['ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','MailServerIn,\x20%s,\x20%s','request\x20sent','MailServerIn,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','GetMailServerIn','MailServerIn','findAll','options','raw','where','attributes','limit','include','map','model','then','debug','catch','lodash','moment','randomstring'];(function(_0x2c9238,_0x42c58d){var _0x1acf94=function(_0x2d5bee){while(--_0x2d5bee){_0x2c9238['push'](_0x2c9238['shift']());}};_0x1acf94(++_0x42c58d);}(_0xf72b,0x1d9));var _0xbf72=function(_0x53e814,_0x44dc81){_0x53e814=_0x53e814-0x0;var _0x50aaea=_0xf72b[_0x53e814];return _0x50aaea;};'use strict';var _=require(_0xbf72('0x0'));var util=require('util');var moment=require(_0xbf72('0x1'));var BPromise=require('bluebird');var rs=require(_0xbf72('0x2'));var fs=require('fs');var Redis=require(_0xbf72('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xbf72('0x4'));var logger=require(_0xbf72('0x5'))(_0xbf72('0x6'));var config=require(_0xbf72('0x7'));var jayson=require(_0xbf72('0x8'));var client=jayson[_0xbf72('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x41c11d,_0xc0842b,_0x119807){return new BPromise(function(_0xd0402c,_0xdd6177){return client[_0xbf72('0xa')](_0x41c11d,_0x119807)['then'](function(_0x455891){logger['info'](_0xbf72('0xb'),_0xc0842b,_0xbf72('0xc'));logger['debug'](_0xbf72('0xd'),_0xc0842b,_0xbf72('0xc'),JSON[_0xbf72('0xe')](_0x455891));if(_0x455891[_0xbf72('0xf')]){if(_0x455891[_0xbf72('0xf')][_0xbf72('0x10')]===0x1f4){logger[_0xbf72('0xf')](_0xbf72('0xb'),_0xc0842b,_0x455891['error'][_0xbf72('0x11')]);return _0xdd6177(_0x455891[_0xbf72('0xf')][_0xbf72('0x11')]);}logger['error'](_0xbf72('0xb'),_0xc0842b,_0x455891['error']['message']);return _0xd0402c(_0x455891['error'][_0xbf72('0x11')]);}else{logger[_0xbf72('0x12')](_0xbf72('0xb'),_0xc0842b,_0xbf72('0xc'));_0xd0402c(_0x455891[_0xbf72('0x13')][_0xbf72('0x11')]);}})['catch'](function(_0x266ce2){logger[_0xbf72('0xf')](_0xbf72('0xb'),_0xc0842b,_0x266ce2);_0xdd6177(_0x266ce2);});});}exports[_0xbf72('0x14')]=function(_0x27dadc){var _0x5b5fc9=this;return new Promise(function(_0x51d4c9,_0x1b8d73){return db[_0xbf72('0x15')][_0xbf72('0x16')]({'raw':_0x27dadc[_0xbf72('0x17')]?_0x27dadc[_0xbf72('0x17')][_0xbf72('0x18')]===undefined?!![]:![]:!![],'where':_0x27dadc[_0xbf72('0x17')]?_0x27dadc['options'][_0xbf72('0x19')]||null:null,'attributes':_0x27dadc[_0xbf72('0x17')]?_0x27dadc[_0xbf72('0x17')][_0xbf72('0x1a')]||null:null,'limit':_0x27dadc[_0xbf72('0x17')]?_0x27dadc['options'][_0xbf72('0x1b')]||null:null,'include':_0x27dadc[_0xbf72('0x17')]?_0x27dadc['options'][_0xbf72('0x1c')]?_[_0xbf72('0x1d')](_0x27dadc[_0xbf72('0x17')]['include'],function(_0x44f3f9){return{'model':db[_0x44f3f9[_0xbf72('0x1e')]],'as':_0x44f3f9['as'],'attributes':_0x44f3f9[_0xbf72('0x1a')],'include':_0x44f3f9[_0xbf72('0x1c')]?_['map'](_0x44f3f9[_0xbf72('0x1c')],function(_0x392a8c){return{'model':db[_0x392a8c[_0xbf72('0x1e')]],'as':_0x392a8c['as'],'attributes':_0x392a8c['attributes'],'include':_0x392a8c[_0xbf72('0x1c')]?_[_0xbf72('0x1d')](_0x392a8c[_0xbf72('0x1c')],function(_0x1a2f55){return{'model':db[_0x1a2f55[_0xbf72('0x1e')]],'as':_0x1a2f55['as'],'attributes':_0x1a2f55[_0xbf72('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xbf72('0x1f')](function(_0x25ecdf){logger[_0xbf72('0x12')](_0xbf72('0x14'),_0x27dadc);logger[_0xbf72('0x20')](_0xbf72('0x14'),_0x27dadc,JSON[_0xbf72('0xe')](_0x25ecdf));_0x51d4c9(_0x25ecdf);})[_0xbf72('0x21')](function(_0x37a233){logger['error'](_0xbf72('0x14'),_0x37a233[_0xbf72('0x11')],_0x27dadc);_0x1b8d73(_0x5b5fc9[_0xbf72('0xf')](0x1f4,_0x37a233[_0xbf72('0x11')]));});});};
\ No newline at end of file