0b0663fa65f7f6c93afe1d9af9b298c876eefa41
[motion-next.git] / server / api / squareOdbc / squareOdbc.rpc.js
1 const a595_0x35c9=['../../config/logger','where','info','ShowSquareOdbc','error','message','debug','lodash','../../mysqldb','catch','map','include','model','findOne','options','attributes'];(function(_0x344d02,_0x35c9de){const _0x33a3c3=function(_0x2983e8){while(--_0x2983e8){_0x344d02['push'](_0x344d02['shift']());}};_0x33a3c3(++_0x35c9de);}(a595_0x35c9,0xeb));const a595_0x33a3=function(_0x344d02,_0x35c9de){_0x344d02=_0x344d02-0x0;let _0x33a3c3=a595_0x35c9[_0x344d02];return _0x33a3c3;};const _0x27889e=a595_0x33a3;'use strict';const db=require(_0x27889e('0xd'))['db'],logger=require(_0x27889e('0x5'))('rpc'),_=require(_0x27889e('0xc'));exports['ShowSquareOdbc']=function(_0x2983e8){const _0x1ad6fe=this;return new Promise(function(_0x3d1ff9,_0x420a99){const _0x4f5e4f=a595_0x33a3;return db['SquareOdbc'][_0x4f5e4f('0x2')]({'raw':_0x2983e8['options']?_0x2983e8['options']['raw']===undefined?!![]:![]:!![],'where':_0x2983e8[_0x4f5e4f('0x3')]?_0x2983e8[_0x4f5e4f('0x3')][_0x4f5e4f('0x6')]||null:null,'attributes':_0x2983e8['options']?_0x2983e8[_0x4f5e4f('0x3')]['attributes']||null:null,'include':_0x2983e8[_0x4f5e4f('0x3')]?_0x2983e8[_0x4f5e4f('0x3')][_0x4f5e4f('0x0')]?_[_0x4f5e4f('0xf')](_0x2983e8[_0x4f5e4f('0x3')][_0x4f5e4f('0x0')],function(_0x12c7f6){const _0x3fe8cc=_0x4f5e4f;return{'model':db[_0x12c7f6['model']],'as':_0x12c7f6['as'],'attributes':_0x12c7f6[_0x3fe8cc('0x4')],'include':_0x12c7f6[_0x3fe8cc('0x0')]?_[_0x3fe8cc('0xf')](_0x12c7f6[_0x3fe8cc('0x0')],function(_0x59cba0){const _0x1514c0=_0x3fe8cc;return{'model':db[_0x59cba0[_0x1514c0('0x1')]],'as':_0x59cba0['as'],'attributes':_0x59cba0['attributes'],'include':_0x59cba0[_0x1514c0('0x0')]?_[_0x1514c0('0xf')](_0x59cba0[_0x1514c0('0x0')],function(_0x494783){const _0x21adff=_0x1514c0;return{'model':db[_0x494783[_0x21adff('0x1')]],'as':_0x494783['as'],'attributes':_0x494783[_0x21adff('0x4')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x434c1b){const _0x554395=_0x4f5e4f;logger[_0x554395('0x7')](_0x554395('0x8'),_0x2983e8),logger[_0x554395('0xb')](_0x554395('0x8'),_0x2983e8,JSON['stringify'](_0x434c1b)),_0x3d1ff9(_0x434c1b);})[_0x4f5e4f('0xe')](function(_0x4d0a67){const _0x2d8991=_0x4f5e4f;logger[_0x2d8991('0x9')]('ShowSquareOdbc',_0x4d0a67[_0x2d8991('0xa')],_0x2983e8),_0x420a99(_0x1ad6fe['error'](0x1f4,_0x4d0a67['message']));});});};