Built motion from commit 00bf23f6.|2.6.16
[motion2.git] / server / api / intDynamics365Account / intDynamics365Account.rpc.js
index 96a9231..543e4e6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7184=['info','Dynamics365Account,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','Dynamics365Account,\x20%s,\x20%s','message','Dynamics365Account','findAll','options','raw','where','limit','include','map','model','attributes','GetDynamics365Account','debug','catch','ShowDynamics365Account','find','then','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','request'];(function(_0x4f84c3,_0x6d094d){var _0x460f9f=function(_0x5af5bd){while(--_0x5af5bd){_0x4f84c3['push'](_0x4f84c3['shift']());}};_0x460f9f(++_0x6d094d);}(_0x7184,0xa4));var _0x4718=function(_0x552204,_0x222864){_0x552204=_0x552204-0x0;var _0x24988d=_0x7184[_0x552204];return _0x24988d;};'use strict';var _=require(_0x4718('0x0'));var util=require(_0x4718('0x1'));var moment=require(_0x4718('0x2'));var BPromise=require(_0x4718('0x3'));var rs=require(_0x4718('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4718('0x5'))['db'];var utils=require(_0x4718('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x4718('0x7'));var jayson=require(_0x4718('0x8'));var client=jayson[_0x4718('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5d5675,_0x1d91a2,_0x59ce24){return new BPromise(function(_0x4a5a5b,_0x2de8ff){return client[_0x4718('0xa')](_0x5d5675,_0x59ce24)['then'](function(_0x160417){logger[_0x4718('0xb')]('Dynamics365Account,\x20%s,\x20%s',_0x1d91a2,'request\x20sent');logger['debug'](_0x4718('0xc'),_0x1d91a2,_0x4718('0xd'),JSON[_0x4718('0xe')](_0x160417));if(_0x160417[_0x4718('0xf')]){if(_0x160417['error'][_0x4718('0x10')]===0x1f4){logger['error'](_0x4718('0x11'),_0x1d91a2,_0x160417[_0x4718('0xf')][_0x4718('0x12')]);return _0x2de8ff(_0x160417[_0x4718('0xf')]['message']);}logger[_0x4718('0xf')]('Dynamics365Account,\x20%s,\x20%s',_0x1d91a2,_0x160417[_0x4718('0xf')][_0x4718('0x12')]);return _0x4a5a5b(_0x160417[_0x4718('0xf')]['message']);}else{logger[_0x4718('0xb')](_0x4718('0x11'),_0x1d91a2,_0x4718('0xd'));_0x4a5a5b(_0x160417['result'][_0x4718('0x12')]);}})['catch'](function(_0x48514c){logger['error'](_0x4718('0x11'),_0x1d91a2,_0x48514c);_0x2de8ff(_0x48514c);});});}exports['GetDynamics365Account']=function(_0x382c00){var _0x134f69=this;return new Promise(function(_0x18c76d,_0x452f23){return db[_0x4718('0x13')][_0x4718('0x14')]({'raw':_0x382c00[_0x4718('0x15')]?_0x382c00['options'][_0x4718('0x16')]===undefined?!![]:![]:!![],'where':_0x382c00[_0x4718('0x15')]?_0x382c00[_0x4718('0x15')][_0x4718('0x17')]||null:null,'attributes':_0x382c00[_0x4718('0x15')]?_0x382c00[_0x4718('0x15')]['attributes']||null:null,'limit':_0x382c00[_0x4718('0x15')]?_0x382c00[_0x4718('0x15')][_0x4718('0x18')]||null:null,'include':_0x382c00[_0x4718('0x15')]?_0x382c00[_0x4718('0x15')][_0x4718('0x19')]?_[_0x4718('0x1a')](_0x382c00[_0x4718('0x15')][_0x4718('0x19')],function(_0x32e535){return{'model':db[_0x32e535[_0x4718('0x1b')]],'as':_0x32e535['as'],'attributes':_0x32e535[_0x4718('0x1c')],'include':_0x32e535[_0x4718('0x19')]?_[_0x4718('0x1a')](_0x32e535[_0x4718('0x19')],function(_0x1709ef){return{'model':db[_0x1709ef[_0x4718('0x1b')]],'as':_0x1709ef['as'],'attributes':_0x1709ef[_0x4718('0x1c')],'include':_0x1709ef[_0x4718('0x19')]?_[_0x4718('0x1a')](_0x1709ef[_0x4718('0x19')],function(_0x2fdb89){return{'model':db[_0x2fdb89['model']],'as':_0x2fdb89['as'],'attributes':_0x2fdb89[_0x4718('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5cd29d){logger[_0x4718('0xb')](_0x4718('0x1d'),_0x382c00);logger[_0x4718('0x1e')](_0x4718('0x1d'),_0x382c00,JSON[_0x4718('0xe')](_0x5cd29d));_0x18c76d(_0x5cd29d);})[_0x4718('0x1f')](function(_0x1ca360){logger[_0x4718('0xf')]('GetDynamics365Account',_0x1ca360[_0x4718('0x12')],_0x382c00);_0x452f23(_0x134f69[_0x4718('0xf')](0x1f4,_0x1ca360[_0x4718('0x12')]));});});};exports[_0x4718('0x20')]=function(_0x1cec52){var _0x73461c=this;return new Promise(function(_0x4c6007,_0x586fd9){return db[_0x4718('0x13')][_0x4718('0x21')]({'raw':_0x1cec52[_0x4718('0x15')]?_0x1cec52[_0x4718('0x15')][_0x4718('0x16')]===undefined?!![]:![]:!![],'where':_0x1cec52[_0x4718('0x15')]?_0x1cec52[_0x4718('0x15')][_0x4718('0x17')]||null:null,'attributes':_0x1cec52[_0x4718('0x15')]?_0x1cec52[_0x4718('0x15')]['attributes']||null:null,'include':_0x1cec52['options']?_0x1cec52['options'][_0x4718('0x19')]?_['map'](_0x1cec52[_0x4718('0x15')][_0x4718('0x19')],function(_0x4d7ca8){return{'model':db[_0x4d7ca8[_0x4718('0x1b')]],'as':_0x4d7ca8['as'],'attributes':_0x4d7ca8['attributes'],'include':_0x4d7ca8[_0x4718('0x19')]?_[_0x4718('0x1a')](_0x4d7ca8[_0x4718('0x19')],function(_0x4817ca){return{'model':db[_0x4817ca[_0x4718('0x1b')]],'as':_0x4817ca['as'],'attributes':_0x4817ca[_0x4718('0x1c')],'include':_0x4817ca[_0x4718('0x19')]?_[_0x4718('0x1a')](_0x4817ca[_0x4718('0x19')],function(_0x528aee){return{'model':db[_0x528aee[_0x4718('0x1b')]],'as':_0x528aee['as'],'attributes':_0x528aee[_0x4718('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x4718('0x22')](function(_0x5e516b){logger[_0x4718('0xb')](_0x4718('0x20'),_0x1cec52);logger[_0x4718('0x1e')](_0x4718('0x20'),_0x1cec52,JSON[_0x4718('0xe')](_0x5e516b));_0x4c6007(_0x5e516b);})['catch'](function(_0x22e3f5){logger['error'](_0x4718('0x20'),_0x22e3f5['message'],_0x1cec52);_0x586fd9(_0x73461c[_0x4718('0xf')](0x1f4,_0x22e3f5['message']));});});};
\ No newline at end of file
+var _0xfde3=['catch','find','lodash','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','code','error','Dynamics365Account,\x20%s,\x20%s','message','result','Dynamics365Account','findAll','options','raw','where','attributes','limit','include','map','model','GetDynamics365Account'];(function(_0x2b789f,_0x344732){var _0x4e12eb=function(_0x559a32){while(--_0x559a32){_0x2b789f['push'](_0x2b789f['shift']());}};_0x4e12eb(++_0x344732);}(_0xfde3,0xf7));var _0x3fde=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0xfde3[_0x126558];return _0x1f6d14;};'use strict';var _=require(_0x3fde('0x0'));var util=require('util');var moment=require(_0x3fde('0x1'));var BPromise=require('bluebird');var rs=require(_0x3fde('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3fde('0x3'))['db'];var utils=require(_0x3fde('0x4'));var logger=require(_0x3fde('0x5'))('rpc');var config=require(_0x3fde('0x6'));var jayson=require(_0x3fde('0x7'));var client=jayson[_0x3fde('0x8')][_0x3fde('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x208584,_0x4df9ec,_0x10b09a){return new BPromise(function(_0x1bd4e3,_0x208483){return client[_0x3fde('0xa')](_0x208584,_0x10b09a)[_0x3fde('0xb')](function(_0x30512f){logger[_0x3fde('0xc')]('Dynamics365Account,\x20%s,\x20%s',_0x4df9ec,_0x3fde('0xd'));logger[_0x3fde('0xe')](_0x3fde('0xf'),_0x4df9ec,'request\x20sent',JSON[_0x3fde('0x10')](_0x30512f));if(_0x30512f['error']){if(_0x30512f['error'][_0x3fde('0x11')]===0x1f4){logger[_0x3fde('0x12')](_0x3fde('0x13'),_0x4df9ec,_0x30512f[_0x3fde('0x12')]['message']);return _0x208483(_0x30512f['error'][_0x3fde('0x14')]);}logger[_0x3fde('0x12')](_0x3fde('0x13'),_0x4df9ec,_0x30512f[_0x3fde('0x12')][_0x3fde('0x14')]);return _0x1bd4e3(_0x30512f['error']['message']);}else{logger[_0x3fde('0xc')](_0x3fde('0x13'),_0x4df9ec,_0x3fde('0xd'));_0x1bd4e3(_0x30512f[_0x3fde('0x15')][_0x3fde('0x14')]);}})['catch'](function(_0x316010){logger['error'](_0x3fde('0x13'),_0x4df9ec,_0x316010);_0x208483(_0x316010);});});}exports['GetDynamics365Account']=function(_0x3b5cb1){var _0x376b67=this;return new Promise(function(_0x1dc973,_0x25378e){return db[_0x3fde('0x16')][_0x3fde('0x17')]({'raw':_0x3b5cb1['options']?_0x3b5cb1[_0x3fde('0x18')][_0x3fde('0x19')]===undefined?!![]:![]:!![],'where':_0x3b5cb1[_0x3fde('0x18')]?_0x3b5cb1['options'][_0x3fde('0x1a')]||null:null,'attributes':_0x3b5cb1[_0x3fde('0x18')]?_0x3b5cb1[_0x3fde('0x18')][_0x3fde('0x1b')]||null:null,'limit':_0x3b5cb1[_0x3fde('0x18')]?_0x3b5cb1[_0x3fde('0x18')][_0x3fde('0x1c')]||null:null,'include':_0x3b5cb1[_0x3fde('0x18')]?_0x3b5cb1[_0x3fde('0x18')][_0x3fde('0x1d')]?_[_0x3fde('0x1e')](_0x3b5cb1[_0x3fde('0x18')][_0x3fde('0x1d')],function(_0x397a25){return{'model':db[_0x397a25[_0x3fde('0x1f')]],'as':_0x397a25['as'],'attributes':_0x397a25[_0x3fde('0x1b')],'include':_0x397a25[_0x3fde('0x1d')]?_[_0x3fde('0x1e')](_0x397a25['include'],function(_0x228689){return{'model':db[_0x228689[_0x3fde('0x1f')]],'as':_0x228689['as'],'attributes':_0x228689['attributes'],'include':_0x228689[_0x3fde('0x1d')]?_[_0x3fde('0x1e')](_0x228689['include'],function(_0x62b755){return{'model':db[_0x62b755[_0x3fde('0x1f')]],'as':_0x62b755['as'],'attributes':_0x62b755[_0x3fde('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x3fde('0xb')](function(_0x40475a){logger['info'](_0x3fde('0x20'),_0x3b5cb1);logger[_0x3fde('0xe')](_0x3fde('0x20'),_0x3b5cb1,JSON[_0x3fde('0x10')](_0x40475a));_0x1dc973(_0x40475a);})[_0x3fde('0x21')](function(_0x11caec){logger['error'](_0x3fde('0x20'),_0x11caec[_0x3fde('0x14')],_0x3b5cb1);_0x25378e(_0x376b67[_0x3fde('0x12')](0x1f4,_0x11caec[_0x3fde('0x14')]));});});};exports['ShowDynamics365Account']=function(_0x2362e3){var _0x4842a8=this;return new Promise(function(_0x11781c,_0x441102){return db[_0x3fde('0x16')][_0x3fde('0x22')]({'raw':_0x2362e3[_0x3fde('0x18')]?_0x2362e3[_0x3fde('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x2362e3[_0x3fde('0x18')]?_0x2362e3[_0x3fde('0x18')]['where']||null:null,'attributes':_0x2362e3[_0x3fde('0x18')]?_0x2362e3[_0x3fde('0x18')][_0x3fde('0x1b')]||null:null,'include':_0x2362e3[_0x3fde('0x18')]?_0x2362e3[_0x3fde('0x18')][_0x3fde('0x1d')]?_[_0x3fde('0x1e')](_0x2362e3['options']['include'],function(_0x41b03d){return{'model':db[_0x41b03d['model']],'as':_0x41b03d['as'],'attributes':_0x41b03d[_0x3fde('0x1b')],'include':_0x41b03d[_0x3fde('0x1d')]?_[_0x3fde('0x1e')](_0x41b03d[_0x3fde('0x1d')],function(_0x36cc8f){return{'model':db[_0x36cc8f[_0x3fde('0x1f')]],'as':_0x36cc8f['as'],'attributes':_0x36cc8f['attributes'],'include':_0x36cc8f[_0x3fde('0x1d')]?_['map'](_0x36cc8f['include'],function(_0x27d886){return{'model':db[_0x27d886['model']],'as':_0x27d886['as'],'attributes':_0x27d886[_0x3fde('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x3fde('0xb')](function(_0x30da77){logger[_0x3fde('0xc')]('ShowDynamics365Account',_0x2362e3);logger[_0x3fde('0xe')]('ShowDynamics365Account',_0x2362e3,JSON[_0x3fde('0x10')](_0x30da77));_0x11781c(_0x30da77);})[_0x3fde('0x21')](function(_0x35a57b){logger['error']('ShowDynamics365Account',_0x35a57b[_0x3fde('0x14')],_0x2362e3);_0x441102(_0x4842a8[_0x3fde('0x12')](0x1f4,_0x35a57b[_0x3fde('0x14')]));});});};
\ No newline at end of file