anncic-apihelper 1.0.7 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configuration.js +1 -1
- package/dist/helper.js +1 -1
- package/dist/index.js +1 -1
- package/dist/service/ApicreateService.js +1 -1
- package/dist/templateFun/Action.d.ts +2 -1
- package/dist/templateFun/Action.js +1 -1
- package/dist/templateFun/Common.d.ts +6 -0
- package/dist/templateFun/Common.js +1 -0
- package/dist/templateFun/Entify.js +1 -1
- package/dist/templateFun/Entities.d.ts +3 -1
- package/dist/templateFun/Entities.js +1 -1
- package/dist/templateFun/Event.d.ts +3 -1
- package/dist/templateFun/Event.js +1 -1
- package/dist/templateFun/Handler.js +1 -1
- package/dist/templateFun/Index.js +1 -1
- package/dist/templateFun/Search.d.ts +2 -1
- package/dist/templateFun/Search.js +1 -1
- package/dist/templateFun/Validator.d.ts +4 -1
- package/dist/templateFun/Validator.js +1 -1
- package/dist/types/index.js +1 -1
- package/package.json +3 -3
package/dist/configuration.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x3236a6=a0_0x79ff;(function(_0xbe8c5d,_0x47ef12){var _0x548463=a0_0x79ff,_0x2192c1=_0xbe8c5d();while(!![]){try{var _0x39a462=parseInt(_0x548463(0x168))/0x1*(-parseInt(_0x548463(0x15a))/0x2)+parseInt(_0x548463(0x155))/0x3*(parseInt(_0x548463(0x164))/0x4)+parseInt(_0x548463(0x163))/0x5*(parseInt(_0x548463(0x15c))/0x6)+-parseInt(_0x548463(0x157))/0x7+-parseInt(_0x548463(0x165))/0x8*(parseInt(_0x548463(0x160))/0x9)+parseInt(_0x548463(0x16d))/0xa+-parseInt(_0x548463(0x16f))/0xb*(parseInt(_0x548463(0x16c))/0xc);if(_0x39a462===_0x47ef12)break;else _0x2192c1['push'](_0x2192c1['shift']());}catch(_0x524801){_0x2192c1['push'](_0x2192c1['shift']());}}}(a0_0xe83f,0x5b168));var __decorate=this&&this['__decorate']||function(_0x470f07,_0xa2818,_0x3f2fe3,_0x58d3c5){var _0x20be2c=a0_0x79ff,_0x15bf92=arguments[_0x20be2c(0x162)],_0x5efe9d=_0x15bf92<0x3?_0xa2818:_0x58d3c5===null?_0x58d3c5=Object[_0x20be2c(0x167)](_0xa2818,_0x3f2fe3):_0x58d3c5,_0x2efb15;if(typeof Reflect===_0x20be2c(0x15b)&&typeof Reflect['decorate']===_0x20be2c(0x171))_0x5efe9d=Reflect[_0x20be2c(0x16a)](_0x470f07,_0xa2818,_0x3f2fe3,_0x58d3c5);else{for(var _0x30215f=_0x470f07[_0x20be2c(0x162)]-0x1;_0x30215f>=0x0;_0x30215f--)if(_0x2efb15=_0x470f07[_0x30215f])_0x5efe9d=(_0x15bf92<0x3?_0x2efb15(_0x5efe9d):_0x15bf92>0x3?_0x2efb15(_0xa2818,_0x3f2fe3,_0x5efe9d):_0x2efb15(_0xa2818,_0x3f2fe3))||_0x5efe9d;}return _0x15bf92>0x3&&_0x5efe9d&&Object[_0x20be2c(0x153)](_0xa2818,_0x3f2fe3,_0x5efe9d),_0x5efe9d;},__metadata=this&&this['__metadata']||function(_0x1e7756,_0x1e0606){var _0x53f235=a0_0x79ff;if(typeof Reflect===_0x53f235(0x15b)&&typeof Reflect[_0x53f235(0x154)]===_0x53f235(0x171))return Reflect[_0x53f235(0x154)](_0x1e7756,_0x1e0606);};function a0_0x79ff(_0x527ef0,_0x1ceb8f){var _0xe83f79=a0_0xe83f();return a0_0x79ff=function(_0x79ff52,_0x350589){_0x79ff52=_0x79ff52-0x153;var _0x46eec2=_0xe83f79[_0x79ff52];return _0x46eec2;},a0_0x79ff(_0x527ef0,_0x1ceb8f);}function a0_0xe83f(){var _0x5e6e0d=['92298kdgmGp','MidwayDecoratorService','@midwayjs/decorator','@anncic-api/typeorm','2674197XGACOw','@midwayjs/core','length','70jdvFim','1660gDlpeM','8atMfeb','Inject','getOwnPropertyDescriptor','1471VxxrXq','anncic-apihelper','decorate','prototype','2748jQgcGF','542190cOBgpi','application','11121onXdeE','design:type','function','decorator','CustomConfiguration','defineProperty','metadata','4932TILzZO','MidwayConfigService','144711BpDnLu','MidwayApplicationManager','Configuration','40yLtdWT','object'];a0_0xe83f=function(){return _0x5e6e0d;};return a0_0xe83f();}Object[a0_0x3236a6(0x153)](exports,'__esModule',{'value':!![]}),exports[a0_0x3236a6(0x173)]=void 0x0;const decorator_1=require(a0_0x3236a6(0x15e)),core_1=require(a0_0x3236a6(0x161)),typeorm=require(a0_0x3236a6(0x15f));let CustomConfiguration=class CustomConfiguration{};__decorate([(0x0,decorator_1[a0_0x3236a6(0x166)])(),__metadata('design:type',core_1[a0_0x3236a6(0x156)])],CustomConfiguration[a0_0x3236a6(0x16b)],'config',void 0x0),__decorate([(0x0,decorator_1[a0_0x3236a6(0x166)])(),__metadata(a0_0x3236a6(0x170),core_1[a0_0x3236a6(0x15d)])],CustomConfiguration[a0_0x3236a6(0x16b)],a0_0x3236a6(0x172),void 0x0),__decorate([(0x0,decorator_1[a0_0x3236a6(0x166)])(),__metadata(a0_0x3236a6(0x170),core_1[a0_0x3236a6(0x158)])],CustomConfiguration[a0_0x3236a6(0x16b)],a0_0x3236a6(0x16e),void 0x0),CustomConfiguration=__decorate([(0x0,decorator_1[a0_0x3236a6(0x159)])({'conflictCheck':![],'imports':[typeorm],'namespace':a0_0x3236a6(0x169)})],CustomConfiguration),exports[a0_0x3236a6(0x173)]=CustomConfiguration;
|
package/dist/helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';const a1_0x3f6a3d=a1_0x454b;function a1_0x454b(_0x5eb31f,_0x10c79d){const _0x586484=a1_0x5864();return a1_0x454b=function(_0x454b15,_0x37e9ec){_0x454b15=_0x454b15-0x111;let _0x3fb310=_0x586484[_0x454b15];return _0x3fb310;},a1_0x454b(_0x5eb31f,_0x10c79d);}(function(_0x1920c5,_0x5cbe1e){const _0xd56f01=a1_0x454b,_0x1f803e=_0x1920c5();while(!![]){try{const _0x2ec5b7=-parseInt(_0xd56f01(0x123))/0x1*(-parseInt(_0xd56f01(0x122))/0x2)+parseInt(_0xd56f01(0x115))/0x3+parseInt(_0xd56f01(0x11b))/0x4+-parseInt(_0xd56f01(0x129))/0x5+-parseInt(_0xd56f01(0x124))/0x6*(-parseInt(_0xd56f01(0x12c))/0x7)+-parseInt(_0xd56f01(0x112))/0x8+-parseInt(_0xd56f01(0x125))/0x9;if(_0x2ec5b7===_0x5cbe1e)break;else _0x1f803e['push'](_0x1f803e['shift']());}catch(_0x39ddd0){_0x1f803e['push'](_0x1f803e['shift']());}}}(a1_0x5864,0x28469));Object[a1_0x3f6a3d(0x12b)](exports,a1_0x3f6a3d(0x114),{'value':!![]}),exports[a1_0x3f6a3d(0x117)]=exports[a1_0x3f6a3d(0x11e)]=void 0x0;const columnTypes={'json':a1_0x3f6a3d(0x11a),'char':a1_0x3f6a3d(0x111),'varchar':'string','text':a1_0x3f6a3d(0x126),'longtext':'longtext','mediumtext':'mediumtext','int':'number','float':a1_0x3f6a3d(0x127),'double':a1_0x3f6a3d(0x127),'decimal':a1_0x3f6a3d(0x12a),'date':a1_0x3f6a3d(0x116),'time':a1_0x3f6a3d(0x11c),'datetime':'datetime','timestamp':'timestamp','tinyint':a1_0x3f6a3d(0x119)};function a1_0x5864(){const _0x20bc43=['1150ymoBwO','109icHjZt','876rPnwRV','357966ylYYpa','text','float','substr','1561415agMMah','decimal','defineProperty','9611BYjAFu','string','838160jXXpbv','length','__esModule','315192BPrLyK','date','getEnum','split','tinyint','json','1014396KlmDnS','datetime','hasOwnProperty','getProp','replace','enum','indexOf'];a1_0x5864=function(){return _0x20bc43;};return a1_0x5864();}function getProp(_0x4caa2b){const _0x1841f7=a1_0x3f6a3d;if(columnTypes[_0x1841f7(0x11d)](_0x4caa2b))return columnTypes[_0x4caa2b];else return _0x4caa2b[_0x1841f7(0x121)]('(')>-0x1||_0x4caa2b['indexOf']('\x20')>-0x1?(_0x4caa2b=_0x4caa2b[_0x1841f7(0x128)](0x0,_0x4caa2b['indexOf']('(')>-0x1?_0x4caa2b[_0x1841f7(0x121)]('('):_0x4caa2b[_0x1841f7(0x121)]('\x20')),columnTypes[_0x4caa2b]||_0x4caa2b):_0x1841f7(0x111);}exports[a1_0x3f6a3d(0x11e)]=getProp;function getEnum(_0x2bba28){const _0x476f39=a1_0x3f6a3d;if(getProp(_0x2bba28)==_0x476f39(0x120))return _0x2bba28[_0x476f39(0x128)](0x5,_0x2bba28[_0x476f39(0x113)]-0x6)[_0x476f39(0x11f)](/[\'|\"]/g,'')[_0x476f39(0x118)](',');return[];}exports[a1_0x3f6a3d(0x117)]=getEnum;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var a2_0x3a1130=a2_0x1865;(function(_0x347f24,_0x147d5a){var _0x3b5dad=a2_0x1865,_0x13f3bf=_0x347f24();while(!![]){try{var _0x30243d=parseInt(_0x3b5dad(0x10b))/0x1*(parseInt(_0x3b5dad(0x102))/0x2)+-parseInt(_0x3b5dad(0xfc))/0x3*(-parseInt(_0x3b5dad(0x108))/0x4)+-parseInt(_0x3b5dad(0x10a))/0x5+parseInt(_0x3b5dad(0x109))/0x6*(-parseInt(_0x3b5dad(0x106))/0x7)+-parseInt(_0x3b5dad(0x104))/0x8*(parseInt(_0x3b5dad(0x101))/0x9)+parseInt(_0x3b5dad(0x103))/0xa+parseInt(_0x3b5dad(0x10c))/0xb;if(_0x30243d===_0x147d5a)break;else _0x13f3bf['push'](_0x13f3bf['shift']());}catch(_0x20f180){_0x13f3bf['push'](_0x13f3bf['shift']());}}}(a2_0x190c,0x83958));Object[a2_0x3a1130(0x10d)](exports,a2_0x3a1130(0xfd),{'value':!![]}),exports[a2_0x3a1130(0x100)]=exports[a2_0x3a1130(0xff)]=void 0x0;var ApicreateService_1=require(a2_0x3a1130(0x107));Object['defineProperty'](exports,'ApicreateService',{'enumerable':!![],'get':function(){return ApicreateService_1['ApicreateService'];}});function a2_0x1865(_0x771981,_0x5b0999){var _0x190c5c=a2_0x190c();return a2_0x1865=function(_0x18654e,_0x15872b){_0x18654e=_0x18654e-0xfc;var _0x2e421b=_0x190c5c[_0x18654e];return _0x2e421b;},a2_0x1865(_0x771981,_0x5b0999);}function a2_0x190c(){var _0x2780ac=['9580XsoNaX','12oUfKzo','1465565xKmUxx','2633abKJah','5629965ylOlgH','defineProperty','393KUaBix','__esModule','CustomConfiguration','ApicreateService','Configuration','1055781yCJrqz','618dvyAOu','2650550DHEekT','56sLSkIF','./configuration','878388LpFDFy','./service/ApicreateService'];a2_0x190c=function(){return _0x2780ac;};return a2_0x190c();}var configuration_1=require(a2_0x3a1130(0x105));Object[a2_0x3a1130(0x10d)](exports,a2_0x3a1130(0x100),{'enumerable':!![],'get':function(){var _0x2d0c2a=a2_0x3a1130;return configuration_1[_0x2d0c2a(0xfe)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function a3_0x1f52(){const _0x3ac3cb=['SELECT\x20TABLE_COMMENT\x20as\x20`comment`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22','getOwnPropertyDescriptor','PRI','1583986xUGdsh','path','metadata','LIKE\x20\x22','defineProperty','tableprefix','module','typeorm\x20数据源\x20','__metadata','table','Fields','isConnected','SELECT\x20TABLE_NAME\x20as\x20`table`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22','dataSource','app','mkdirSync','typeorm','4XbvDrT','controller','toLowerCase','hasDataSource','=\x20\x22','Comment','comment','../templateFun/Action','ApicreateService','die','dataSourceManager','/app','App','function','getConfig','../templateFun/Validator','\x20未连接','Key','design:type','existsSync','isDevelopmentEnvironment','/config.ts','dirname','getDataSource','\x20表注释不存在','object','1tGrPQN','66AlIyNL','2596pxozSl','__esModule','export\x20default\x20{\x0a\x20\x20\x20\x20name:\x20\x27','@midwayjs/decorator','apitest','102660JTabnu','CreateModuleConfig','tablestartLow','length','Singleton','SHOW\x20FULL\x20COLUMNS\x20FROM\x20`','\x22\x20AND\x20table_name\x20=\x20\x27','\x20不存在','default','@midwayjs/typeorm','Inject','\x22\x20AND\x20table_name\x20','environment','tablestart','prototype','getBaseDir','Scope','522183jRkfgD','__decorate','split','map','@midwayjs/core','\x27,\x0a\x20\x20\x20\x20description:\x20\x27\x27,\x0a\x20\x20\x20\x20middlewares:\x20[],\x0a}','241157EpcJne','10MdgDkh','2858373YsYNgp','substr','config','decorate','335855QKavRb','/apps/','Primary','7120336HkZMuZ','TypeORMDataSourceManager','utf-8','basedir','string','Field','connection','Provide'];a3_0x1f52=function(){return _0x3ac3cb;};return a3_0x1f52();}const a3_0x5626d5=a3_0xdbe2;(function(_0x4ddead,_0x45eeb8){const _0x52e6df=a3_0xdbe2,_0xf4980f=_0x4ddead();while(!![]){try{const _0x30f06f=-parseInt(_0x52e6df(0x18a))/0x1*(parseInt(_0x52e6df(0x15f))/0x2)+-parseInt(_0x52e6df(0x1a2))/0x3*(-parseInt(_0x52e6df(0x170))/0x4)+parseInt(_0x52e6df(0x1ae))/0x5+-parseInt(_0x52e6df(0x18b))/0x6*(parseInt(_0x52e6df(0x1a8))/0x7)+-parseInt(_0x52e6df(0x1b1))/0x8+-parseInt(_0x52e6df(0x1aa))/0x9*(-parseInt(_0x52e6df(0x1a9))/0xa)+parseInt(_0x52e6df(0x18c))/0xb*(parseInt(_0x52e6df(0x191))/0xc);if(_0x30f06f===_0x45eeb8)break;else _0xf4980f['push'](_0xf4980f['shift']());}catch(_0x4e9630){_0xf4980f['push'](_0xf4980f['shift']());}}}(a3_0x1f52,0x7e2cd));function a3_0xdbe2(_0xe22ce9,_0x43314a){const _0x1f5201=a3_0x1f52();return a3_0xdbe2=function(_0xdbe2a,_0x435903){_0xdbe2a=_0xdbe2a-0x159;let _0x1b282d=_0x1f5201[_0xdbe2a];return _0x1b282d;},a3_0xdbe2(_0xe22ce9,_0x43314a);}var __decorate=this&&this[a3_0x5626d5(0x1a3)]||function(_0x282682,_0x157d94,_0x2e255d,_0x8b1718){const _0x4021de=a3_0x5626d5;var _0x1bc6fc=arguments[_0x4021de(0x194)],_0x5bad3b=_0x1bc6fc<0x3?_0x157d94:_0x8b1718===null?_0x8b1718=Object[_0x4021de(0x15d)](_0x157d94,_0x2e255d):_0x8b1718,_0x3fdb7d;if(typeof Reflect==='object'&&typeof Reflect[_0x4021de(0x1ad)]===_0x4021de(0x17d))_0x5bad3b=Reflect[_0x4021de(0x1ad)](_0x282682,_0x157d94,_0x2e255d,_0x8b1718);else{for(var _0x3bcfd7=_0x282682[_0x4021de(0x194)]-0x1;_0x3bcfd7>=0x0;_0x3bcfd7--)if(_0x3fdb7d=_0x282682[_0x3bcfd7])_0x5bad3b=(_0x1bc6fc<0x3?_0x3fdb7d(_0x5bad3b):_0x1bc6fc>0x3?_0x3fdb7d(_0x157d94,_0x2e255d,_0x5bad3b):_0x3fdb7d(_0x157d94,_0x2e255d))||_0x5bad3b;}return _0x1bc6fc>0x3&&_0x5bad3b&&Object[_0x4021de(0x163)](_0x157d94,_0x2e255d,_0x5bad3b),_0x5bad3b;},__metadata=this&&this[a3_0x5626d5(0x167)]||function(_0xe2e5c6,_0x17a1dd){const _0x17f9b2=a3_0x5626d5;if(typeof Reflect===_0x17f9b2(0x189)&&typeof Reflect[_0x17f9b2(0x161)]===_0x17f9b2(0x17d))return Reflect[_0x17f9b2(0x161)](_0xe2e5c6,_0x17a1dd);};Object[a3_0x5626d5(0x163)](exports,a3_0x5626d5(0x18d),{'value':!![]}),exports['ApicreateService']=void 0x0;const fs=require('fs'),path=require(a3_0x5626d5(0x160)),core_1=require(a3_0x5626d5(0x1a6)),typeorm_1=require(a3_0x5626d5(0x19a)),decorator_1=require(a3_0x5626d5(0x18f)),Event_1=require('../templateFun/Event'),Search_1=require('../templateFun/Search'),Entities_1=require('../templateFun/Entities'),Validator_1=require(a3_0x5626d5(0x17f)),Action_1=require(a3_0x5626d5(0x177));let ApicreateService=class ApicreateService{async['create'](_0x336b2f){const _0x36e11b=a3_0x5626d5;var _0x167fec,_0x263148,_0x3d2846,_0x43692b,_0x569372;if(this[_0x36e11b(0x19d)][_0x36e11b(0x184)]()&&((_0x167fec=this[_0x36e11b(0x1ac)])===null||_0x167fec===void 0x0?void 0x0:_0x167fec[_0x36e11b(0x16c)])&&this[_0x36e11b(0x16d)][_0x36e11b(0x17e)](_0x36e11b(0x190))){!_0x336b2f['connection']&&(_0x336b2f[_0x36e11b(0x15a)]='default');if(!((_0x3d2846=(_0x263148=this['config'])===null||_0x263148===void 0x0?void 0x0:_0x263148[_0x36e11b(0x16c)])===null||_0x3d2846===void 0x0?void 0x0:_0x3d2846[_0x336b2f[_0x36e11b(0x15a)]]))throw new Error('typeorm\x20未配置数据源\x20'+_0x336b2f['connection']);if(!this[_0x36e11b(0x17a)][_0x36e11b(0x173)](_0x336b2f[_0x36e11b(0x15a)]))throw new Error(_0x36e11b(0x166)+_0x336b2f[_0x36e11b(0x15a)]+_0x36e11b(0x198));if(!this[_0x36e11b(0x17a)][_0x36e11b(0x16a)](_0x336b2f['connection']))throw new Error(_0x36e11b(0x166)+_0x336b2f[_0x36e11b(0x15a)]+_0x36e11b(0x180));const _0x3ba50e=this['app'][_0x36e11b(0x1a0)](),_0x4470b1=this[_0x36e11b(0x17a)][_0x36e11b(0x187)](_0x336b2f[_0x36e11b(0x15a)]),_0x2186cd=await _0x4470b1['query'](_0x36e11b(0x16b)+this[_0x36e11b(0x1ac)][_0x36e11b(0x16c)][_0x336b2f[_0x36e11b(0x15a)]]['database']+_0x36e11b(0x19c)+((_0x336b2f===null||_0x336b2f===void 0x0?void 0x0:_0x336b2f[_0x36e11b(0x168)])?_0x36e11b(0x174)+_0x336b2f[_0x36e11b(0x168)]+'\x22':_0x36e11b(0x162)+(_0x336b2f[_0x36e11b(0x164)]||'')+'%\x22'))||[];for(let _0x39a828=0x0;_0x39a828<_0x2186cd[_0x36e11b(0x194)];_0x39a828++){const _0x44a567=_0x2186cd[_0x39a828][_0x36e11b(0x168)],_0x3e6af9=await _0x4470b1['query'](_0x36e11b(0x15c)+this['config'][_0x36e11b(0x16c)][_0x336b2f[_0x36e11b(0x15a)]]['database']+_0x36e11b(0x197)+_0x44a567+'\x27')||[];if((_0x43692b=_0x3e6af9[0x0])===null||_0x43692b===void 0x0?void 0x0:_0x43692b[_0x36e11b(0x176)]){const _0x296a6b={'tablename':_0x44a567,'Primary':{},'Fields':{},'Comment':(_0x569372=_0x3e6af9[0x0])===null||_0x569372===void 0x0?void 0x0:_0x569372[_0x36e11b(0x176)]};_0x296a6b[_0x36e11b(0x19e)]=_0x44a567[_0x36e11b(0x1ab)]((_0x336b2f===null||_0x336b2f===void 0x0?void 0x0:_0x336b2f[_0x36e11b(0x1ab)])||0x0,_0x44a567['length']),_0x296a6b[_0x36e11b(0x1b4)]=(_0x336b2f===null||_0x336b2f===void 0x0?void 0x0:_0x336b2f[_0x36e11b(0x165)])?_0x3ba50e+_0x36e11b(0x1af)+_0x296a6b['tablestart'][_0x36e11b(0x1a4)]('_')[0x0][_0x36e11b(0x172)]():_0x3ba50e+_0x36e11b(0x17b),_0x296a6b[_0x36e11b(0x193)]=_0x296a6b['tablestart'][_0x36e11b(0x1a4)]('_')[_0x36e11b(0x1a5)](_0x3a8ef3=>_0x3a8ef3[_0x36e11b(0x172)]())['join'](''),_0x296a6b['tablestartUp']=_0x296a6b[_0x36e11b(0x19e)][_0x36e11b(0x1a4)]('_')['map'](_0x3d0da7=>''+_0x3d0da7['substring'](0x0,0x1)['toUpperCase']()+_0x3d0da7['substring'](0x1)[_0x36e11b(0x172)]())['join']('');(_0x336b2f===null||_0x336b2f===void 0x0?void 0x0:_0x336b2f['module'])&&(_0x296a6b['moduleName']=_0x296a6b['tablestart'][_0x36e11b(0x1a4)]('_')[0x0][_0x36e11b(0x172)]());for(let _0x376eca of await _0x4470b1['query'](_0x36e11b(0x196)+_0x44a567+'`')){_0x376eca[_0x36e11b(0x181)]==_0x36e11b(0x15e)?_0x296a6b[_0x36e11b(0x1b0)]=_0x376eca:_0x296a6b[_0x36e11b(0x169)][_0x376eca[_0x36e11b(0x159)]]=_0x376eca;}(_0x336b2f===null||_0x336b2f===void 0x0?void 0x0:_0x336b2f[_0x36e11b(0x171)])&&(_0x296a6b[_0x36e11b(0x171)]=_0x336b2f===null||_0x336b2f===void 0x0?void 0x0:_0x336b2f[_0x36e11b(0x171)]);if(!(_0x336b2f===null||_0x336b2f===void 0x0?void 0x0:_0x336b2f['onlyvue'])){await(0x0,Event_1[_0x36e11b(0x199)])(_0x296a6b),await(0x0,Search_1[_0x36e11b(0x199)])(_0x296a6b),await(0x0,Entities_1[_0x36e11b(0x199)])(_0x296a6b),await(0x0,Validator_1[_0x36e11b(0x199)])(_0x296a6b);var _0x3b764b=[];if(typeof(_0x336b2f===null||_0x336b2f===void 0x0?void 0x0:_0x336b2f['controller'])==_0x36e11b(0x1b5))_0x3b764b=[_0x336b2f===null||_0x336b2f===void 0x0?void 0x0:_0x336b2f[_0x36e11b(0x171)]];else Array['isArray'](_0x336b2f===null||_0x336b2f===void 0x0?void 0x0:_0x336b2f['controller'])?_0x3b764b=_0x336b2f===null||_0x336b2f===void 0x0?void 0x0:_0x336b2f[_0x36e11b(0x171)]:_0x3b764b=[!![]];for(let _0x1c5a43 of _0x3b764b){_0x296a6b[_0x36e11b(0x171)]=_0x1c5a43,await(0x0,Action_1['default'])(_0x296a6b);}}}else console['error']('表:'+_0x44a567+_0x36e11b(0x188));}}return _0x36e11b(0x179);}async[a3_0x5626d5(0x192)](_0x3e7549){const _0x9d4dc7=a3_0x5626d5,_0x139ff4=_0x3e7549[_0x9d4dc7(0x19e)][_0x9d4dc7(0x1a4)]('_')[0x0][_0x9d4dc7(0x172)]();if(!fs[_0x9d4dc7(0x183)](_0x3e7549[_0x9d4dc7(0x1b4)]+'/config.ts')){let _0x203e88=_0x9d4dc7(0x18e)+(_0x3e7549[_0x9d4dc7(0x175)]||_0x139ff4)+_0x9d4dc7(0x1a7);fs[_0x9d4dc7(0x16e)](path[_0x9d4dc7(0x186)](_0x3e7549[_0x9d4dc7(0x1b4)]+_0x9d4dc7(0x185)),{'recursive':!![]}),fs['writeFileSync'](_0x3e7549[_0x9d4dc7(0x1b4)]+_0x9d4dc7(0x185),_0x203e88,_0x9d4dc7(0x1b3));}}};__decorate([(0x0,decorator_1[a3_0x5626d5(0x17c)])(),__metadata('design:type',Object)],ApicreateService['prototype'],a3_0x5626d5(0x16d),void 0x0),__decorate([(0x0,decorator_1['Config'])(a3_0x5626d5(0x16f)),__metadata(a3_0x5626d5(0x182),Object)],ApicreateService[a3_0x5626d5(0x19f)],a3_0x5626d5(0x1ac),void 0x0),__decorate([(0x0,decorator_1[a3_0x5626d5(0x19b)])(),__metadata(a3_0x5626d5(0x182),core_1['MidwayEnvironmentService'])],ApicreateService[a3_0x5626d5(0x19f)],a3_0x5626d5(0x19d),void 0x0),__decorate([(0x0,decorator_1['Inject'])(),__metadata('design:type',typeorm_1[a3_0x5626d5(0x1b2)])],ApicreateService[a3_0x5626d5(0x19f)],a3_0x5626d5(0x17a),void 0x0),ApicreateService=__decorate([(0x0,decorator_1[a3_0x5626d5(0x15b)])('ApicreateService'),(0x0,decorator_1[a3_0x5626d5(0x1a1)])(decorator_1['ScopeEnum'][a3_0x5626d5(0x195)])],ApicreateService),exports[a3_0x5626d5(0x178)]=ApicreateService;
|
|
1
|
+
'use strict';function a3_0x2f2c(_0x1ee056,_0x1fea69){const _0x119ed7=a3_0x119e();return a3_0x2f2c=function(_0x2f2c16,_0x2409c8){_0x2f2c16=_0x2f2c16-0x8e;let _0x1d689a=_0x119ed7[_0x2f2c16];return _0x1d689a;},a3_0x2f2c(_0x1ee056,_0x1fea69);}const a3_0x4f961c=a3_0x2f2c;(function(_0x12979b,_0x451fc5){const _0x4a8605=a3_0x2f2c,_0x57ce89=_0x12979b();while(!![]){try{const _0x14364d=-parseInt(_0x4a8605(0xd0))/0x1*(-parseInt(_0x4a8605(0xe3))/0x2)+-parseInt(_0x4a8605(0xb9))/0x3*(parseInt(_0x4a8605(0xa0))/0x4)+parseInt(_0x4a8605(0xd3))/0x5+parseInt(_0x4a8605(0xde))/0x6*(parseInt(_0x4a8605(0xf3))/0x7)+-parseInt(_0x4a8605(0xe5))/0x8*(-parseInt(_0x4a8605(0xe4))/0x9)+-parseInt(_0x4a8605(0x9f))/0xa+parseInt(_0x4a8605(0xea))/0xb;if(_0x14364d===_0x451fc5)break;else _0x57ce89['push'](_0x57ce89['shift']());}catch(_0x2fd599){_0x57ce89['push'](_0x57ce89['shift']());}}}(a3_0x119e,0x3de13));var __decorate=this&&this['__decorate']||function(_0x1a48b7,_0x11afb8,_0x130743,_0x468cfd){const _0x426a20=a3_0x2f2c;var _0x3380ed=arguments[_0x426a20(0xe6)],_0x31954e=_0x3380ed<0x3?_0x11afb8:_0x468cfd===null?_0x468cfd=Object[_0x426a20(0xc4)](_0x11afb8,_0x130743):_0x468cfd,_0x26c858;if(typeof Reflect===_0x426a20(0xe8)&&typeof Reflect[_0x426a20(0xbe)]===_0x426a20(0xb7))_0x31954e=Reflect[_0x426a20(0xbe)](_0x1a48b7,_0x11afb8,_0x130743,_0x468cfd);else{for(var _0xd694be=_0x1a48b7[_0x426a20(0xe6)]-0x1;_0xd694be>=0x0;_0xd694be--)if(_0x26c858=_0x1a48b7[_0xd694be])_0x31954e=(_0x3380ed<0x3?_0x26c858(_0x31954e):_0x3380ed>0x3?_0x26c858(_0x11afb8,_0x130743,_0x31954e):_0x26c858(_0x11afb8,_0x130743))||_0x31954e;}return _0x3380ed>0x3&&_0x31954e&&Object['defineProperty'](_0x11afb8,_0x130743,_0x31954e),_0x31954e;},__metadata=this&&this[a3_0x4f961c(0xc6)]||function(_0x2eb150,_0x27c3b1){const _0x1dff5f=a3_0x4f961c;if(typeof Reflect===_0x1dff5f(0xe8)&&typeof Reflect[_0x1dff5f(0xef)]===_0x1dff5f(0xb7))return Reflect['metadata'](_0x2eb150,_0x27c3b1);};Object[a3_0x4f961c(0xd5)](exports,'__esModule',{'value':!![]}),exports[a3_0x4f961c(0xa3)]=void 0x0;const fs=require('fs'),path=require(a3_0x4f961c(0xf0)),core_1=require('@midwayjs/core'),typeorm_1=require(a3_0x4f961c(0xe2)),decorator_1=require(a3_0x4f961c(0x9c)),Common_1=require(a3_0x4f961c(0x9b)),Event_1=require(a3_0x4f961c(0x97)),Search_1=require(a3_0x4f961c(0xab)),Entities_1=require(a3_0x4f961c(0x90)),Validator_1=require('../templateFun/Validator'),Action_1=require(a3_0x4f961c(0xee));let ApicreateService=class ApicreateService{async[a3_0x4f961c(0xb2)](_0x19da4e){const _0x1cc1dd=a3_0x4f961c;var _0x568586,_0x4bf201,_0x300f17,_0x45e4e9,_0x2de5b5;if(this[_0x1cc1dd(0xba)][_0x1cc1dd(0xb4)]()&&((_0x568586=this[_0x1cc1dd(0xe7)])===null||_0x568586===void 0x0?void 0x0:_0x568586['dataSource'])&&this[_0x1cc1dd(0xaa)]['getConfig'](_0x1cc1dd(0xc3))){!_0x19da4e['connection']&&(_0x19da4e[_0x1cc1dd(0xd1)]=_0x1cc1dd(0xc7));if(!((_0x300f17=(_0x4bf201=this[_0x1cc1dd(0xe7)])===null||_0x4bf201===void 0x0?void 0x0:_0x4bf201[_0x1cc1dd(0xd4)])===null||_0x300f17===void 0x0?void 0x0:_0x300f17[_0x19da4e[_0x1cc1dd(0xd1)]]))throw new Error(_0x1cc1dd(0xb6)+_0x19da4e[_0x1cc1dd(0xd1)]);if(!this[_0x1cc1dd(0xad)][_0x1cc1dd(0x91)](_0x19da4e[_0x1cc1dd(0xd1)]))throw new Error(_0x1cc1dd(0xb1)+_0x19da4e[_0x1cc1dd(0xd1)]+_0x1cc1dd(0x9d));if(!this[_0x1cc1dd(0xad)]['isConnected'](_0x19da4e[_0x1cc1dd(0xd1)]))throw new Error(_0x1cc1dd(0xb1)+_0x19da4e[_0x1cc1dd(0xd1)]+_0x1cc1dd(0xcd));const _0x5bbdf2=this[_0x1cc1dd(0xaa)][_0x1cc1dd(0xa5)](),_0x180165=this[_0x1cc1dd(0xad)][_0x1cc1dd(0xb0)](_0x19da4e[_0x1cc1dd(0xd1)]),_0x533162=await _0x180165[_0x1cc1dd(0xa8)](_0x1cc1dd(0xbf)+this[_0x1cc1dd(0xe7)]['dataSource'][_0x19da4e[_0x1cc1dd(0xd1)]]['database']+_0x1cc1dd(0x94)+((_0x19da4e===null||_0x19da4e===void 0x0?void 0x0:_0x19da4e[_0x1cc1dd(0xc2)])?_0x1cc1dd(0xda)+_0x19da4e[_0x1cc1dd(0xc2)]+'\x22':_0x1cc1dd(0xaf)+(_0x19da4e[_0x1cc1dd(0xa1)]||'')+'%\x22'))||[];for(let _0x589152=0x0;_0x589152<_0x533162['length'];_0x589152++){const _0x15c6b2=_0x533162[_0x589152][_0x1cc1dd(0xc2)],_0x1aa72d=await _0x180165['query']('SELECT\x20TABLE_COMMENT\x20as\x20`comment`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22'+this[_0x1cc1dd(0xe7)][_0x1cc1dd(0xd4)][_0x19da4e[_0x1cc1dd(0xd1)]][_0x1cc1dd(0xcc)]+'\x22\x20AND\x20table_name\x20=\x20\x27'+_0x15c6b2+'\x27')||[];if((_0x45e4e9=_0x1aa72d[0x0])===null||_0x45e4e9===void 0x0?void 0x0:_0x45e4e9[_0x1cc1dd(0x8f)]){const _0x122e67={'tablename':_0x15c6b2,'Primary':{},'Fields':{},'Comment':(_0x2de5b5=_0x1aa72d[0x0])===null||_0x2de5b5===void 0x0?void 0x0:_0x2de5b5[_0x1cc1dd(0x8f)]};_0x122e67[_0x1cc1dd(0xd9)]=_0x15c6b2[_0x1cc1dd(0xa4)]((_0x19da4e===null||_0x19da4e===void 0x0?void 0x0:_0x19da4e[_0x1cc1dd(0xa4)])||0x0,_0x15c6b2[_0x1cc1dd(0xe6)]),_0x122e67[_0x1cc1dd(0xac)]=(_0x19da4e===null||_0x19da4e===void 0x0?void 0x0:_0x19da4e[_0x1cc1dd(0x92)])?_0x5bbdf2+_0x1cc1dd(0xb8)+_0x122e67[_0x1cc1dd(0xd9)]['split']('_')[0x0][_0x1cc1dd(0x95)]():_0x5bbdf2+_0x1cc1dd(0xed);const _0x2dfa2d=_0x122e67[_0x1cc1dd(0xd9)][_0x1cc1dd(0xc8)]('_')[_0x1cc1dd(0xb5)](_0x133091=>_0x133091&&_0x133091['trim']());(_0x19da4e===null||_0x19da4e===void 0x0?void 0x0:_0x19da4e[_0x1cc1dd(0x92)])&&(await this[_0x1cc1dd(0xeb)](_0x122e67),_0x122e67[_0x1cc1dd(0x98)]=_0x2dfa2d[0x0][_0x1cc1dd(0x95)]());_0x122e67[_0x1cc1dd(0xbd)]=_0x2dfa2d[_0x1cc1dd(0xbb)](_0x1b961a=>_0x1b961a[_0x1cc1dd(0x95)]())[_0x1cc1dd(0xd2)](''),_0x122e67[_0x1cc1dd(0xd8)]=_0x2dfa2d[_0x1cc1dd(0xbb)](_0x5d5f6d=>''+_0x5d5f6d[_0x1cc1dd(0x9e)](0x0,0x1)[_0x1cc1dd(0xa2)]()+_0x5d5f6d[_0x1cc1dd(0x9e)](0x1)['toLowerCase']())[_0x1cc1dd(0xd2)]('');(_0x122e67===null||_0x122e67===void 0x0?void 0x0:_0x122e67[_0x1cc1dd(0x98)])&&_0x2dfa2d[_0x1cc1dd(0xe6)]>0x1&&_0x2dfa2d[0x0][_0x1cc1dd(0x95)]()==_0x122e67[_0x1cc1dd(0x98)]?(_0x122e67[_0x1cc1dd(0xd7)]=_0x122e67[_0x1cc1dd(0xd8)]['substring'](_0x122e67[_0x1cc1dd(0x98)]['length'],_0x122e67[_0x1cc1dd(0xd8)][_0x1cc1dd(0xe6)]),_0x122e67[_0x1cc1dd(0xa9)]=_0x122e67[_0x1cc1dd(0xbd)][_0x1cc1dd(0x9e)](_0x122e67[_0x1cc1dd(0x98)][_0x1cc1dd(0xe6)],_0x122e67[_0x1cc1dd(0xbd)][_0x1cc1dd(0xe6)])):(_0x122e67[_0x1cc1dd(0xd7)]=_0x122e67[_0x1cc1dd(0xd8)],_0x122e67[_0x1cc1dd(0xa9)]=_0x122e67[_0x1cc1dd(0xbd)]);for(let _0x125655 of await _0x180165[_0x1cc1dd(0xa8)]('SHOW\x20FULL\x20COLUMNS\x20FROM\x20`'+_0x15c6b2+'`')){_0x125655[_0x1cc1dd(0xe0)]==_0x1cc1dd(0x8e)?_0x122e67[_0x1cc1dd(0xcb)]=_0x125655:_0x122e67[_0x1cc1dd(0xe9)][_0x125655[_0x1cc1dd(0xc9)]]=_0x125655;}(_0x19da4e===null||_0x19da4e===void 0x0?void 0x0:_0x19da4e[_0x1cc1dd(0xc1)])&&(_0x122e67[_0x1cc1dd(0xc1)]=_0x19da4e===null||_0x19da4e===void 0x0?void 0x0:_0x19da4e[_0x1cc1dd(0xc1)]);if(!(_0x19da4e===null||_0x19da4e===void 0x0?void 0x0:_0x19da4e[_0x1cc1dd(0xc0)])){await(0x0,Common_1[_0x1cc1dd(0xc7)])(_0x122e67),await(0x0,Event_1[_0x1cc1dd(0xc7)])(_0x122e67),await(0x0,Search_1[_0x1cc1dd(0xc7)])(_0x122e67),await(0x0,Entities_1[_0x1cc1dd(0xc7)])(_0x122e67),await(0x0,Validator_1[_0x1cc1dd(0xc7)])(_0x122e67);var _0x172fd1=[];if(typeof(_0x19da4e===null||_0x19da4e===void 0x0?void 0x0:_0x19da4e[_0x1cc1dd(0xc1)])==_0x1cc1dd(0xd6))_0x172fd1=[_0x19da4e===null||_0x19da4e===void 0x0?void 0x0:_0x19da4e[_0x1cc1dd(0xc1)]];else Array['isArray'](_0x19da4e===null||_0x19da4e===void 0x0?void 0x0:_0x19da4e['controller'])?_0x172fd1=_0x19da4e===null||_0x19da4e===void 0x0?void 0x0:_0x19da4e['controller']:_0x172fd1=[!![]];for(let _0x3afc3c of _0x172fd1){_0x122e67[_0x1cc1dd(0xc1)]=_0x3afc3c,await(0x0,Action_1[_0x1cc1dd(0xc7)])(_0x122e67);}}}else console[_0x1cc1dd(0x96)]('表:'+_0x15c6b2+_0x1cc1dd(0xcf));}}return _0x1cc1dd(0xc5);}async[a3_0x4f961c(0xeb)](_0x107a7a){const _0x4f0b0d=a3_0x4f961c,_0x323284=_0x107a7a[_0x4f0b0d(0xd9)][_0x4f0b0d(0xc8)]('_')[0x0][_0x4f0b0d(0x95)]();if(!fs[_0x4f0b0d(0xbc)](_0x107a7a[_0x4f0b0d(0xac)]+_0x4f0b0d(0xe1))){let _0x576034=_0x4f0b0d(0xec)+(_0x107a7a[_0x4f0b0d(0x93)]||_0x323284)+_0x4f0b0d(0xca);fs['mkdirSync'](path[_0x4f0b0d(0xdc)](_0x107a7a[_0x4f0b0d(0xac)]+_0x4f0b0d(0xe1)),{'recursive':!![]}),fs[_0x4f0b0d(0x9a)](_0x107a7a[_0x4f0b0d(0xac)]+_0x4f0b0d(0xe1),_0x576034,_0x4f0b0d(0xf2));}}};__decorate([(0x0,decorator_1[a3_0x4f961c(0xdb)])(),__metadata(a3_0x4f961c(0xdf),Object)],ApicreateService['prototype'],a3_0x4f961c(0xaa),void 0x0),__decorate([(0x0,decorator_1[a3_0x4f961c(0xb3)])(a3_0x4f961c(0xdd)),__metadata(a3_0x4f961c(0xdf),Object)],ApicreateService[a3_0x4f961c(0x99)],a3_0x4f961c(0xe7),void 0x0),__decorate([(0x0,decorator_1[a3_0x4f961c(0xce)])(),__metadata('design:type',core_1[a3_0x4f961c(0xf1)])],ApicreateService[a3_0x4f961c(0x99)],a3_0x4f961c(0xba),void 0x0),__decorate([(0x0,decorator_1[a3_0x4f961c(0xce)])(),__metadata(a3_0x4f961c(0xdf),typeorm_1[a3_0x4f961c(0xa7)])],ApicreateService[a3_0x4f961c(0x99)],a3_0x4f961c(0xad),void 0x0),ApicreateService=__decorate([(0x0,decorator_1['Provide'])('ApicreateService'),(0x0,decorator_1['Scope'])(decorator_1[a3_0x4f961c(0xae)][a3_0x4f961c(0xa6)])],ApicreateService),exports['ApicreateService']=ApicreateService;function a3_0x119e(){const _0xa86ad9=['/config.ts','@midwayjs/typeorm','1318lUonBr','72621ynIrgF','96svNAFG','length','config','object','Fields','2011746UXJBUx','CreateModuleConfig','export\x20default\x20{\x0a\x20\x20\x20\x20name:\x20\x27','/app','../templateFun/Action','metadata','path','MidwayEnvironmentService','utf-8','217yptNvV','PRI','comment','../templateFun/Entities','hasDataSource','module','Comment','\x22\x20AND\x20table_name\x20','toLowerCase','error','../templateFun/Event','moduleName','prototype','writeFileSync','../templateFun/Common','@midwayjs/decorator','\x20不存在','substring','4950830kIKKgd','1992EemvGI','tableprefix','toUpperCase','ApicreateService','substr','getBaseDir','Singleton','TypeORMDataSourceManager','query','tablestartLowShort','app','../templateFun/Search','basedir','dataSourceManager','ScopeEnum','LIKE\x20\x22','getDataSource','typeorm\x20数据源\x20','create','Config','isDevelopmentEnvironment','filter','typeorm\x20未配置数据源\x20','function','/apps/','1035meGcal','environment','map','existsSync','tablestartLow','decorate','SELECT\x20TABLE_NAME\x20as\x20`table`\x20FROM\x20information_schema.TABLES\x20WHERE\x20TABLE_SCHEMA=\x22','onlyvue','controller','table','apitest','getOwnPropertyDescriptor','die','__metadata','default','split','Field','\x27,\x0a\x20\x20\x20\x20description:\x20\x27\x27,\x0a\x20\x20\x20\x20middlewares:\x20[],\x0a}','Primary','database','\x20未连接','Inject','\x20表注释不存在','223zFhong','connection','join','2201650BMBCoO','dataSource','defineProperty','string','tablestartUpShort','tablestartUp','tablestart','=\x20\x22','App','dirname','typeorm','10326kGMdtK','design:type','Key'];a3_0x119e=function(){return _0xa86ad9;};return a3_0x119e();}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export default function ({ controller, tablestartUp, basedir, Primary, Comment, moduleName }: {
|
|
1
|
+
export default function ({ controller, tablestartUp, tablestartUpShort, basedir, Primary, Comment, moduleName }: {
|
|
2
2
|
controller: any;
|
|
3
3
|
tablestartUp: any;
|
|
4
|
+
tablestartUpShort: any;
|
|
4
5
|
basedir: any;
|
|
5
6
|
Primary: any;
|
|
6
7
|
Comment: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4_0x3fb760=a4_0x33e3;(function(_0xad0d67,_0x5c0b1b){const _0x14c3fe=a4_0x33e3,_0x452f2b=_0xad0d67();while(!![]){try{const _0xeeb715=parseInt(_0x14c3fe(0x18a))/0x1*(-parseInt(_0x14c3fe(0x180))/0x2)+parseInt(_0x14c3fe(0x163))/0x3*(parseInt(_0x14c3fe(0x153))/0x4)+-parseInt(_0x14c3fe(0x157))/0x5*(-parseInt(_0x14c3fe(0x15a))/0x6)+-parseInt(_0x14c3fe(0x150))/0x7+-parseInt(_0x14c3fe(0x16a))/0x8*(parseInt(_0x14c3fe(0x169))/0x9)+parseInt(_0x14c3fe(0x151))/0xa*(-parseInt(_0x14c3fe(0x17a))/0xb)+parseInt(_0x14c3fe(0x197))/0xc;if(_0xeeb715===_0x5c0b1b)break;else _0x452f2b['push'](_0x452f2b['shift']());}catch(_0x50b7d6){_0x452f2b['push'](_0x452f2b['shift']());}}}(a4_0x4e4a,0x93c1f));Object[a4_0x3fb760(0x16d)](exports,'__esModule',{'value':!![]});const fs=require('fs'),path_1=require(a4_0x3fb760(0x183));function a4_0x4e4a(){const _0x592ce7=[':\x20string)\x20{\x0a','existsSync','/Create\x27;\x0a','\x20\x20\x20\x20@Api(\x22删除数据\x22,\x20\x27del\x27,\x20\x27/:','\x20\x20\x20\x20\x20\x20\x20\x20const\x20savemodel\x20=\x20await\x20this.','@/app','896tcvzCQ','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20search.getOneOrFail().catch(()\x20=>\x20{\x0a','\x20\x20\x20\x20@Inject()\x20protected\x20CacheService:\x20CacheService;\x0a','Update\x20}\x20from\x20\x27','import\x20{\x20','@/apps/','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20throw\x20new\x20AnnError(AnnError.NOFIND,\x20{\x20message:\x20\x27数据不存在\x27\x20})\x0a','Create)\x20{\x0a','string','/repository\x27;\x0a','.search(params,\x20pageinfo).then(async\x20search\x20=>\x20{\x0a\x0a','\x20\x20\x20\x20}\x0a\x0a\x0a','29551584sXjOli','\x20\x20\x20\x20\x20\x20\x20\x20}\x0a','export\x20class\x20','/controller/','\x20\x20\x20\x20async\x20update(','Controller\x20{\x0a\x0a','\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a','\x20\x20\x20\x20@InjectRepository(','Search\x20}\x20from\x20\x27','\x20}).then(async\x20search\x20=>\x20{\x0a\x0a','Error\x20}\x20from\x20\x27','2862062cJxErk','70QiIFSv','//\x20import\x20{\x20','8YLzmcN','/Search\x27;\x0a\x0a\x0a',':\x20number)\x20{\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20await\x20this.EventService.emit(\x27','5fxwXnH','\x20\x20\x20\x20async\x20detail(','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(pagelist,\x20{\x20pageinfo,\x20pagetotal\x20});\x0a','757038tUNNkt','\x20\x20\x20\x20\x20\x20\x20\x20for\x20(let\x20tmpModel\x20of\x20tmpModels)\x20{\x0a\x0a','\x20\x20\x20\x20async\x20remove(','\x20\x20\x20\x20@Inject()\x20protected\x20ctx:\x20Context;\x0a','/Update\x27;\x0a','/validator/','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(tmpModel);\x0a','import\x20{\x20Action,\x20Api\x20}\x20from\x20\x27anncic-api\x27\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20search.getManyAndCount();\x0a','1371723MyRDns','\x20\x20\x20\x20@Api(\x27添加数据\x27,\x20\x27post\x27)\x0a','import\x20{\x20PageDTO,\x20CacheService,\x20EventService\x20}\x20from\x20\x27anncic-api\x27;\x0a\x0a','@remove\x27,\x20tmpModel);\x0a','.softRemove(tmpModel))\x0a','\x20\x20\x20\x20async\x20create(params:\x20','9vvTvkI','4287184kagTEQ','mkdirSync','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20deletes.push(await\x20this.','defineProperty','\x20\x20\x20\x20@Api(\x27修改数据\x27,\x20\x27put\x27,\x20\x27/:','import\x20{\x20Context\x20}\x20from\x20\x27@midwayjs/koa\x27\x0a','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(savemodel);\x0a','/entities/','.ts','\x20\x20\x20\x20\x20\x20\x20\x20const\x20tmpModel\x20=\x20await\x20this.','utf-8','\x20}\x20from\x20\x27','Field','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(deletes);\x0a','\x20\x20\x20\x20async\x20index(params:\x20','dirname','1778348ihEOln','\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x0a',':\x20number,\x20params:\x20','import\x20{\x20Inject,\x20InjectRepository\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a','.search({\x20','Search,\x20pageinfo:\x20PageDTO)\x20{\x0a','1834pYFPvb','\x27)\x0a','\x20\x20\x20\x20\x20\x20\x20\x20const\x20[pagelist,\x20pagetotal]\x20=\x20await\x20this.','path'];a4_0x4e4a=function(){return _0x592ce7;};return a4_0x4e4a();}async function default_1({controller:_0x18ba4f,tablestartUp:_0x4d2339,tablestartUpShort:_0x13ccab,basedir:_0x18be1e,Primary:_0x5d4952,Comment:_0x1d3bdb,moduleName:_0xab719b}){const _0xa28ad3=a4_0x3fb760;if(_0x18ba4f){const _0x2bbfdf=_0x18be1e+(typeof _0x18ba4f==_0xa28ad3(0x193)?_0xa28ad3(0x19a)+_0x18ba4f+'/'+_0x13ccab+_0xa28ad3(0x172):_0xa28ad3(0x19a)+_0x13ccab+'.ts');if(!fs[_0xa28ad3(0x185)](_0x2bbfdf)){let _0x4c2f2e='';_0x4c2f2e+=_0xa28ad3(0x16f),_0x4c2f2e+=_0xa28ad3(0x161),_0x4c2f2e+=_0xa28ad3(0x17d),_0x4c2f2e+=_0xa28ad3(0x165),_0x4c2f2e+=_0xa28ad3(0x152)+_0x4d2339+_0xa28ad3(0x14f)+(typeof _0xab719b==_0xa28ad3(0x193)?'@/apps/'+_0xab719b:_0xa28ad3(0x189))+'/exceptions/'+_0x13ccab+'\x27;\x0a\x0a',_0x4c2f2e+=_0xa28ad3(0x18e)+_0x4d2339+_0xa28ad3(0x175)+(typeof _0xab719b==_0xa28ad3(0x193)?_0xa28ad3(0x18f)+_0xab719b:_0xa28ad3(0x189))+_0xa28ad3(0x171)+_0x13ccab+_0xa28ad3(0x194),_0x4c2f2e+=_0xa28ad3(0x18e)+_0x4d2339+'Create\x20}\x20from\x20\x27'+(typeof _0xab719b==_0xa28ad3(0x193)?_0xa28ad3(0x18f)+_0xab719b:_0xa28ad3(0x189))+'/validator/'+_0x13ccab+_0xa28ad3(0x186),_0x4c2f2e+='import\x20{\x20'+_0x4d2339+_0xa28ad3(0x18d)+(typeof _0xab719b==_0xa28ad3(0x193)?_0xa28ad3(0x18f)+_0xab719b:'@/app')+_0xa28ad3(0x15f)+_0x13ccab+_0xa28ad3(0x15e),_0x4c2f2e+='import\x20{\x20'+_0x4d2339+_0xa28ad3(0x14d)+(typeof _0xab719b==_0xa28ad3(0x193)?_0xa28ad3(0x18f)+_0xab719b:_0xa28ad3(0x189))+_0xa28ad3(0x15f)+_0x13ccab+_0xa28ad3(0x154),_0x4c2f2e+='@Action(__filename,\x20\x27'+_0x1d3bdb+_0xa28ad3(0x181),_0x4c2f2e+=_0xa28ad3(0x199)+_0x4d2339+_0xa28ad3(0x19c),_0x4c2f2e+=_0xa28ad3(0x15d),_0x4c2f2e+=_0xa28ad3(0x18c),_0x4c2f2e+='\x20\x20\x20\x20@Inject()\x20protected\x20EventService:\x20EventService;\x0a\x0a',_0x4c2f2e+=_0xa28ad3(0x14c)+_0x4d2339+')\x20'+_0x4d2339+':\x20'+_0x4d2339+'\x0a\x0a\x0a',_0x4c2f2e+='\x20\x20\x20\x20@Api(\x27检索数据\x27)\x0a',_0x4c2f2e+=_0xa28ad3(0x178)+_0x4d2339+_0xa28ad3(0x17f),_0x4c2f2e+=_0xa28ad3(0x182)+_0x4d2339+_0xa28ad3(0x195),_0x4c2f2e+=_0xa28ad3(0x162),_0x4c2f2e+='\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x0a',_0x4c2f2e+=_0xa28ad3(0x159),_0x4c2f2e+='\x20\x20\x20\x20}\x0a\x0a\x0a',_0x4c2f2e+=_0xa28ad3(0x164),_0x4c2f2e+=_0xa28ad3(0x168)+_0x4d2339+_0xa28ad3(0x192),_0x4c2f2e+=_0xa28ad3(0x173)+_0x4d2339+'.save(params)\x0a',_0x4c2f2e+=_0xa28ad3(0x160),_0x4c2f2e+=_0xa28ad3(0x196),_0x4c2f2e+=_0xa28ad3(0x16e)+_0x5d4952[_0xa28ad3(0x176)]+'\x27)\x0a',_0x4c2f2e+=_0xa28ad3(0x19b)+_0x5d4952[_0xa28ad3(0x176)]+_0xa28ad3(0x17c)+_0x4d2339+'Update)\x20{\x0a',_0x4c2f2e+=_0xa28ad3(0x173)+_0x4d2339+_0xa28ad3(0x17e)+_0x5d4952[_0xa28ad3(0x176)]+_0xa28ad3(0x14e),_0x4c2f2e+=_0xa28ad3(0x18b),_0x4c2f2e+=_0xa28ad3(0x191),_0x4c2f2e+='\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a',_0x4c2f2e+=_0xa28ad3(0x14b),_0x4c2f2e+=_0xa28ad3(0x188)+_0x4d2339+'.mergeSave(tmpModel,\x20params)\x0a',_0x4c2f2e+=_0xa28ad3(0x170),_0x4c2f2e+='\x20\x20\x20\x20}\x0a\x0a\x0a',_0x4c2f2e+='\x20\x20\x20\x20@Api(\x27数据详情\x27,\x20\x27get\x27,\x20\x27/:'+_0x5d4952[_0xa28ad3(0x176)]+_0xa28ad3(0x181),_0x4c2f2e+=_0xa28ad3(0x158)+_0x5d4952[_0xa28ad3(0x176)]+_0xa28ad3(0x155),_0x4c2f2e+='\x20\x20\x20\x20\x20\x20\x20\x20const\x20tmpModel\x20=\x20await\x20this.'+_0x4d2339+_0xa28ad3(0x17e)+_0x5d4952['Field']+_0xa28ad3(0x14e),_0x4c2f2e+=_0xa28ad3(0x18b),_0x4c2f2e+=_0xa28ad3(0x191),_0x4c2f2e+=_0xa28ad3(0x190),_0x4c2f2e+=_0xa28ad3(0x14b),_0x4c2f2e+='\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(tmpModel);\x0a',_0x4c2f2e+='\x20\x20\x20\x20}\x0a\x0a\x0a',_0x4c2f2e+=_0xa28ad3(0x187)+_0x5d4952[_0xa28ad3(0x176)]+'\x27)\x0a',_0x4c2f2e+=_0xa28ad3(0x15c)+_0x5d4952[_0xa28ad3(0x176)]+_0xa28ad3(0x184),_0x4c2f2e+='\x20\x20\x20\x20\x20\x20\x20\x20const\x20deletes:\x20any\x20=\x20[],\x20tmpModels\x20=\x20await\x20this.'+_0x4d2339+'.search().then(async\x20search\x20=>\x20{\x0a\x0a',_0x4c2f2e+='\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20search.andWhereInIds(id.split(\x27,\x27)).getMany();\x0a',_0x4c2f2e+=_0xa28ad3(0x17b),_0x4c2f2e+=_0xa28ad3(0x15b),_0x4c2f2e+=_0xa28ad3(0x156)+(_0xab719b?_0xab719b+':':'')+_0x4d2339+_0xa28ad3(0x166),_0x4c2f2e+=_0xa28ad3(0x16c)+_0x4d2339+_0xa28ad3(0x167),_0x4c2f2e+=_0xa28ad3(0x198),_0x4c2f2e+=_0xa28ad3(0x177),_0x4c2f2e+='\x20\x20\x20\x20}\x0a\x0a\x0a',_0x4c2f2e+='}',!fs['existsSync']((0x0,path_1[_0xa28ad3(0x179)])(_0x2bbfdf))&&fs[_0xa28ad3(0x16b)]((0x0,path_1['dirname'])(_0x2bbfdf),{'recursive':!![]}),fs['writeFileSync'](_0x2bbfdf,_0x4c2f2e,_0xa28ad3(0x174));}}}function a4_0x33e3(_0x58865b,_0x2c686c){const _0x4e4af3=a4_0x4e4a();return a4_0x33e3=function(_0x33e36f,_0x3085d5){_0x33e36f=_0x33e36f-0x14b;let _0x12df69=_0x4e4af3[_0x33e36f];return _0x12df69;},a4_0x33e3(_0x58865b,_0x2c686c);}exports['default']=default_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';const a5_0x583ab5=a5_0x1c3d;(function(_0x189b21,_0x15bc08){const _0x2c91e=a5_0x1c3d,_0x5c689b=_0x189b21();while(!![]){try{const _0x494b48=-parseInt(_0x2c91e(0x18b))/0x1+parseInt(_0x2c91e(0x193))/0x2*(-parseInt(_0x2c91e(0x18c))/0x3)+-parseInt(_0x2c91e(0x187))/0x4*(-parseInt(_0x2c91e(0x17a))/0x5)+-parseInt(_0x2c91e(0x184))/0x6+parseInt(_0x2c91e(0x17c))/0x7*(-parseInt(_0x2c91e(0x195))/0x8)+-parseInt(_0x2c91e(0x181))/0x9+parseInt(_0x2c91e(0x18f))/0xa;if(_0x494b48===_0x15bc08)break;else _0x5c689b['push'](_0x5c689b['shift']());}catch(_0xbbc115){_0x5c689b['push'](_0x5c689b['shift']());}}}(a5_0x2902,0x41a12));Object['defineProperty'](exports,a5_0x583ab5(0x189),{'value':!![]});function a5_0x1c3d(_0x1670ad,_0x153193){const _0x2902b7=a5_0x2902();return a5_0x1c3d=function(_0x1c3d0a,_0xff15ac){_0x1c3d0a=_0x1c3d0a-0x179;let _0xc8b2ef=_0x2902b7[_0x1c3d0a];return _0xc8b2ef;},a5_0x1c3d(_0x1670ad,_0x153193);}const fs=require('fs'),path=require(a5_0x583ab5(0x185));async function default_1({tablestartUp:_0x5a7b00,tablestartUpShort:_0x35955b,basedir:_0x301ba0,Comment:_0x5872f1}){await entity_emum({'tablestartUp':_0x5a7b00,'tablestartUpShort':_0x35955b,'basedir':_0x301ba0,'Comment':_0x5872f1}),await entity_exceptions({'tablestartUp':_0x5a7b00,'tablestartUpShort':_0x35955b,'basedir':_0x301ba0,'Comment':_0x5872f1});}exports['default']=default_1;async function entity_emum({tablestartUp:_0xbcdcf,tablestartUpShort:_0x472e6c,basedir:_0x4be33b,Comment:_0x3bab38}){const _0x47115a=a5_0x583ab5,_0xd01747=_0x4be33b+(_0x47115a(0x18d)+_0x472e6c+_0x47115a(0x18a));if(!fs[_0x47115a(0x196)](_0xd01747)){let _0x256fb9='';_0x256fb9+=_0x47115a(0x17b),_0x256fb9+=_0x47115a(0x182)+_0x3bab38+_0x47115a(0x17d),_0x256fb9+=_0x47115a(0x190),_0x256fb9+=_0x47115a(0x17e)+_0xbcdcf+_0x47115a(0x192),_0x256fb9+=_0x47115a(0x194),_0x256fb9+=_0x47115a(0x180),_0x256fb9+='\x20\x20\x20\x20//\x20@AnnEnumMsg(\x27status\x27,\x20\x27关闭\x27)\x0a',_0x256fb9+=_0x47115a(0x18e),_0x256fb9+='}',!fs[_0x47115a(0x196)](path[_0x47115a(0x179)](_0xd01747))&&fs[_0x47115a(0x17f)](path[_0x47115a(0x179)](_0xd01747),{'recursive':!![]}),fs['writeFileSync'](_0xd01747,_0x256fb9,_0x47115a(0x183));}}async function entity_exceptions({tablestartUp:_0x45a274,tablestartUpShort:_0xe3e78d,basedir:_0x47a53a,Comment:_0x8ca0ce}){const _0x55de26=a5_0x583ab5,_0x16a409=_0x47a53a+(_0x55de26(0x188)+_0xe3e78d+'.ts');if(!fs[_0x55de26(0x196)](_0x16a409)){let _0x5fd666='';_0x5fd666+=_0x55de26(0x17b),_0x5fd666+=_0x55de26(0x182)+_0x8ca0ce+_0x55de26(0x191),_0x5fd666+='\x20*\x20**/\x0a',_0x5fd666+=_0x55de26(0x17e)+_0x45a274+'Error\x20{\x0a\x0a',_0x5fd666+='\x20\x20\x20\x20//\x20@AnnErrorMsg(\x27数据不存在\x27)\x0a',_0x5fd666+=_0x55de26(0x186),_0x5fd666+='}',!fs[_0x55de26(0x196)](path[_0x55de26(0x179)](_0x16a409))&&fs[_0x55de26(0x17f)](path[_0x55de26(0x179)](_0x16a409),{'recursive':!![]}),fs['writeFileSync'](_0x16a409,_0x5fd666,_0x55de26(0x183));}}function a5_0x2902(){const _0x3766e6=['3317481QJhpuq','\x20*\x20','utf-8','3099312tWtqbY','path','\x20\x20\x20\x20//\x20static\x20readonly\x20DEMO_NOT_FIND\x20=\x20200001;\x0a\x0a','92836jflYaH','/exceptions/','__esModule','/enum.ts','93916hIaFPY','1632ZpiyCw','/entities/','\x20\x20\x20\x20//\x20static\x20readonly\x20DEMO_STATUS_OFF:\x20string\x20=\x20\x270\x27;\x0a\x0a','19651990zdvSqg','\x20*\x20**/\x0a','-错误信息设置\x0a','Enum\x20{\x0a\x0a','1356LKlLVH','\x20\x20\x20\x20//\x20@AnnEnumMsg(\x27status\x27,\x20\x27开启\x27)\x0a','16bkZmEV','existsSync','dirname','10cmuKMN','/**\x0a','1382115pUcAbk','-常量设置\x0a','export\x20class\x20','mkdirSync','\x20\x20\x20\x20//\x20static\x20readonly\x20DEMO_STATUS_ON:\x20number\x20=\x201;\x0a\x0a'];a5_0x2902=function(){return _0x3766e6;};return a5_0x2902();}
|