Built motion from commit 47436d59.|2.6.7
[motion2.git] / server / api / intDynamics365Account / intDynamics365Account.rpc.js
index 88458e4..2e3aa4c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1883=['GetDynamics365Account','Dynamics365Account','findAll','options','raw','attributes','limit','include','map','model','then','info','find','where','ShowDynamics365Account','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','Dynamics365Account,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch'];(function(_0x31a8c5,_0x19a9b8){var _0x140c5b=function(_0x216411){while(--_0x216411){_0x31a8c5['push'](_0x31a8c5['shift']());}};_0x140c5b(++_0x19a9b8);}(_0x1883,0xab));var _0x3188=function(_0x5148ad,_0x20c2b1){_0x5148ad=_0x5148ad-0x0;var _0x40114a=_0x1883[_0x5148ad];return _0x40114a;};'use strict';var _=require(_0x3188('0x0'));var util=require(_0x3188('0x1'));var moment=require(_0x3188('0x2'));var BPromise=require(_0x3188('0x3'));var rs=require(_0x3188('0x4'));var fs=require('fs');var Redis=require(_0x3188('0x5'));var db=require(_0x3188('0x6'))['db'];var utils=require(_0x3188('0x7'));var logger=require(_0x3188('0x8'))(_0x3188('0x9'));var config=require(_0x3188('0xa'));var jayson=require(_0x3188('0xb'));var client=jayson[_0x3188('0xc')][_0x3188('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x24f2f1,_0x3ce7fd,_0x3e3afb){return new BPromise(function(_0x5c8f26,_0x446ab7){return client[_0x3188('0xe')](_0x24f2f1,_0x3e3afb)['then'](function(_0x2213b5){logger['info'](_0x3188('0xf'),_0x3ce7fd,_0x3188('0x10'));logger[_0x3188('0x11')](_0x3188('0x12'),_0x3ce7fd,'request\x20sent',JSON[_0x3188('0x13')](_0x2213b5));if(_0x2213b5[_0x3188('0x14')]){if(_0x2213b5['error']['code']===0x1f4){logger[_0x3188('0x14')](_0x3188('0xf'),_0x3ce7fd,_0x2213b5[_0x3188('0x14')][_0x3188('0x15')]);return _0x446ab7(_0x2213b5[_0x3188('0x14')][_0x3188('0x15')]);}logger['error'](_0x3188('0xf'),_0x3ce7fd,_0x2213b5['error']['message']);return _0x5c8f26(_0x2213b5[_0x3188('0x14')]['message']);}else{logger['info'](_0x3188('0xf'),_0x3ce7fd,_0x3188('0x10'));_0x5c8f26(_0x2213b5[_0x3188('0x16')][_0x3188('0x15')]);}})[_0x3188('0x17')](function(_0x259321){logger['error'](_0x3188('0xf'),_0x3ce7fd,_0x259321);_0x446ab7(_0x259321);});});}exports[_0x3188('0x18')]=function(_0x3f5b35){var _0x37e646=this;return new Promise(function(_0x18a71a,_0x4f27b0){return db[_0x3188('0x19')][_0x3188('0x1a')]({'raw':_0x3f5b35['options']?_0x3f5b35[_0x3188('0x1b')][_0x3188('0x1c')]===undefined?!![]:![]:!![],'where':_0x3f5b35['options']?_0x3f5b35['options']['where']||null:null,'attributes':_0x3f5b35[_0x3188('0x1b')]?_0x3f5b35[_0x3188('0x1b')][_0x3188('0x1d')]||null:null,'limit':_0x3f5b35['options']?_0x3f5b35['options'][_0x3188('0x1e')]||null:null,'include':_0x3f5b35[_0x3188('0x1b')]?_0x3f5b35[_0x3188('0x1b')][_0x3188('0x1f')]?_[_0x3188('0x20')](_0x3f5b35['options'][_0x3188('0x1f')],function(_0x33f882){return{'model':db[_0x33f882['model']],'as':_0x33f882['as'],'attributes':_0x33f882[_0x3188('0x1d')],'include':_0x33f882['include']?_['map'](_0x33f882[_0x3188('0x1f')],function(_0x129bd7){return{'model':db[_0x129bd7[_0x3188('0x21')]],'as':_0x129bd7['as'],'attributes':_0x129bd7[_0x3188('0x1d')],'include':_0x129bd7[_0x3188('0x1f')]?_[_0x3188('0x20')](_0x129bd7[_0x3188('0x1f')],function(_0x11021c){return{'model':db[_0x11021c['model']],'as':_0x11021c['as'],'attributes':_0x11021c[_0x3188('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x3188('0x22')](function(_0x52bb13){logger[_0x3188('0x23')](_0x3188('0x18'),_0x3f5b35);logger[_0x3188('0x11')](_0x3188('0x18'),_0x3f5b35,JSON[_0x3188('0x13')](_0x52bb13));_0x18a71a(_0x52bb13);})[_0x3188('0x17')](function(_0x8f810f){logger[_0x3188('0x14')]('GetDynamics365Account',_0x8f810f[_0x3188('0x15')],_0x3f5b35);_0x4f27b0(_0x37e646['error'](0x1f4,_0x8f810f[_0x3188('0x15')]));});});};exports['ShowDynamics365Account']=function(_0x3f82ce){var _0x80f9a8=this;return new Promise(function(_0x3be4f7,_0xacdad7){return db[_0x3188('0x19')][_0x3188('0x24')]({'raw':_0x3f82ce[_0x3188('0x1b')]?_0x3f82ce[_0x3188('0x1b')][_0x3188('0x1c')]===undefined?!![]:![]:!![],'where':_0x3f82ce[_0x3188('0x1b')]?_0x3f82ce[_0x3188('0x1b')][_0x3188('0x25')]||null:null,'attributes':_0x3f82ce[_0x3188('0x1b')]?_0x3f82ce[_0x3188('0x1b')][_0x3188('0x1d')]||null:null,'include':_0x3f82ce[_0x3188('0x1b')]?_0x3f82ce[_0x3188('0x1b')][_0x3188('0x1f')]?_['map'](_0x3f82ce[_0x3188('0x1b')]['include'],function(_0x1c945e){return{'model':db[_0x1c945e[_0x3188('0x21')]],'as':_0x1c945e['as'],'attributes':_0x1c945e['attributes'],'include':_0x1c945e[_0x3188('0x1f')]?_[_0x3188('0x20')](_0x1c945e[_0x3188('0x1f')],function(_0x6d503d){return{'model':db[_0x6d503d[_0x3188('0x21')]],'as':_0x6d503d['as'],'attributes':_0x6d503d[_0x3188('0x1d')],'include':_0x6d503d[_0x3188('0x1f')]?_['map'](_0x6d503d['include'],function(_0xa876c8){return{'model':db[_0xa876c8[_0x3188('0x21')]],'as':_0xa876c8['as'],'attributes':_0xa876c8[_0x3188('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x3188('0x22')](function(_0x4a64a4){logger[_0x3188('0x23')](_0x3188('0x26'),_0x3f82ce);logger[_0x3188('0x11')](_0x3188('0x26'),_0x3f82ce,JSON['stringify'](_0x4a64a4));_0x3be4f7(_0x4a64a4);})[_0x3188('0x17')](function(_0x4a290f){logger[_0x3188('0x14')]('ShowDynamics365Account',_0x4a290f[_0x3188('0x15')],_0x3f82ce);_0xacdad7(_0x80f9a8[_0x3188('0x14')](0x1f4,_0x4a290f[_0x3188('0x15')]));});});};
\ No newline at end of file
+var _0x5ea0=['catch','GetDynamics365Account','Dynamics365Account','findAll','options','raw','where','limit','include','map','model','attributes','stringify','ShowDynamics365Account','find','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','debug','error','Dynamics365Account,\x20%s,\x20%s','message','request\x20sent'];(function(_0x362f27,_0x3c30f0){var _0x2e2615=function(_0x41879d){while(--_0x41879d){_0x362f27['push'](_0x362f27['shift']());}};_0x2e2615(++_0x3c30f0);}(_0x5ea0,0x14a));var _0x05ea=function(_0x946b40,_0x5ab681){_0x946b40=_0x946b40-0x0;var _0x101219=_0x5ea0[_0x946b40];return _0x101219;};'use strict';var _=require(_0x05ea('0x0'));var util=require(_0x05ea('0x1'));var moment=require(_0x05ea('0x2'));var BPromise=require(_0x05ea('0x3'));var rs=require(_0x05ea('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x05ea('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x05ea('0x6'))(_0x05ea('0x7'));var config=require(_0x05ea('0x8'));var jayson=require(_0x05ea('0x9'));var client=jayson[_0x05ea('0xa')][_0x05ea('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3c7b29,_0x5affdb,_0x4b07ff){return new BPromise(function(_0xda00b8,_0x5b59a3){return client[_0x05ea('0xc')](_0x3c7b29,_0x4b07ff)[_0x05ea('0xd')](function(_0x421648){logger[_0x05ea('0xe')]('Dynamics365Account,\x20%s,\x20%s',_0x5affdb,'request\x20sent');logger[_0x05ea('0xf')]('Dynamics365Account,\x20%s,\x20%s,\x20%s',_0x5affdb,'request\x20sent',JSON['stringify'](_0x421648));if(_0x421648['error']){if(_0x421648['error']['code']===0x1f4){logger[_0x05ea('0x10')](_0x05ea('0x11'),_0x5affdb,_0x421648[_0x05ea('0x10')][_0x05ea('0x12')]);return _0x5b59a3(_0x421648[_0x05ea('0x10')][_0x05ea('0x12')]);}logger[_0x05ea('0x10')](_0x05ea('0x11'),_0x5affdb,_0x421648['error']['message']);return _0xda00b8(_0x421648[_0x05ea('0x10')][_0x05ea('0x12')]);}else{logger[_0x05ea('0xe')](_0x05ea('0x11'),_0x5affdb,_0x05ea('0x13'));_0xda00b8(_0x421648['result'][_0x05ea('0x12')]);}})[_0x05ea('0x14')](function(_0x3149c3){logger[_0x05ea('0x10')]('Dynamics365Account,\x20%s,\x20%s',_0x5affdb,_0x3149c3);_0x5b59a3(_0x3149c3);});});}exports[_0x05ea('0x15')]=function(_0x3f81a6){var _0x16ffbf=this;return new Promise(function(_0x503cc1,_0x34a7de){return db[_0x05ea('0x16')][_0x05ea('0x17')]({'raw':_0x3f81a6['options']?_0x3f81a6[_0x05ea('0x18')][_0x05ea('0x19')]===undefined?!![]:![]:!![],'where':_0x3f81a6[_0x05ea('0x18')]?_0x3f81a6['options'][_0x05ea('0x1a')]||null:null,'attributes':_0x3f81a6[_0x05ea('0x18')]?_0x3f81a6[_0x05ea('0x18')]['attributes']||null:null,'limit':_0x3f81a6[_0x05ea('0x18')]?_0x3f81a6[_0x05ea('0x18')][_0x05ea('0x1b')]||null:null,'include':_0x3f81a6[_0x05ea('0x18')]?_0x3f81a6[_0x05ea('0x18')][_0x05ea('0x1c')]?_[_0x05ea('0x1d')](_0x3f81a6[_0x05ea('0x18')][_0x05ea('0x1c')],function(_0x440d65){return{'model':db[_0x440d65[_0x05ea('0x1e')]],'as':_0x440d65['as'],'attributes':_0x440d65[_0x05ea('0x1f')],'include':_0x440d65[_0x05ea('0x1c')]?_['map'](_0x440d65[_0x05ea('0x1c')],function(_0x1b4321){return{'model':db[_0x1b4321['model']],'as':_0x1b4321['as'],'attributes':_0x1b4321[_0x05ea('0x1f')],'include':_0x1b4321[_0x05ea('0x1c')]?_['map'](_0x1b4321['include'],function(_0x3e5305){return{'model':db[_0x3e5305[_0x05ea('0x1e')]],'as':_0x3e5305['as'],'attributes':_0x3e5305[_0x05ea('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x234d38){logger[_0x05ea('0xe')](_0x05ea('0x15'),_0x3f81a6);logger[_0x05ea('0xf')](_0x05ea('0x15'),_0x3f81a6,JSON[_0x05ea('0x20')](_0x234d38));_0x503cc1(_0x234d38);})[_0x05ea('0x14')](function(_0x3975f7){logger[_0x05ea('0x10')](_0x05ea('0x15'),_0x3975f7[_0x05ea('0x12')],_0x3f81a6);_0x34a7de(_0x16ffbf[_0x05ea('0x10')](0x1f4,_0x3975f7['message']));});});};exports[_0x05ea('0x21')]=function(_0x5acdd3){var _0x45cae7=this;return new Promise(function(_0x23901e,_0x4ee87f){return db[_0x05ea('0x16')][_0x05ea('0x22')]({'raw':_0x5acdd3[_0x05ea('0x18')]?_0x5acdd3['options'][_0x05ea('0x19')]===undefined?!![]:![]:!![],'where':_0x5acdd3[_0x05ea('0x18')]?_0x5acdd3['options'][_0x05ea('0x1a')]||null:null,'attributes':_0x5acdd3[_0x05ea('0x18')]?_0x5acdd3[_0x05ea('0x18')][_0x05ea('0x1f')]||null:null,'include':_0x5acdd3[_0x05ea('0x18')]?_0x5acdd3[_0x05ea('0x18')][_0x05ea('0x1c')]?_[_0x05ea('0x1d')](_0x5acdd3[_0x05ea('0x18')][_0x05ea('0x1c')],function(_0x24397e){return{'model':db[_0x24397e['model']],'as':_0x24397e['as'],'attributes':_0x24397e[_0x05ea('0x1f')],'include':_0x24397e[_0x05ea('0x1c')]?_[_0x05ea('0x1d')](_0x24397e[_0x05ea('0x1c')],function(_0x4dc7e4){return{'model':db[_0x4dc7e4[_0x05ea('0x1e')]],'as':_0x4dc7e4['as'],'attributes':_0x4dc7e4[_0x05ea('0x1f')],'include':_0x4dc7e4[_0x05ea('0x1c')]?_[_0x05ea('0x1d')](_0x4dc7e4['include'],function(_0x24a3df){return{'model':db[_0x24a3df[_0x05ea('0x1e')]],'as':_0x24a3df['as'],'attributes':_0x24a3df[_0x05ea('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x05ea('0xd')](function(_0x3aff6e){logger[_0x05ea('0xe')](_0x05ea('0x21'),_0x5acdd3);logger['debug']('ShowDynamics365Account',_0x5acdd3,JSON['stringify'](_0x3aff6e));_0x23901e(_0x3aff6e);})[_0x05ea('0x14')](function(_0x5d311f){logger[_0x05ea('0x10')](_0x05ea('0x21'),_0x5d311f[_0x05ea('0x12')],_0x5acdd3);_0x4ee87f(_0x45cae7[_0x05ea('0x10')](0x1f4,_0x5d311f[_0x05ea('0x12')]));});});};
\ No newline at end of file