anncic-apihelper 1.0.6 → 1.0.7
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.js +1 -1
- package/dist/templateFun/Entify.js +1 -1
- package/dist/templateFun/Entities.js +1 -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.js +1 -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_0x43746f=a0_0x26e9;function a0_0x26e9(_0x182e1b,_0x4c796b){var _0x36e93a=a0_0x36e9();return a0_0x26e9=function(_0x26e9c6,_0x4e2f83){_0x26e9c6=_0x26e9c6-0xc7;var _0x57ea7d=_0x36e93a[_0x26e9c6];return _0x57ea7d;},a0_0x26e9(_0x182e1b,_0x4c796b);}(function(_0x1eb754,_0x4f395b){var _0x4ddf1d=a0_0x26e9,_0x2e8669=_0x1eb754();while(!![]){try{var _0x28160e=parseInt(_0x4ddf1d(0xd0))/0x1+parseInt(_0x4ddf1d(0xdb))/0x2*(parseInt(_0x4ddf1d(0xd7))/0x3)+-parseInt(_0x4ddf1d(0xcd))/0x4*(-parseInt(_0x4ddf1d(0xc9))/0x5)+parseInt(_0x4ddf1d(0xe3))/0x6+-parseInt(_0x4ddf1d(0xcb))/0x7+-parseInt(_0x4ddf1d(0xe0))/0x8+parseInt(_0x4ddf1d(0xdc))/0x9*(parseInt(_0x4ddf1d(0xce))/0xa);if(_0x28160e===_0x4f395b)break;else _0x2e8669['push'](_0x2e8669['shift']());}catch(_0x7afc8f){_0x2e8669['push'](_0x2e8669['shift']());}}}(a0_0x36e9,0xd7040));var __decorate=this&&this[a0_0x43746f(0xde)]||function(_0x525c61,_0x34ee86,_0x3b6849,_0x4a972f){var _0x45c173=a0_0x43746f,_0x20471a=arguments[_0x45c173(0xe1)],_0x1191ca=_0x20471a<0x3?_0x34ee86:_0x4a972f===null?_0x4a972f=Object['getOwnPropertyDescriptor'](_0x34ee86,_0x3b6849):_0x4a972f,_0x5213c4;if(typeof Reflect==='object'&&typeof Reflect[_0x45c173(0xc8)]==='function')_0x1191ca=Reflect[_0x45c173(0xc8)](_0x525c61,_0x34ee86,_0x3b6849,_0x4a972f);else{for(var _0x1f5eaa=_0x525c61['length']-0x1;_0x1f5eaa>=0x0;_0x1f5eaa--)if(_0x5213c4=_0x525c61[_0x1f5eaa])_0x1191ca=(_0x20471a<0x3?_0x5213c4(_0x1191ca):_0x20471a>0x3?_0x5213c4(_0x34ee86,_0x3b6849,_0x1191ca):_0x5213c4(_0x34ee86,_0x3b6849))||_0x1191ca;}return _0x20471a>0x3&&_0x1191ca&&Object['defineProperty'](_0x34ee86,_0x3b6849,_0x1191ca),_0x1191ca;},__metadata=this&&this[a0_0x43746f(0xcc)]||function(_0x3b7fb2,_0x5d04da){var _0x528569=a0_0x43746f;if(typeof Reflect===_0x528569(0xc7)&&typeof Reflect[_0x528569(0xe4)]==='function')return Reflect[_0x528569(0xe4)](_0x3b7fb2,_0x5d04da);};Object[a0_0x43746f(0xe2)](exports,a0_0x43746f(0xd8),{'value':!![]}),exports[a0_0x43746f(0xda)]=void 0x0;const decorator_1=require(a0_0x43746f(0xcf)),core_1=require(a0_0x43746f(0xd3)),typeorm=require(a0_0x43746f(0xdd));let CustomConfiguration=class CustomConfiguration{};function a0_0x36e9(){var _0x232aad=['__esModule','decorator','CustomConfiguration','10580PVkUHl','2705949AatNhn','@anncic-api/typeorm','__decorate','MidwayDecoratorService','11086720cPmOUb','length','defineProperty','4383720fPdxfl','metadata','object','decorate','15lcWlwL','Inject','11684225EpzgZu','__metadata','1323832FFMyNW','10DjkSlJ','@midwayjs/decorator','446234KhyaJW','MidwayApplicationManager','MidwayConfigService','@midwayjs/core','config','design:type','prototype','831OGyPiG'];a0_0x36e9=function(){return _0x232aad;};return a0_0x36e9();}__decorate([(0x0,decorator_1['Inject'])(),__metadata('design:type',core_1[a0_0x43746f(0xd2)])],CustomConfiguration[a0_0x43746f(0xd6)],a0_0x43746f(0xd4),void 0x0),__decorate([(0x0,decorator_1[a0_0x43746f(0xca)])(),__metadata(a0_0x43746f(0xd5),core_1[a0_0x43746f(0xdf)])],CustomConfiguration['prototype'],a0_0x43746f(0xd9),void 0x0),__decorate([(0x0,decorator_1[a0_0x43746f(0xca)])(),__metadata('design:type',core_1[a0_0x43746f(0xd1)])],CustomConfiguration[a0_0x43746f(0xd6)],'application',void 0x0),CustomConfiguration=__decorate([(0x0,decorator_1['Configuration'])({'conflictCheck':![],'imports':[typeorm],'namespace':'anncic-apihelper'})],CustomConfiguration),exports[a0_0x43746f(0xda)]=CustomConfiguration;
|
package/dist/helper.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a1_0x50f8(_0x487058,_0x1bf18f){const _0x1b3561=a1_0x1b35();return a1_0x50f8=function(_0x50f86a,_0x467628){_0x50f86a=_0x50f86a-0x112;let _0x3f0146=_0x1b3561[_0x50f86a];return _0x3f0146;},a1_0x50f8(_0x487058,_0x1bf18f);}const a1_0x300be9=a1_0x50f8;(function(_0x2aa0fb,_0x3cc52b){const _0xe02bd1=a1_0x50f8,_0x4c0f68=_0x2aa0fb();while(!![]){try{const _0xab3af9=parseInt(_0xe02bd1(0x127))/0x1*(parseInt(_0xe02bd1(0x116))/0x2)+-parseInt(_0xe02bd1(0x114))/0x3*(-parseInt(_0xe02bd1(0x117))/0x4)+parseInt(_0xe02bd1(0x11f))/0x5+-parseInt(_0xe02bd1(0x113))/0x6*(parseInt(_0xe02bd1(0x122))/0x7)+-parseInt(_0xe02bd1(0x129))/0x8+-parseInt(_0xe02bd1(0x121))/0x9*(parseInt(_0xe02bd1(0x12d))/0xa)+parseInt(_0xe02bd1(0x11a))/0xb*(parseInt(_0xe02bd1(0x128))/0xc);if(_0xab3af9===_0x3cc52b)break;else _0x4c0f68['push'](_0x4c0f68['shift']());}catch(_0x5581d8){_0x4c0f68['push'](_0x4c0f68['shift']());}}}(a1_0x1b35,0x234d2));Object['defineProperty'](exports,'__esModule',{'value':!![]}),exports[a1_0x300be9(0x119)]=exports[a1_0x300be9(0x12b)]=void 0x0;const columnTypes={'json':a1_0x300be9(0x12e),'char':a1_0x300be9(0x12a),'varchar':a1_0x300be9(0x12a),'text':a1_0x300be9(0x11b),'longtext':a1_0x300be9(0x11e),'mediumtext':a1_0x300be9(0x12f),'int':a1_0x300be9(0x123),'float':a1_0x300be9(0x12c),'double':'float','decimal':a1_0x300be9(0x11d),'date':a1_0x300be9(0x125),'time':a1_0x300be9(0x118),'datetime':a1_0x300be9(0x118),'timestamp':'timestamp','tinyint':a1_0x300be9(0x123)};function a1_0x1b35(){const _0x598c08=['3809172cvMTVj','1283416haUtnT','string','getProp','float','470rfDSlD','json','mediumtext','split','145254ROTzoS','105051wWFLuw','enum','20642HxlAAT','20rHQirK','datetime','getEnum','11iDoOxQ','text','substr','decimal','longtext','818895IAaVaD','length','41427yWByYr','42ocqAEf','number','hasOwnProperty','date','indexOf','1LfJnFi'];a1_0x1b35=function(){return _0x598c08;};return a1_0x1b35();}function getProp(_0x30462f){const _0x344a4b=a1_0x300be9;if(columnTypes[_0x344a4b(0x124)](_0x30462f))return columnTypes[_0x30462f];else return _0x30462f['indexOf']('(')>-0x1||_0x30462f[_0x344a4b(0x126)]('\x20')>-0x1?(_0x30462f=_0x30462f[_0x344a4b(0x11c)](0x0,_0x30462f[_0x344a4b(0x126)]('(')>-0x1?_0x30462f[_0x344a4b(0x126)]('('):_0x30462f['indexOf']('\x20')),columnTypes[_0x30462f]||_0x30462f):_0x344a4b(0x12a);}exports[a1_0x300be9(0x12b)]=getProp;function getEnum(_0x53fca1){const _0x1c72d2=a1_0x300be9;if(getProp(_0x53fca1)==_0x1c72d2(0x115))return _0x53fca1[_0x1c72d2(0x11c)](0x5,_0x53fca1[_0x1c72d2(0x120)]-0x6)['replace'](/[\'|\"]/g,'')[_0x1c72d2(0x112)](',');return[];}exports[a1_0x300be9(0x119)]=getEnum;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';function a2_0x4fdc(){var _0x466f81=['CustomConfiguration','defineProperty','2534985EgWnpM','4OFeQEK','2151710iHecVV','__esModule','./service/ApicreateService','Configuration','ApicreateService','56824ZixZbi','525ltsSuS','10axHLWR','74433tNrzWg','12912730uMilah','598101HPVQrp','1862448HnsiWN','./configuration'];a2_0x4fdc=function(){return _0x466f81;};return a2_0x4fdc();}var a2_0x3de3b1=a2_0x203d;(function(_0x3846ee,_0x521104){var _0x1a3d15=a2_0x203d,_0x1a5724=_0x3846ee();while(!![]){try{var _0x447ef9=parseInt(_0x1a3d15(0x14f))/0x1+-parseInt(_0x1a3d15(0x14c))/0x2*(-parseInt(_0x1a3d15(0x14d))/0x3)+parseInt(_0x1a3d15(0x144))/0x4*(-parseInt(_0x1a3d15(0x145))/0x5)+-parseInt(_0x1a3d15(0x13f))/0x6+parseInt(_0x1a3d15(0x14b))/0x7*(-parseInt(_0x1a3d15(0x14a))/0x8)+-parseInt(_0x1a3d15(0x143))/0x9+parseInt(_0x1a3d15(0x14e))/0xa;if(_0x447ef9===_0x521104)break;else _0x1a5724['push'](_0x1a5724['shift']());}catch(_0x58aa88){_0x1a5724['push'](_0x1a5724['shift']());}}}(a2_0x4fdc,0x6fe31));Object['defineProperty'](exports,a2_0x3de3b1(0x146),{'value':!![]}),exports[a2_0x3de3b1(0x148)]=exports[a2_0x3de3b1(0x149)]=void 0x0;function a2_0x203d(_0x3277df,_0x408edb){var _0x4fdc79=a2_0x4fdc();return a2_0x203d=function(_0x203d60,_0x463fda){_0x203d60=_0x203d60-0x13f;var _0x486f14=_0x4fdc79[_0x203d60];return _0x486f14;},a2_0x203d(_0x3277df,_0x408edb);}var ApicreateService_1=require(a2_0x3de3b1(0x147));Object['defineProperty'](exports,'ApicreateService',{'enumerable':!![],'get':function(){var _0x4f282b=a2_0x3de3b1;return ApicreateService_1[_0x4f282b(0x149)];}});var configuration_1=require(a2_0x3de3b1(0x140));Object[a2_0x3de3b1(0x142)](exports,a2_0x3de3b1(0x148),{'enumerable':!![],'get':function(){var _0x20fe27=a2_0x3de3b1;return configuration_1[_0x20fe27(0x141)];}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
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 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a4_0x33c7fc=a4_0x4ed7;(function(_0x18578c,_0x405b41){const _0x3b1aed=a4_0x4ed7,_0x93e6f0=_0x18578c();while(!![]){try{const _0x3e4faf=parseInt(_0x3b1aed(0x13a))/0x1+parseInt(_0x3b1aed(0x143))/0x2*(-parseInt(_0x3b1aed(0x16c))/0x3)+parseInt(_0x3b1aed(0x168))/0x4*(-parseInt(_0x3b1aed(0x167))/0x5)+parseInt(_0x3b1aed(0x135))/0x6*(-parseInt(_0x3b1aed(0x140))/0x7)+parseInt(_0x3b1aed(0x152))/0x8+parseInt(_0x3b1aed(0x171))/0x9*(-parseInt(_0x3b1aed(0x17b))/0xa)+parseInt(_0x3b1aed(0x16a))/0xb*(parseInt(_0x3b1aed(0x15b))/0xc);if(_0x3e4faf===_0x405b41)break;else _0x93e6f0['push'](_0x93e6f0['shift']());}catch(_0x538d08){_0x93e6f0['push'](_0x93e6f0['shift']());}}}(a4_0x29c0,0xce8c1));function a4_0x29c0(){const _0x4165d1=['30SVkEwg','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(tmpModel);\x0a','validator/','\x20\x20\x20\x20\x20\x20\x20\x20}\x0a','\x20\x20\x20\x20@Api(\x22删除数据\x22,\x20\x27del\x27,\x20\x27/:','defineProperty','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(deletes);\x0a','\x20\x20\x20\x20\x20\x20\x20\x20const\x20deletes:\x20any\x20=\x20[],\x20tmpModels\x20=\x20await\x20this.','import\x20{\x20Action,\x20Api\x20}\x20from\x20\x27anncic-api\x27\x0a','.save(params)\x0a','\x20\x20\x20\x20}\x0a\x0a\x0a','24enFpNJ','\x20\x20\x20\x20@Inject()\x20protected\x20EventService:\x20EventService;\x0a\x0a',':\x20number)\x20{\x0a','\x20\x20\x20\x20@Api(\x27检索数据\x27)\x0a','.search().then(async\x20search\x20=>\x20{\x0a\x0a','975922scabeC','\x20\x20\x20\x20\x20\x20\x20\x20const\x20savemodel\x20=\x20await\x20this.','Update\x20}\x20from\x20\x27../','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20await\x20this.EventService.emit(\x27','utf-8','\x20\x20\x20\x20async\x20detail(','2745505GcwTWR','\x20\x20\x20\x20async\x20update(','/Search\x27;\x0a\x0a\x0a','21402NDGCHB','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20search.getManyAndCount();\x0a','\x20\x20\x20\x20async\x20remove(','.softRemove(tmpModel))\x0a','\x27)\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20search.andWhereInIds(id.split(\x27,\x27)).getMany();\x0a','default','/repository\x27;\x0a','\x0a\x0a\x0a','/Update\x27;\x0a','\x20\x20\x20\x20async\x20index(params:\x20',':\x20string)\x20{\x0a',':\x20number,\x20params:\x20','/Create\x27;\x0a','\x20\x20\x20\x20@Api(\x27修改数据\x27,\x20\x27put\x27,\x20\x27/:','9908424mSBhNQ','\x20\x20\x20\x20@Api(\x27添加数据\x27,\x20\x27post\x27)\x0a','path','Create\x20}\x20from\x20\x27../','import\x20{\x20PageDTO,\x20CacheService,\x20EventService\x20}\x20from\x20\x27anncic-api\x27;\x0a\x0a','import\x20{\x20Context\x20}\x20from\x20\x27@midwayjs/koa\x27\x0a','\x20}).then(async\x20search\x20=>\x20{\x0a\x0a','dirname','Update)\x20{\x0a','1263336CAAQAN','__esModule','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(pagelist,\x20{\x20pageinfo,\x20pagetotal\x20});\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20});\x0a','Create)\x20{\x0a','import\x20{\x20','\x20\x20\x20\x20\x20\x20\x20\x20const\x20[pagelist,\x20pagetotal]\x20=\x20await\x20this.','}\x0a\x0a','string','\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x0a','Field','../','5481100TcPCLq','4RmaVeq','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20deletes.push(await\x20this.','253XHalwp','writeFileSync','9whNQfn','Search,\x20pageinfo:\x20PageDTO)\x20{\x0a','existsSync','.ts','\x20\x20\x20\x20\x20\x20\x20\x20return\x20this.ctx.ok(savemodel);\x0a','3278007asGMrS','\x20\x20\x20\x20@InjectRepository(','\x20\x20\x20\x20\x20\x20\x20\x20})\x0a\x0a','\x20\x20\x20\x20async\x20create(params:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20search.getOneOrFail().catch(()\x20=>\x20{\x0a','/controller/','.search({\x20','\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','entities/','@Action(__filename,\x20\x27'];a4_0x29c0=function(){return _0x4165d1;};return a4_0x29c0();}Object[a4_0x33c7fc(0x180)](exports,a4_0x33c7fc(0x15c),{'value':!![]});function a4_0x4ed7(_0x3631c3,_0x5ab125){const _0x29c0b3=a4_0x29c0();return a4_0x4ed7=function(_0x4ed7ef,_0x4439fd){_0x4ed7ef=_0x4ed7ef-0x135;let _0x149d4b=_0x29c0b3[_0x4ed7ef];return _0x149d4b;},a4_0x4ed7(_0x3631c3,_0x5ab125);}const fs=require('fs'),path_1=require(a4_0x33c7fc(0x154));async function default_1({controller:_0x456969,tablestartUp:_0x41de98,basedir:_0x91a68c,Primary:_0x4260c4,Comment:_0x25f0d5,moduleName:_0x5713fa}){const _0x2e0e14=a4_0x33c7fc;if(_0x456969){const _0x3d0be5=_0x91a68c+(typeof _0x456969==_0x2e0e14(0x163)?'/controller/'+_0x456969+'/'+_0x41de98+_0x2e0e14(0x16f):_0x2e0e14(0x176)+_0x41de98+_0x2e0e14(0x16f));if(!fs[_0x2e0e14(0x16e)](_0x3d0be5)){let _0x849035='';_0x849035+=_0x2e0e14(0x157),_0x849035+=_0x2e0e14(0x183),_0x849035+='import\x20{\x20Inject,\x20InjectRepository\x20}\x20from\x20\x27@anncic-api/typeorm\x27;\x0a',_0x849035+=_0x2e0e14(0x156),_0x849035+='import\x20{\x20'+_0x41de98+'\x20}\x20from\x20\x27../'+(typeof _0x456969==_0x2e0e14(0x163)?_0x2e0e14(0x166):'')+_0x2e0e14(0x179)+_0x41de98+_0x2e0e14(0x14a),_0x849035+=_0x2e0e14(0x160)+_0x41de98+_0x2e0e14(0x155)+(typeof _0x456969=='string'?_0x2e0e14(0x166):'')+'validator/'+_0x41de98+_0x2e0e14(0x150),_0x849035+=_0x2e0e14(0x160)+_0x41de98+_0x2e0e14(0x13c)+(typeof _0x456969=='string'?_0x2e0e14(0x166):'')+_0x2e0e14(0x17d)+_0x41de98+_0x2e0e14(0x14c),_0x849035+=_0x2e0e14(0x160)+_0x41de98+'Search\x20}\x20from\x20\x27../'+(typeof _0x456969==_0x2e0e14(0x163)?_0x2e0e14(0x166):'')+_0x2e0e14(0x17d)+_0x41de98+_0x2e0e14(0x142),_0x849035+=_0x2e0e14(0x17a)+_0x25f0d5+_0x2e0e14(0x147),_0x849035+='export\x20class\x20'+_0x41de98+'Controller\x20{\x0a\x0a',_0x849035+='\x20\x20\x20\x20@Inject()\x20protected\x20ctx:\x20Context;\x0a',_0x849035+='\x20\x20\x20\x20@Inject()\x20protected\x20CacheService:\x20CacheService;\x0a',_0x849035+=_0x2e0e14(0x136),_0x849035+=_0x2e0e14(0x172)+_0x41de98+')\x20'+_0x41de98+':\x20'+_0x41de98+_0x2e0e14(0x14b),_0x849035+=_0x2e0e14(0x138),_0x849035+=_0x2e0e14(0x14d)+_0x41de98+_0x2e0e14(0x16d),_0x849035+=_0x2e0e14(0x161)+_0x41de98+'.search(params,\x20pageinfo).then(async\x20search\x20=>\x20{\x0a\x0a',_0x849035+=_0x2e0e14(0x144),_0x849035+=_0x2e0e14(0x164),_0x849035+=_0x2e0e14(0x15d),_0x849035+='\x20\x20\x20\x20}\x0a\x0a\x0a',_0x849035+=_0x2e0e14(0x153),_0x849035+=_0x2e0e14(0x174)+_0x41de98+_0x2e0e14(0x15f),_0x849035+='\x20\x20\x20\x20\x20\x20\x20\x20const\x20tmpModel\x20=\x20await\x20this.'+_0x41de98+_0x2e0e14(0x184),_0x849035+=_0x2e0e14(0x17c),_0x849035+=_0x2e0e14(0x185),_0x849035+=_0x2e0e14(0x151)+_0x4260c4[_0x2e0e14(0x165)]+'\x27)\x0a',_0x849035+=_0x2e0e14(0x141)+_0x4260c4[_0x2e0e14(0x165)]+_0x2e0e14(0x14f)+_0x41de98+_0x2e0e14(0x15a),_0x849035+='\x20\x20\x20\x20\x20\x20\x20\x20const\x20tmpModel\x20=\x20await\x20this.'+_0x41de98+_0x2e0e14(0x177)+_0x4260c4[_0x2e0e14(0x165)]+_0x2e0e14(0x158),_0x849035+=_0x2e0e14(0x175),_0x849035+='\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',_0x849035+=_0x2e0e14(0x15e),_0x849035+=_0x2e0e14(0x173),_0x849035+=_0x2e0e14(0x13b)+_0x41de98+'.mergeSave(tmpModel,\x20params)\x0a',_0x849035+=_0x2e0e14(0x170),_0x849035+=_0x2e0e14(0x185),_0x849035+='\x20\x20\x20\x20@Api(\x27数据详情\x27,\x20\x27get\x27,\x20\x27/:'+_0x4260c4[_0x2e0e14(0x165)]+_0x2e0e14(0x147),_0x849035+=_0x2e0e14(0x13f)+_0x4260c4['Field']+_0x2e0e14(0x137),_0x849035+='\x20\x20\x20\x20\x20\x20\x20\x20const\x20tmpModel\x20=\x20await\x20this.'+_0x41de98+_0x2e0e14(0x177)+_0x4260c4[_0x2e0e14(0x165)]+_0x2e0e14(0x158),_0x849035+=_0x2e0e14(0x175),_0x849035+=_0x2e0e14(0x178),_0x849035+=_0x2e0e14(0x15e),_0x849035+=_0x2e0e14(0x173),_0x849035+=_0x2e0e14(0x17c),_0x849035+=_0x2e0e14(0x185),_0x849035+=_0x2e0e14(0x17f)+_0x4260c4[_0x2e0e14(0x165)]+_0x2e0e14(0x147),_0x849035+=_0x2e0e14(0x145)+_0x4260c4[_0x2e0e14(0x165)]+_0x2e0e14(0x14e),_0x849035+=_0x2e0e14(0x182)+_0x41de98+_0x2e0e14(0x139),_0x849035+=_0x2e0e14(0x148),_0x849035+='\x20\x20\x20\x20\x20\x20\x20\x20});\x0a\x0a',_0x849035+='\x20\x20\x20\x20\x20\x20\x20\x20for\x20(let\x20tmpModel\x20of\x20tmpModels)\x20{\x0a\x0a',_0x849035+=_0x2e0e14(0x13d)+(_0x5713fa?_0x5713fa+':':'')+_0x41de98+'@remove\x27,\x20tmpModel);\x0a',_0x849035+=_0x2e0e14(0x169)+_0x41de98+_0x2e0e14(0x146),_0x849035+=_0x2e0e14(0x17e),_0x849035+=_0x2e0e14(0x181),_0x849035+=_0x2e0e14(0x185),_0x849035+=_0x2e0e14(0x162),!fs[_0x2e0e14(0x16e)]((0x0,path_1['dirname'])(_0x3d0be5))&&fs['mkdirSync']((0x0,path_1[_0x2e0e14(0x159)])(_0x3d0be5),{'recursive':!![]}),fs[_0x2e0e14(0x16b)](_0x3d0be5,_0x849035,_0x2e0e14(0x13e));}}}exports[a4_0x33c7fc(0x149)]=default_1;
|