Built motion from commit fade34fd.|2.5.41
[motion2.git] / server / api / intDynamics365Account / intDynamics365Account.rpc.js
index a821d38..c29cab9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5383=['raw','ShowDynamics365Account','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','Dynamics365Account,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','info','catch','GetDynamics365Account','Dynamics365Account','findAll','options','where','limit','include','map','model','attributes','find'];(function(_0x16b1a5,_0x318267){var _0x475e25=function(_0x2e3bf6){while(--_0x2e3bf6){_0x16b1a5['push'](_0x16b1a5['shift']());}};_0x475e25(++_0x318267);}(_0x5383,0xf0));var _0x3538=function(_0x4f7768,_0x453214){_0x4f7768=_0x4f7768-0x0;var _0x28a1f6=_0x5383[_0x4f7768];return _0x28a1f6;};'use strict';var _=require(_0x3538('0x0'));var util=require('util');var moment=require(_0x3538('0x1'));var BPromise=require('bluebird');var rs=require(_0x3538('0x2'));var fs=require('fs');var Redis=require(_0x3538('0x3'));var db=require(_0x3538('0x4'))['db'];var utils=require(_0x3538('0x5'));var logger=require(_0x3538('0x6'))(_0x3538('0x7'));var config=require('../../config/environment');var jayson=require(_0x3538('0x8'));var client=jayson[_0x3538('0x9')][_0x3538('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2e64eb,_0x388299,_0x487ca3){return new BPromise(function(_0x5965bd,_0x3ace07){return client[_0x3538('0xb')](_0x2e64eb,_0x487ca3)[_0x3538('0xc')](function(_0x5b1347){logger['info'](_0x3538('0xd'),_0x388299,_0x3538('0xe'));logger[_0x3538('0xf')]('Dynamics365Account,\x20%s,\x20%s,\x20%s',_0x388299,_0x3538('0xe'),JSON[_0x3538('0x10')](_0x5b1347));if(_0x5b1347[_0x3538('0x11')]){if(_0x5b1347['error']['code']===0x1f4){logger[_0x3538('0x11')](_0x3538('0xd'),_0x388299,_0x5b1347[_0x3538('0x11')][_0x3538('0x12')]);return _0x3ace07(_0x5b1347[_0x3538('0x11')][_0x3538('0x12')]);}logger[_0x3538('0x11')](_0x3538('0xd'),_0x388299,_0x5b1347['error']['message']);return _0x5965bd(_0x5b1347[_0x3538('0x11')][_0x3538('0x12')]);}else{logger[_0x3538('0x13')](_0x3538('0xd'),_0x388299,_0x3538('0xe'));_0x5965bd(_0x5b1347['result'][_0x3538('0x12')]);}})[_0x3538('0x14')](function(_0x4616f7){logger['error'](_0x3538('0xd'),_0x388299,_0x4616f7);_0x3ace07(_0x4616f7);});});}exports[_0x3538('0x15')]=function(_0x33edfc){var _0xe6415=this;return new Promise(function(_0x2d7524,_0x56340e){return db[_0x3538('0x16')][_0x3538('0x17')]({'raw':_0x33edfc[_0x3538('0x18')]?_0x33edfc[_0x3538('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x33edfc[_0x3538('0x18')]?_0x33edfc['options'][_0x3538('0x19')]||null:null,'attributes':_0x33edfc[_0x3538('0x18')]?_0x33edfc[_0x3538('0x18')]['attributes']||null:null,'limit':_0x33edfc['options']?_0x33edfc[_0x3538('0x18')][_0x3538('0x1a')]||null:null,'include':_0x33edfc[_0x3538('0x18')]?_0x33edfc['options'][_0x3538('0x1b')]?_[_0x3538('0x1c')](_0x33edfc[_0x3538('0x18')][_0x3538('0x1b')],function(_0x1f7f30){return{'model':db[_0x1f7f30[_0x3538('0x1d')]],'as':_0x1f7f30['as'],'attributes':_0x1f7f30[_0x3538('0x1e')],'include':_0x1f7f30[_0x3538('0x1b')]?_[_0x3538('0x1c')](_0x1f7f30[_0x3538('0x1b')],function(_0x305a82){return{'model':db[_0x305a82[_0x3538('0x1d')]],'as':_0x305a82['as'],'attributes':_0x305a82[_0x3538('0x1e')],'include':_0x305a82['include']?_[_0x3538('0x1c')](_0x305a82[_0x3538('0x1b')],function(_0xdc7d0a){return{'model':db[_0xdc7d0a['model']],'as':_0xdc7d0a['as'],'attributes':_0xdc7d0a[_0x3538('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x3538('0xc')](function(_0x43291a){logger['info'](_0x3538('0x15'),_0x33edfc);logger[_0x3538('0xf')](_0x3538('0x15'),_0x33edfc,JSON[_0x3538('0x10')](_0x43291a));_0x2d7524(_0x43291a);})['catch'](function(_0x5c9b83){logger['error'](_0x3538('0x15'),_0x5c9b83['message'],_0x33edfc);_0x56340e(_0xe6415['error'](0x1f4,_0x5c9b83[_0x3538('0x12')]));});});};exports['ShowDynamics365Account']=function(_0x1e010d){var _0x3ca9a6=this;return new Promise(function(_0x2cfa8c,_0x4e7697){return db[_0x3538('0x16')][_0x3538('0x1f')]({'raw':_0x1e010d['options']?_0x1e010d['options'][_0x3538('0x20')]===undefined?!![]:![]:!![],'where':_0x1e010d[_0x3538('0x18')]?_0x1e010d[_0x3538('0x18')][_0x3538('0x19')]||null:null,'attributes':_0x1e010d[_0x3538('0x18')]?_0x1e010d[_0x3538('0x18')][_0x3538('0x1e')]||null:null,'include':_0x1e010d[_0x3538('0x18')]?_0x1e010d[_0x3538('0x18')][_0x3538('0x1b')]?_[_0x3538('0x1c')](_0x1e010d[_0x3538('0x18')][_0x3538('0x1b')],function(_0x338e46){return{'model':db[_0x338e46['model']],'as':_0x338e46['as'],'attributes':_0x338e46[_0x3538('0x1e')],'include':_0x338e46['include']?_['map'](_0x338e46[_0x3538('0x1b')],function(_0x3e2086){return{'model':db[_0x3e2086[_0x3538('0x1d')]],'as':_0x3e2086['as'],'attributes':_0x3e2086['attributes'],'include':_0x3e2086[_0x3538('0x1b')]?_[_0x3538('0x1c')](_0x3e2086[_0x3538('0x1b')],function(_0x138bfd){return{'model':db[_0x138bfd[_0x3538('0x1d')]],'as':_0x138bfd['as'],'attributes':_0x138bfd['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x1777b7){logger[_0x3538('0x13')]('ShowDynamics365Account',_0x1e010d);logger[_0x3538('0xf')](_0x3538('0x21'),_0x1e010d,JSON[_0x3538('0x10')](_0x1777b7));_0x2cfa8c(_0x1777b7);})['catch'](function(_0x23ceca){logger['error'](_0x3538('0x21'),_0x23ceca[_0x3538('0x12')],_0x1e010d);_0x4e7697(_0x3ca9a6['error'](0x1f4,_0x23ceca[_0x3538('0x12')]));});});};
\ No newline at end of file
+var _0x9679=['Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','GetDynamics365Account','Dynamics365Account','options','raw','attributes','include','model','map','catch','ShowDynamics365Account','where','debug','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent'];(function(_0x34d346,_0x4c6502){var _0x122d76=function(_0x22a5fd){while(--_0x22a5fd){_0x34d346['push'](_0x34d346['shift']());}};_0x122d76(++_0x4c6502);}(_0x9679,0xb7));var _0x9967=function(_0x556334,_0x43d3e2){_0x556334=_0x556334-0x0;var _0x1e202a=_0x9679[_0x556334];return _0x1e202a;};'use strict';var _=require(_0x9967('0x0'));var util=require('util');var moment=require(_0x9967('0x1'));var BPromise=require('bluebird');var rs=require(_0x9967('0x2'));var fs=require('fs');var Redis=require(_0x9967('0x3'));var db=require(_0x9967('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x9967('0x5'))(_0x9967('0x6'));var config=require(_0x9967('0x7'));var jayson=require(_0x9967('0x8'));var client=jayson[_0x9967('0x9')][_0x9967('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1d5970,_0x31a532,_0x3bf6da){return new BPromise(function(_0x5c081c,_0x3c623a){return client['request'](_0x1d5970,_0x3bf6da)[_0x9967('0xb')](function(_0x56c93c){logger[_0x9967('0xc')](_0x9967('0xd'),_0x31a532,_0x9967('0xe'));logger['debug'](_0x9967('0xf'),_0x31a532,_0x9967('0xe'),JSON[_0x9967('0x10')](_0x56c93c));if(_0x56c93c[_0x9967('0x11')]){if(_0x56c93c['error'][_0x9967('0x12')]===0x1f4){logger[_0x9967('0x11')](_0x9967('0xd'),_0x31a532,_0x56c93c[_0x9967('0x11')][_0x9967('0x13')]);return _0x3c623a(_0x56c93c[_0x9967('0x11')][_0x9967('0x13')]);}logger[_0x9967('0x11')](_0x9967('0xd'),_0x31a532,_0x56c93c[_0x9967('0x11')]['message']);return _0x5c081c(_0x56c93c[_0x9967('0x11')][_0x9967('0x13')]);}else{logger[_0x9967('0xc')]('Dynamics365Account,\x20%s,\x20%s',_0x31a532,_0x9967('0xe'));_0x5c081c(_0x56c93c[_0x9967('0x14')][_0x9967('0x13')]);}})['catch'](function(_0x13e18b){logger[_0x9967('0x11')](_0x9967('0xd'),_0x31a532,_0x13e18b);_0x3c623a(_0x13e18b);});});}exports[_0x9967('0x15')]=function(_0x5bc15c){var _0x157205=this;return new Promise(function(_0x3c1c99,_0xb307de){return db[_0x9967('0x16')]['findAll']({'raw':_0x5bc15c[_0x9967('0x17')]?_0x5bc15c[_0x9967('0x17')][_0x9967('0x18')]===undefined?!![]:![]:!![],'where':_0x5bc15c[_0x9967('0x17')]?_0x5bc15c[_0x9967('0x17')]['where']||null:null,'attributes':_0x5bc15c[_0x9967('0x17')]?_0x5bc15c[_0x9967('0x17')][_0x9967('0x19')]||null:null,'limit':_0x5bc15c['options']?_0x5bc15c[_0x9967('0x17')]['limit']||null:null,'include':_0x5bc15c[_0x9967('0x17')]?_0x5bc15c[_0x9967('0x17')][_0x9967('0x1a')]?_['map'](_0x5bc15c[_0x9967('0x17')]['include'],function(_0x134e31){return{'model':db[_0x134e31[_0x9967('0x1b')]],'as':_0x134e31['as'],'attributes':_0x134e31['attributes'],'include':_0x134e31[_0x9967('0x1a')]?_['map'](_0x134e31[_0x9967('0x1a')],function(_0x36aed1){return{'model':db[_0x36aed1[_0x9967('0x1b')]],'as':_0x36aed1['as'],'attributes':_0x36aed1[_0x9967('0x19')],'include':_0x36aed1[_0x9967('0x1a')]?_[_0x9967('0x1c')](_0x36aed1[_0x9967('0x1a')],function(_0x387cfe){return{'model':db[_0x387cfe[_0x9967('0x1b')]],'as':_0x387cfe['as'],'attributes':_0x387cfe[_0x9967('0x19')]};}):[]};}):[]};}):[]:[]})[_0x9967('0xb')](function(_0x17ff0d){logger[_0x9967('0xc')](_0x9967('0x15'),_0x5bc15c);logger['debug'](_0x9967('0x15'),_0x5bc15c,JSON['stringify'](_0x17ff0d));_0x3c1c99(_0x17ff0d);})[_0x9967('0x1d')](function(_0x5053b0){logger[_0x9967('0x11')](_0x9967('0x15'),_0x5053b0[_0x9967('0x13')],_0x5bc15c);_0xb307de(_0x157205['error'](0x1f4,_0x5053b0[_0x9967('0x13')]));});});};exports[_0x9967('0x1e')]=function(_0x22cbbb){var _0x5abb19=this;return new Promise(function(_0x3f08a3,_0x290e92){return db[_0x9967('0x16')]['find']({'raw':_0x22cbbb[_0x9967('0x17')]?_0x22cbbb[_0x9967('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x22cbbb[_0x9967('0x17')]?_0x22cbbb[_0x9967('0x17')][_0x9967('0x1f')]||null:null,'attributes':_0x22cbbb[_0x9967('0x17')]?_0x22cbbb[_0x9967('0x17')]['attributes']||null:null,'include':_0x22cbbb[_0x9967('0x17')]?_0x22cbbb[_0x9967('0x17')][_0x9967('0x1a')]?_[_0x9967('0x1c')](_0x22cbbb[_0x9967('0x17')][_0x9967('0x1a')],function(_0x485549){return{'model':db[_0x485549['model']],'as':_0x485549['as'],'attributes':_0x485549[_0x9967('0x19')],'include':_0x485549[_0x9967('0x1a')]?_[_0x9967('0x1c')](_0x485549[_0x9967('0x1a')],function(_0x319922){return{'model':db[_0x319922[_0x9967('0x1b')]],'as':_0x319922['as'],'attributes':_0x319922[_0x9967('0x19')],'include':_0x319922[_0x9967('0x1a')]?_[_0x9967('0x1c')](_0x319922[_0x9967('0x1a')],function(_0x4b593d){return{'model':db[_0x4b593d[_0x9967('0x1b')]],'as':_0x4b593d['as'],'attributes':_0x4b593d[_0x9967('0x19')]};}):[]};}):[]};}):[]:[]})[_0x9967('0xb')](function(_0x4d513b){logger[_0x9967('0xc')](_0x9967('0x1e'),_0x22cbbb);logger[_0x9967('0x20')](_0x9967('0x1e'),_0x22cbbb,JSON['stringify'](_0x4d513b));_0x3f08a3(_0x4d513b);})[_0x9967('0x1d')](function(_0x5eebe4){logger['error']('ShowDynamics365Account',_0x5eebe4[_0x9967('0x13')],_0x22cbbb);_0x290e92(_0x5abb19[_0x9967('0x11')](0x1f4,_0x5eebe4['message']));});});};
\ No newline at end of file