Built motion from commit bfc7a72f7045b27461c9a5d1f71c1a658cfd0b8b. Version 3.0.0...
[motion-next.git] / server / api / trunk / trunk.rpc.js
index 1aa8bc4..3039328 100644 (file)
@@ -1 +1 @@
-const a645_0x2d05=['../../mysqldb','then','findAll','rpc','Trunk','message','where','attributes','error','stringify','findOne','model','GetTrunk','map','options','include','catch','debug','ShowTrunk','../../config/logger'];(function(_0x5e6126,_0x2d05cb){const _0x2d1505=function(_0x328a35){while(--_0x328a35){_0x5e6126['push'](_0x5e6126['shift']());}};_0x2d1505(++_0x2d05cb);}(a645_0x2d05,0x10d));const a645_0x2d15=function(_0x5e6126,_0x2d05cb){_0x5e6126=_0x5e6126-0x0;let _0x2d1505=a645_0x2d05[_0x5e6126];return _0x2d1505;};const _0x3bdf4a=a645_0x2d15;'use strict';const _=require('lodash'),db=require(_0x3bdf4a('0xb'))['db'],logger=require(_0x3bdf4a('0xa'))(_0x3bdf4a('0xe'));exports[_0x3bdf4a('0x3')]=function(_0x328a35){const _0x2ecf83=this;return new Promise(function(_0x4e7d61,_0x29ded9){const _0x4cacd2=a645_0x2d15;return db[_0x4cacd2('0xf')][_0x4cacd2('0xd')]({'raw':_0x328a35[_0x4cacd2('0x5')]?_0x328a35[_0x4cacd2('0x5')]['raw']===undefined?!![]:![]:!![],'where':_0x328a35[_0x4cacd2('0x5')]?_0x328a35[_0x4cacd2('0x5')][_0x4cacd2('0x11')]||null:null,'attributes':_0x328a35[_0x4cacd2('0x5')]?_0x328a35[_0x4cacd2('0x5')]['attributes']||null:null,'limit':_0x328a35[_0x4cacd2('0x5')]?_0x328a35['options']['limit']||null:null,'include':_0x328a35[_0x4cacd2('0x5')]?_0x328a35[_0x4cacd2('0x5')][_0x4cacd2('0x6')]?_[_0x4cacd2('0x4')](_0x328a35[_0x4cacd2('0x5')][_0x4cacd2('0x6')],function(_0x5479df){const _0x2ba6dc=_0x4cacd2;return{'model':db[_0x5479df[_0x2ba6dc('0x2')]],'as':_0x5479df['as'],'attributes':_0x5479df[_0x2ba6dc('0x12')],'include':_0x5479df[_0x2ba6dc('0x6')]?_['map'](_0x5479df[_0x2ba6dc('0x6')],function(_0x29073c){const _0x4cdb68=_0x2ba6dc;return{'model':db[_0x29073c[_0x4cdb68('0x2')]],'as':_0x29073c['as'],'attributes':_0x29073c[_0x4cdb68('0x12')],'include':_0x29073c[_0x4cdb68('0x6')]?_[_0x4cdb68('0x4')](_0x29073c[_0x4cdb68('0x6')],function(_0x183234){const _0x4b4076=_0x4cdb68;return{'model':db[_0x183234[_0x4b4076('0x2')]],'as':_0x183234['as'],'attributes':_0x183234[_0x4b4076('0x12')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x424001){const _0xf81252=_0x4cacd2;logger['info'](_0xf81252('0x3'),_0x328a35),logger[_0xf81252('0x8')]('GetTrunk',_0x328a35,JSON[_0xf81252('0x0')](_0x424001)),_0x4e7d61(_0x424001);})[_0x4cacd2('0x7')](function(_0x5656c7){const _0x2cfe72=_0x4cacd2;logger[_0x2cfe72('0x13')]('GetTrunk',_0x5656c7[_0x2cfe72('0x10')],_0x328a35),_0x29ded9(_0x2ecf83[_0x2cfe72('0x13')](0x1f4,_0x5656c7['message']));});});},exports[_0x3bdf4a('0x9')]=function(_0x5d95c5){const _0x59da1c=this;return new Promise(function(_0x99fd72,_0x5cb1ba){const _0xf1d04a=a645_0x2d15;return db[_0xf1d04a('0xf')][_0xf1d04a('0x1')]({'raw':_0x5d95c5[_0xf1d04a('0x5')]?_0x5d95c5[_0xf1d04a('0x5')]['raw']===undefined?!![]:![]:!![],'where':_0x5d95c5[_0xf1d04a('0x5')]?_0x5d95c5['options'][_0xf1d04a('0x11')]||null:null,'attributes':_0x5d95c5['options']?_0x5d95c5[_0xf1d04a('0x5')][_0xf1d04a('0x12')]||null:null,'include':_0x5d95c5['options']?_0x5d95c5[_0xf1d04a('0x5')][_0xf1d04a('0x6')]?_['map'](_0x5d95c5[_0xf1d04a('0x5')][_0xf1d04a('0x6')],function(_0x1a7e4b){const _0x7e7196=_0xf1d04a;return{'model':db[_0x1a7e4b[_0x7e7196('0x2')]],'as':_0x1a7e4b['as'],'attributes':_0x1a7e4b[_0x7e7196('0x12')],'include':_0x1a7e4b['include']?_[_0x7e7196('0x4')](_0x1a7e4b[_0x7e7196('0x6')],function(_0x5ca36b){const _0x4eb03b=_0x7e7196;return{'model':db[_0x5ca36b[_0x4eb03b('0x2')]],'as':_0x5ca36b['as'],'attributes':_0x5ca36b[_0x4eb03b('0x12')],'include':_0x5ca36b['include']?_[_0x4eb03b('0x4')](_0x5ca36b[_0x4eb03b('0x6')],function(_0x34f7b3){const _0x5bfdec=_0x4eb03b;return{'model':db[_0x34f7b3[_0x5bfdec('0x2')]],'as':_0x34f7b3['as'],'attributes':_0x34f7b3[_0x5bfdec('0x12')]};}):[]};}):[]};}):[]:[]})[_0xf1d04a('0xc')](function(_0x132997){const _0x5427ea=_0xf1d04a;logger['info'](_0x5427ea('0x9'),_0x5d95c5),logger['debug'](_0x5427ea('0x9'),_0x5d95c5,JSON[_0x5427ea('0x0')](_0x132997)),_0x99fd72(_0x132997);})['catch'](function(_0x44f5be){const _0x16f08d=_0xf1d04a;logger['error']('ShowTrunk',_0x44f5be[_0x16f08d('0x10')],_0x5d95c5),_0x5cb1ba(_0x59da1c[_0x16f08d('0x13')](0x1f4,_0x44f5be[_0x16f08d('0x10')]));});});};
\ No newline at end of file
+const a645_0x5b48=['error','ShowTrunk','limit','debug','then','info','findOne','model','options','findAll','raw','catch','include','message','lodash','attributes','where','rpc','Trunk','map','GetTrunk'];(function(_0x17981f,_0x5b480b){const _0x4e85a1=function(_0x40224f){while(--_0x40224f){_0x17981f['push'](_0x17981f['shift']());}};_0x4e85a1(++_0x5b480b);}(a645_0x5b48,0x1b0));const a645_0x4e85=function(_0x17981f,_0x5b480b){_0x17981f=_0x17981f-0x0;let _0x4e85a1=a645_0x5b48[_0x17981f];return _0x4e85a1;};const _0x300af4=a645_0x4e85;'use strict';const _=require(_0x300af4('0x2')),db=require('../../mysqldb')['db'],logger=require('../../config/logger')(_0x300af4('0x5'));exports['GetTrunk']=function(_0x40224f){const _0x50649b=this;return new Promise(function(_0x5c0ab6,_0x27ea3d){const _0x1ca69d=a645_0x4e85;return db[_0x1ca69d('0x6')][_0x1ca69d('0x12')]({'raw':_0x40224f[_0x1ca69d('0x11')]?_0x40224f[_0x1ca69d('0x11')][_0x1ca69d('0x13')]===undefined?!![]:![]:!![],'where':_0x40224f[_0x1ca69d('0x11')]?_0x40224f[_0x1ca69d('0x11')][_0x1ca69d('0x4')]||null:null,'attributes':_0x40224f[_0x1ca69d('0x11')]?_0x40224f[_0x1ca69d('0x11')][_0x1ca69d('0x3')]||null:null,'limit':_0x40224f[_0x1ca69d('0x11')]?_0x40224f[_0x1ca69d('0x11')][_0x1ca69d('0xb')]||null:null,'include':_0x40224f[_0x1ca69d('0x11')]?_0x40224f[_0x1ca69d('0x11')]['include']?_[_0x1ca69d('0x7')](_0x40224f[_0x1ca69d('0x11')][_0x1ca69d('0x0')],function(_0x562b85){const _0x3ebd33=_0x1ca69d;return{'model':db[_0x562b85[_0x3ebd33('0x10')]],'as':_0x562b85['as'],'attributes':_0x562b85['attributes'],'include':_0x562b85['include']?_[_0x3ebd33('0x7')](_0x562b85[_0x3ebd33('0x0')],function(_0x2de2eb){const _0x455643=_0x3ebd33;return{'model':db[_0x2de2eb[_0x455643('0x10')]],'as':_0x2de2eb['as'],'attributes':_0x2de2eb[_0x455643('0x3')],'include':_0x2de2eb['include']?_['map'](_0x2de2eb[_0x455643('0x0')],function(_0x23e482){const _0x5dae22=_0x455643;return{'model':db[_0x23e482[_0x5dae22('0x10')]],'as':_0x23e482['as'],'attributes':_0x23e482[_0x5dae22('0x3')]};}):[]};}):[]};}):[]:[]})[_0x1ca69d('0xd')](function(_0x402242){const _0xa439a9=_0x1ca69d;logger[_0xa439a9('0xe')]('GetTrunk',_0x40224f),logger[_0xa439a9('0xc')](_0xa439a9('0x8'),_0x40224f,JSON['stringify'](_0x402242)),_0x5c0ab6(_0x402242);})[_0x1ca69d('0x14')](function(_0x5f560f){const _0x303492=_0x1ca69d;logger[_0x303492('0x9')](_0x303492('0x8'),_0x5f560f['message'],_0x40224f),_0x27ea3d(_0x50649b['error'](0x1f4,_0x5f560f[_0x303492('0x1')]));});});},exports[_0x300af4('0xa')]=function(_0x269741){const _0x12cd95=this;return new Promise(function(_0x25d94f,_0x490bcc){const _0x371398=a645_0x4e85;return db[_0x371398('0x6')][_0x371398('0xf')]({'raw':_0x269741[_0x371398('0x11')]?_0x269741[_0x371398('0x11')][_0x371398('0x13')]===undefined?!![]:![]:!![],'where':_0x269741['options']?_0x269741['options'][_0x371398('0x4')]||null:null,'attributes':_0x269741[_0x371398('0x11')]?_0x269741[_0x371398('0x11')][_0x371398('0x3')]||null:null,'include':_0x269741[_0x371398('0x11')]?_0x269741['options'][_0x371398('0x0')]?_[_0x371398('0x7')](_0x269741[_0x371398('0x11')][_0x371398('0x0')],function(_0x540ca0){const _0x55bf85=_0x371398;return{'model':db[_0x540ca0[_0x55bf85('0x10')]],'as':_0x540ca0['as'],'attributes':_0x540ca0[_0x55bf85('0x3')],'include':_0x540ca0['include']?_[_0x55bf85('0x7')](_0x540ca0[_0x55bf85('0x0')],function(_0x5d34a8){const _0xf2595b=_0x55bf85;return{'model':db[_0x5d34a8['model']],'as':_0x5d34a8['as'],'attributes':_0x5d34a8[_0xf2595b('0x3')],'include':_0x5d34a8['include']?_[_0xf2595b('0x7')](_0x5d34a8[_0xf2595b('0x0')],function(_0x22da3b){const _0x2fbede=_0xf2595b;return{'model':db[_0x22da3b[_0x2fbede('0x10')]],'as':_0x22da3b['as'],'attributes':_0x22da3b[_0x2fbede('0x3')]};}):[]};}):[]};}):[]:[]})[_0x371398('0xd')](function(_0x54137e){const _0xac4cb6=_0x371398;logger[_0xac4cb6('0xe')](_0xac4cb6('0xa'),_0x269741),logger['debug'](_0xac4cb6('0xa'),_0x269741,JSON['stringify'](_0x54137e)),_0x25d94f(_0x54137e);})['catch'](function(_0xaa5e3e){const _0x1631eb=_0x371398;logger['error'](_0x1631eb('0xa'),_0xaa5e3e[_0x1631eb('0x1')],_0x269741),_0x490bcc(_0x12cd95[_0x1631eb('0x9')](0x1f4,_0xaa5e3e['message']));});});};
\ No newline at end of file