Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / api / mailServerIn / mailServerIn.rpc.js
index 8d854f3..b993e40 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd57a=['result','catch','MailServerIn','findAll','options','raw','where','attributes','limit','include','map','model','GetMailServerIn','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','info','MailServerIn,\x20%s,\x20%s','request\x20sent','debug','MailServerIn,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x3987a1,_0x447793){var _0xe2596e=function(_0x546925){while(--_0x546925){_0x3987a1['push'](_0x3987a1['shift']());}};_0xe2596e(++_0x447793);}(_0xd57a,0xdf));var _0xad57=function(_0x25690d,_0x5594ad){_0x25690d=_0x25690d-0x0;var _0x1af49f=_0xd57a[_0x25690d];return _0x1af49f;};'use strict';var _=require(_0xad57('0x0'));var util=require(_0xad57('0x1'));var moment=require(_0xad57('0x2'));var BPromise=require('bluebird');var rs=require(_0xad57('0x3'));var fs=require('fs');var Redis=require(_0xad57('0x4'));var db=require(_0xad57('0x5'))['db'];var utils=require(_0xad57('0x6'));var logger=require(_0xad57('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0xad57('0x8'));var client=jayson[_0xad57('0x9')][_0xad57('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xed22cb,_0x41d0ff,_0x38354b){return new BPromise(function(_0x231c0d,_0x4f2f43){return client[_0xad57('0xb')](_0xed22cb,_0x38354b)[_0xad57('0xc')](function(_0x1a903b){logger[_0xad57('0xd')](_0xad57('0xe'),_0x41d0ff,_0xad57('0xf'));logger[_0xad57('0x10')](_0xad57('0x11'),_0x41d0ff,'request\x20sent',JSON[_0xad57('0x12')](_0x1a903b));if(_0x1a903b[_0xad57('0x13')]){if(_0x1a903b[_0xad57('0x13')][_0xad57('0x14')]===0x1f4){logger[_0xad57('0x13')](_0xad57('0xe'),_0x41d0ff,_0x1a903b[_0xad57('0x13')][_0xad57('0x15')]);return _0x4f2f43(_0x1a903b[_0xad57('0x13')][_0xad57('0x15')]);}logger[_0xad57('0x13')](_0xad57('0xe'),_0x41d0ff,_0x1a903b['error'][_0xad57('0x15')]);return _0x231c0d(_0x1a903b[_0xad57('0x13')][_0xad57('0x15')]);}else{logger['info']('MailServerIn,\x20%s,\x20%s',_0x41d0ff,_0xad57('0xf'));_0x231c0d(_0x1a903b[_0xad57('0x16')][_0xad57('0x15')]);}})[_0xad57('0x17')](function(_0x586447){logger[_0xad57('0x13')](_0xad57('0xe'),_0x41d0ff,_0x586447);_0x4f2f43(_0x586447);});});}exports['GetMailServerIn']=function(_0x91512d){var _0x1828d2=this;return new Promise(function(_0x1e456b,_0x173aaa){return db[_0xad57('0x18')][_0xad57('0x19')]({'raw':_0x91512d[_0xad57('0x1a')]?_0x91512d[_0xad57('0x1a')][_0xad57('0x1b')]===undefined?!![]:![]:!![],'where':_0x91512d[_0xad57('0x1a')]?_0x91512d[_0xad57('0x1a')][_0xad57('0x1c')]||null:null,'attributes':_0x91512d[_0xad57('0x1a')]?_0x91512d[_0xad57('0x1a')][_0xad57('0x1d')]||null:null,'limit':_0x91512d[_0xad57('0x1a')]?_0x91512d['options'][_0xad57('0x1e')]||null:null,'include':_0x91512d[_0xad57('0x1a')]?_0x91512d[_0xad57('0x1a')][_0xad57('0x1f')]?_[_0xad57('0x20')](_0x91512d[_0xad57('0x1a')][_0xad57('0x1f')],function(_0xeeb037){return{'model':db[_0xeeb037[_0xad57('0x21')]],'as':_0xeeb037['as'],'attributes':_0xeeb037['attributes'],'include':_0xeeb037[_0xad57('0x1f')]?_[_0xad57('0x20')](_0xeeb037['include'],function(_0x466646){return{'model':db[_0x466646['model']],'as':_0x466646['as'],'attributes':_0x466646['attributes'],'include':_0x466646[_0xad57('0x1f')]?_[_0xad57('0x20')](_0x466646[_0xad57('0x1f')],function(_0x203db3){return{'model':db[_0x203db3[_0xad57('0x21')]],'as':_0x203db3['as'],'attributes':_0x203db3['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x3d0a53){logger[_0xad57('0xd')](_0xad57('0x22'),_0x91512d);logger['debug'](_0xad57('0x22'),_0x91512d,JSON[_0xad57('0x12')](_0x3d0a53));_0x1e456b(_0x3d0a53);})['catch'](function(_0x2e0ec1){logger[_0xad57('0x13')](_0xad57('0x22'),_0x2e0ec1[_0xad57('0x15')],_0x91512d);_0x173aaa(_0x1828d2[_0xad57('0x13')](0x1f4,_0x2e0ec1[_0xad57('0x15')]));});});};
\ No newline at end of file
+var _0xe80d=['code','error','message','result','catch','MailServerIn','findAll','options','raw','where','attributes','include','model','map','GetMailServerIn','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','then','info','MailServerIn,\x20%s,\x20%s','debug','request\x20sent','stringify'];(function(_0x5a6edd,_0x83b034){var _0xa2515=function(_0x45588a){while(--_0x45588a){_0x5a6edd['push'](_0x5a6edd['shift']());}};_0xa2515(++_0x83b034);}(_0xe80d,0x183));var _0xde80=function(_0x39479f,_0x822ae4){_0x39479f=_0x39479f-0x0;var _0x4a6d96=_0xe80d[_0x39479f];return _0x4a6d96;};'use strict';var _=require(_0xde80('0x0'));var util=require(_0xde80('0x1'));var moment=require(_0xde80('0x2'));var BPromise=require('bluebird');var rs=require(_0xde80('0x3'));var fs=require('fs');var Redis=require(_0xde80('0x4'));var db=require(_0xde80('0x5'))['db'];var utils=require(_0xde80('0x6'));var logger=require('../../config/logger')(_0xde80('0x7'));var config=require(_0xde80('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xde80('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5c5c46,_0x2a8dae,_0x464766){return new BPromise(function(_0x5f4f15,_0x311166){return client['request'](_0x5c5c46,_0x464766)[_0xde80('0xa')](function(_0x342c33){logger[_0xde80('0xb')](_0xde80('0xc'),_0x2a8dae,'request\x20sent');logger[_0xde80('0xd')]('MailServerIn,\x20%s,\x20%s,\x20%s',_0x2a8dae,_0xde80('0xe'),JSON[_0xde80('0xf')](_0x342c33));if(_0x342c33['error']){if(_0x342c33['error'][_0xde80('0x10')]===0x1f4){logger[_0xde80('0x11')](_0xde80('0xc'),_0x2a8dae,_0x342c33[_0xde80('0x11')][_0xde80('0x12')]);return _0x311166(_0x342c33[_0xde80('0x11')][_0xde80('0x12')]);}logger[_0xde80('0x11')]('MailServerIn,\x20%s,\x20%s',_0x2a8dae,_0x342c33[_0xde80('0x11')][_0xde80('0x12')]);return _0x5f4f15(_0x342c33['error'][_0xde80('0x12')]);}else{logger[_0xde80('0xb')](_0xde80('0xc'),_0x2a8dae,_0xde80('0xe'));_0x5f4f15(_0x342c33[_0xde80('0x13')]['message']);}})[_0xde80('0x14')](function(_0x45ea0b){logger['error'](_0xde80('0xc'),_0x2a8dae,_0x45ea0b);_0x311166(_0x45ea0b);});});}exports['GetMailServerIn']=function(_0x2fe639){var _0x2ba22b=this;return new Promise(function(_0x3b80d5,_0x4db7ff){return db[_0xde80('0x15')][_0xde80('0x16')]({'raw':_0x2fe639[_0xde80('0x17')]?_0x2fe639[_0xde80('0x17')][_0xde80('0x18')]===undefined?!![]:![]:!![],'where':_0x2fe639[_0xde80('0x17')]?_0x2fe639[_0xde80('0x17')][_0xde80('0x19')]||null:null,'attributes':_0x2fe639[_0xde80('0x17')]?_0x2fe639[_0xde80('0x17')][_0xde80('0x1a')]||null:null,'limit':_0x2fe639['options']?_0x2fe639[_0xde80('0x17')]['limit']||null:null,'include':_0x2fe639[_0xde80('0x17')]?_0x2fe639[_0xde80('0x17')][_0xde80('0x1b')]?_['map'](_0x2fe639['options'][_0xde80('0x1b')],function(_0xb64309){return{'model':db[_0xb64309[_0xde80('0x1c')]],'as':_0xb64309['as'],'attributes':_0xb64309[_0xde80('0x1a')],'include':_0xb64309[_0xde80('0x1b')]?_[_0xde80('0x1d')](_0xb64309[_0xde80('0x1b')],function(_0x35d159){return{'model':db[_0x35d159[_0xde80('0x1c')]],'as':_0x35d159['as'],'attributes':_0x35d159['attributes'],'include':_0x35d159[_0xde80('0x1b')]?_[_0xde80('0x1d')](_0x35d159[_0xde80('0x1b')],function(_0x50d067){return{'model':db[_0x50d067[_0xde80('0x1c')]],'as':_0x50d067['as'],'attributes':_0x50d067[_0xde80('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5317d){logger[_0xde80('0xb')](_0xde80('0x1e'),_0x2fe639);logger[_0xde80('0xd')](_0xde80('0x1e'),_0x2fe639,JSON[_0xde80('0xf')](_0x5317d));_0x3b80d5(_0x5317d);})['catch'](function(_0x55ecd8){logger['error'](_0xde80('0x1e'),_0x55ecd8[_0xde80('0x12')],_0x2fe639);_0x4db7ff(_0x2ba22b[_0xde80('0x11')](0x1f4,_0x55ecd8[_0xde80('0x12')]));});});};
\ No newline at end of file