Built motion from commit 5fcd269f5146f10cf3129722d518881dfac64576. Version 3.0.0...
[motion-next.git] / server / api / squareOdbc / squareOdbc.rpc.js
1 const a595_0x49e5=['info','model','debug','where','map','findOne','message','rpc','error','options','ShowSquareOdbc','catch','stringify','include','then','../../mysqldb','attributes'];(function(_0x329883,_0x49e532){const _0x123a5e=function(_0x20daa9){while(--_0x20daa9){_0x329883['push'](_0x329883['shift']());}};_0x123a5e(++_0x49e532);}(a595_0x49e5,0x184));const a595_0x123a=function(_0x329883,_0x49e532){_0x329883=_0x329883-0x0;let _0x123a5e=a595_0x49e5[_0x329883];return _0x123a5e;};const _0x39b181=a595_0x123a;'use strict';const db=require(_0x39b181('0x1'))['db'],logger=require('../../config/logger')(_0x39b181('0xa')),_=require('lodash');exports[_0x39b181('0xd')]=function(_0x20daa9){const _0x5e422c=this;return new Promise(function(_0x595838,_0x4f23ee){const _0x4b40db=a595_0x123a;return db['SquareOdbc'][_0x4b40db('0x8')]({'raw':_0x20daa9[_0x4b40db('0xc')]?_0x20daa9[_0x4b40db('0xc')]['raw']===undefined?!![]:![]:!![],'where':_0x20daa9[_0x4b40db('0xc')]?_0x20daa9[_0x4b40db('0xc')][_0x4b40db('0x6')]||null:null,'attributes':_0x20daa9['options']?_0x20daa9[_0x4b40db('0xc')]['attributes']||null:null,'include':_0x20daa9[_0x4b40db('0xc')]?_0x20daa9[_0x4b40db('0xc')][_0x4b40db('0x10')]?_[_0x4b40db('0x7')](_0x20daa9[_0x4b40db('0xc')][_0x4b40db('0x10')],function(_0x2ba1a3){const _0x31d177=_0x4b40db;return{'model':db[_0x2ba1a3[_0x31d177('0x4')]],'as':_0x2ba1a3['as'],'attributes':_0x2ba1a3[_0x31d177('0x2')],'include':_0x2ba1a3['include']?_[_0x31d177('0x7')](_0x2ba1a3['include'],function(_0x3785fc){const _0x6954d3=_0x31d177;return{'model':db[_0x3785fc[_0x6954d3('0x4')]],'as':_0x3785fc['as'],'attributes':_0x3785fc[_0x6954d3('0x2')],'include':_0x3785fc['include']?_[_0x6954d3('0x7')](_0x3785fc[_0x6954d3('0x10')],function(_0x5f48be){const _0x3b3576=_0x6954d3;return{'model':db[_0x5f48be['model']],'as':_0x5f48be['as'],'attributes':_0x5f48be[_0x3b3576('0x2')]};}):[]};}):[]};}):[]:[]})[_0x4b40db('0x0')](function(_0xfcca87){const _0x5d7b87=_0x4b40db;logger[_0x5d7b87('0x3')]('ShowSquareOdbc',_0x20daa9),logger[_0x5d7b87('0x5')]('ShowSquareOdbc',_0x20daa9,JSON[_0x5d7b87('0xf')](_0xfcca87)),_0x595838(_0xfcca87);})[_0x4b40db('0xe')](function(_0x43a5e5){const _0x3e1a7f=_0x4b40db;logger[_0x3e1a7f('0xb')](_0x3e1a7f('0xd'),_0x43a5e5[_0x3e1a7f('0x9')],_0x20daa9),_0x4f23ee(_0x5e422c['error'](0x1f4,_0x43a5e5['message']));});});};