Built motion from commit b517aaa2a6638133380e4d135c64a80893061362. Version 3.0.0...
[motion-next.git] / server / api / intDynamics365Account / intDynamics365Account.rpc.js
1 const a244_0x188f=['ShowDynamics365Account','message','info','GetDynamics365Account','debug','findOne','findAll','rpc','../../mysqldb','model','Dynamics365Account','where','limit','error','options','attributes','include','map','then','stringify','raw','../../config/logger'];(function(_0x11d679,_0x188ffa){const _0x3d70cb=function(_0x485889){while(--_0x485889){_0x11d679['push'](_0x11d679['shift']());}};_0x3d70cb(++_0x188ffa);}(a244_0x188f,0xd7));const a244_0x3d70=function(_0x11d679,_0x188ffa){_0x11d679=_0x11d679-0x0;let _0x3d70cb=a244_0x188f[_0x11d679];return _0x3d70cb;};const _0x44d26d=a244_0x3d70;'use strict';const _=require('lodash'),db=require(_0x44d26d('0xd'))['db'],logger=require(_0x44d26d('0x4'))(_0x44d26d('0xc'));exports['GetDynamics365Account']=function(_0x485889){const _0x4ba574=this;return new Promise(function(_0x5c6a2d,_0x5f1d24){const _0x29d5f0=a244_0x3d70;return db[_0x29d5f0('0xf')][_0x29d5f0('0xb')]({'raw':_0x485889[_0x29d5f0('0x13')]?_0x485889[_0x29d5f0('0x13')][_0x29d5f0('0x3')]===undefined?!![]:![]:!![],'where':_0x485889[_0x29d5f0('0x13')]?_0x485889[_0x29d5f0('0x13')][_0x29d5f0('0x10')]||null:null,'attributes':_0x485889[_0x29d5f0('0x13')]?_0x485889[_0x29d5f0('0x13')][_0x29d5f0('0x14')]||null:null,'limit':_0x485889[_0x29d5f0('0x13')]?_0x485889[_0x29d5f0('0x13')][_0x29d5f0('0x11')]||null:null,'include':_0x485889[_0x29d5f0('0x13')]?_0x485889[_0x29d5f0('0x13')][_0x29d5f0('0x15')]?_['map'](_0x485889[_0x29d5f0('0x13')][_0x29d5f0('0x15')],function(_0x175567){const _0x2abad1=_0x29d5f0;return{'model':db[_0x175567[_0x2abad1('0xe')]],'as':_0x175567['as'],'attributes':_0x175567[_0x2abad1('0x14')],'include':_0x175567['include']?_[_0x2abad1('0x0')](_0x175567['include'],function(_0x3c413b){const _0x59f787=_0x2abad1;return{'model':db[_0x3c413b[_0x59f787('0xe')]],'as':_0x3c413b['as'],'attributes':_0x3c413b[_0x59f787('0x14')],'include':_0x3c413b[_0x59f787('0x15')]?_[_0x59f787('0x0')](_0x3c413b[_0x59f787('0x15')],function(_0x5aee1a){const _0x44f8c0=_0x59f787;return{'model':db[_0x5aee1a[_0x44f8c0('0xe')]],'as':_0x5aee1a['as'],'attributes':_0x5aee1a[_0x44f8c0('0x14')]};}):[]};}):[]};}):[]:[]})[_0x29d5f0('0x1')](function(_0xca4cc9){const _0x3f2ad0=_0x29d5f0;logger[_0x3f2ad0('0x7')](_0x3f2ad0('0x8'),_0x485889),logger[_0x3f2ad0('0x9')](_0x3f2ad0('0x8'),_0x485889,JSON[_0x3f2ad0('0x2')](_0xca4cc9)),_0x5c6a2d(_0xca4cc9);})['catch'](function(_0x3396f2){const _0x5a9450=_0x29d5f0;logger[_0x5a9450('0x12')](_0x5a9450('0x8'),_0x3396f2[_0x5a9450('0x6')],_0x485889),_0x5f1d24(_0x4ba574[_0x5a9450('0x12')](0x1f4,_0x3396f2[_0x5a9450('0x6')]));});});},exports[_0x44d26d('0x5')]=function(_0x2c8859){const _0x7bcc03=this;return new Promise(function(_0x771460,_0x1c1c8a){const _0x2e3eca=a244_0x3d70;return db[_0x2e3eca('0xf')][_0x2e3eca('0xa')]({'raw':_0x2c8859[_0x2e3eca('0x13')]?_0x2c8859[_0x2e3eca('0x13')][_0x2e3eca('0x3')]===undefined?!![]:![]:!![],'where':_0x2c8859[_0x2e3eca('0x13')]?_0x2c8859[_0x2e3eca('0x13')][_0x2e3eca('0x10')]||null:null,'attributes':_0x2c8859[_0x2e3eca('0x13')]?_0x2c8859[_0x2e3eca('0x13')][_0x2e3eca('0x14')]||null:null,'include':_0x2c8859['options']?_0x2c8859['options'][_0x2e3eca('0x15')]?_[_0x2e3eca('0x0')](_0x2c8859[_0x2e3eca('0x13')][_0x2e3eca('0x15')],function(_0x32a969){const _0x3cb81c=_0x2e3eca;return{'model':db[_0x32a969[_0x3cb81c('0xe')]],'as':_0x32a969['as'],'attributes':_0x32a969[_0x3cb81c('0x14')],'include':_0x32a969[_0x3cb81c('0x15')]?_[_0x3cb81c('0x0')](_0x32a969[_0x3cb81c('0x15')],function(_0x3f9fda){const _0x3be380=_0x3cb81c;return{'model':db[_0x3f9fda[_0x3be380('0xe')]],'as':_0x3f9fda['as'],'attributes':_0x3f9fda[_0x3be380('0x14')],'include':_0x3f9fda['include']?_[_0x3be380('0x0')](_0x3f9fda[_0x3be380('0x15')],function(_0x1f99c9){const _0x29b2a3=_0x3be380;return{'model':db[_0x1f99c9[_0x29b2a3('0xe')]],'as':_0x1f99c9['as'],'attributes':_0x1f99c9['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x13b956){const _0x143bbc=_0x2e3eca;logger['info']('ShowDynamics365Account',_0x2c8859),logger['debug'](_0x143bbc('0x5'),_0x2c8859,JSON[_0x143bbc('0x2')](_0x13b956)),_0x771460(_0x13b956);})['catch'](function(_0x823ccb){const _0x323a95=_0x2e3eca;logger[_0x323a95('0x12')](_0x323a95('0x5'),_0x823ccb[_0x323a95('0x6')],_0x2c8859),_0x1c1c8a(_0x7bcc03['error'](0x1f4,_0x823ccb[_0x323a95('0x6')]));});});};