refactor: 统一协调架构 - 中央Service方法签名索引

🏗️ 架构重构:
- Coordinator构建中央Service方法签名索引(1038个方法)
- 所有Generator从索引读取,而非各自读文件
- Controller不再依赖已生成的NestJS文件

 修复:
1. Java类型映射(Integer/Long→number, String→string)
2. Controller参数智能匹配V6(Java类型感知)
3. 消除层级间的循环依赖

📊 效果: 14234 → 14121 (-113)
- Controller层: 162 → 49 (-113)
- TS2345类型错误: 115 → 2 (-113)

🔧 核心改进:
- 统一数据源,消除不一致
- 各Generator协同工作,不再各自为政
This commit is contained in:
wanwu
2025-10-29 19:55:43 +08:00
parent 1d223c88e5
commit 944034695e
54 changed files with 306 additions and 250 deletions

View File

@@ -10,6 +10,15 @@ class ControllerGenerator {
constructor(outputDir) { constructor(outputDir) {
this.namingUtils = new NamingUtils(); this.namingUtils = new NamingUtils();
this.outputDir = outputDir || ''; this.outputDir = outputDir || '';
// ✅ 中央Service方法签名索引
this.serviceMethodSignatureIndex = null;
}
/**
* ✅ 设置中央Service方法签名索引
*/
setServiceMethodSignatureIndex(index) {
this.serviceMethodSignatureIndex = index;
} }
/** /**
@@ -548,6 +557,7 @@ ${methodBody}
for (const param of serviceParams) { for (const param of serviceParams) {
const paramType = param.type; const paramType = param.type;
const paramName = param.name; const paramName = param.name;
const tsType = this.javaTypeToTsType(paramType); // ✅ Java类型转换
// 路径参数 // 路径参数
if (method.path && method.path.includes(`{${paramName}}`)) { if (method.path && method.path.includes(`{${paramName}}`)) {
@@ -661,10 +671,15 @@ ${methodBody}
} }
/** /**
* 从Service文件读取方法签名 * ✅ V2: 从中央索引读取Service方法签名不再读取文件
*/ */
readServiceMethodSignature(method, javaController) { readServiceMethodSignature(method, javaController) {
try { try {
// 如果没有索引,回退到旧逻辑
if (!this.serviceMethodSignatureIndex) {
return null;
}
// 从methodServiceCalls中获取实际调用的Service名称 // 从methodServiceCalls中获取实际调用的Service名称
const javaMethodName = method.javaMethodName; const javaMethodName = method.javaMethodName;
const methodServiceCalls = javaController.methodServiceCalls || {}; const methodServiceCalls = javaController.methodServiceCalls || {};
@@ -675,52 +690,21 @@ ${methodBody}
} }
const serviceImplName = serviceCalls[0].serviceImpl; const serviceImplName = serviceCalls[0].serviceImpl;
// 获取Service文件的相对路径
const serviceRelPath = this.findServiceFile(serviceImplName + '.service.ts');
if (!serviceRelPath) {
return null;
}
// 构造完整路径
const servicePath = path.join(this.outputDir, 'services', serviceRelPath);
if (!fs.existsSync(servicePath)) {
return null;
}
// 读取Service文件内容
const serviceContent = fs.readFileSync(servicePath, 'utf-8');
// 获取Service方法名已经在上面获取了serviceCalls
const serviceMethodName = serviceCalls[0].serviceMethod; const serviceMethodName = serviceCalls[0].serviceMethod;
// 提取方法签名async methodName(param1: Type1, param2: Type2): Promise<ReturnType> // ✅ 从中央索引查询方法签名
const methodRegex = new RegExp(`async\\s+${serviceMethodName}\\s*\\(([^)]*)\\)`, 'm'); const key = `${serviceImplName}.${serviceMethodName}`;
const match = serviceContent.match(methodRegex); const signature = this.serviceMethodSignatureIndex.get(key);
if (!match || !match[1]) { if (!signature) {
return null; return null; // 索引中没有找到
} }
const paramsString = match[1].trim(); // 返回参数列表(已经是 {name, type} 格式)
if (!paramsString) { return signature.parameters || [];
return []; // 无参数方法
}
// 解析参数列表param1: Type1, param2: Type2
const params = paramsString.split(',').map(p => {
const parts = p.trim().split(':');
if (parts.length < 2) return null;
return {
name: parts[0].trim(),
type: parts[1].trim()
};
}).filter(p => p !== null);
return params;
} catch (error) { } catch (error) {
// 读取失败返回null // 查询失败返回null
return null; return null;
} }
} }
@@ -728,11 +712,10 @@ ${methodBody}
/** /**
* 智能映射Service参数到Controller参数源 * 智能映射Service参数到Controller参数源
* *
* ✅ V5 策略(类型感知): * ✅ V6 策略(Java类型感知):
* - 路径参数paramName (string) 或 Number(paramName) (number) * - Java Integer/Long/int/long → Number(id) 或 Number(query.xxx)
* - DTO/Parambody 或 query * - Java String → query.xxx
* - 基本类型stringquery.paramName * - DTO/Param → body 或 query
* - 基本类型numberNumber(query.paramName) 或 Number(id)
*/ */
mapServiceParametersToController(serviceParams, method) { mapServiceParametersToController(serviceParams, method) {
const controllerParams = []; const controllerParams = [];
@@ -744,9 +727,12 @@ ${methodBody}
const paramType = param.type; const paramType = param.type;
const paramName = param.name; const paramName = param.name;
// ✅ 将Java类型转为TS类型用于判断
const tsType = this.javaTypeToTsType(paramType);
// 1. 路径参数:根据类型决定是否转换 // 1. 路径参数:根据类型决定是否转换
if (method.path && method.path.includes(`{${paramName}}`)) { if (method.path && method.path.includes(`{${paramName}}`)) {
if (paramType === 'number') { if (tsType === 'number') {
controllerParams.push(`Number(${paramName})`); controllerParams.push(`Number(${paramName})`);
} else { } else {
controllerParams.push(paramName); controllerParams.push(paramName);
@@ -761,11 +747,9 @@ ${methodBody}
} }
} }
// 3. 基本类型 // 3. 基本类型
else if (this.isPrimitiveParameter(paramType)) { else if (tsType === 'number' || tsType === 'string' || tsType === 'boolean') {
if (paramType === 'number') { if (tsType === 'number') {
controllerParams.push(`Number(query.${paramName})`); controllerParams.push(`Number(query.${paramName})`);
} else if (paramType === 'string') {
controllerParams.push(`query.${paramName}`);
} else { } else {
controllerParams.push(`query.${paramName}`); controllerParams.push(`query.${paramName}`);
} }
@@ -779,6 +763,33 @@ ${methodBody}
return controllerParams.join(', '); return controllerParams.join(', ');
} }
/**
* ✅ 将Java类型转换为TypeScript类型
*/
javaTypeToTsType(javaType) {
const typeMap = {
// 数字类型
'Integer': 'number',
'int': 'number',
'Long': 'number',
'long': 'number',
'Double': 'number',
'double': 'number',
'Float': 'number',
'float': 'number',
'BigDecimal': 'number',
// 字符串类型
'String': 'string',
// 布尔类型
'Boolean': 'boolean',
'boolean': 'boolean',
// 其他
'void': 'void',
'Object': 'any'
};
return typeMap[javaType] || javaType; // 未映射的保持原样
}
/** /**
* 判断是否是ID参数 * 判断是否是ID参数
*/ */

View File

@@ -26,6 +26,8 @@ class ModuleGenerator {
this.listenerGenerator = new ListenerGenerator(); this.listenerGenerator = new ListenerGenerator();
this.jobGenerator = new JobGenerator(); this.jobGenerator = new JobGenerator();
this.outputDir = ''; this.outputDir = '';
// ✅ 中央Service方法签名索引
this.serviceMethodSignatureIndex = null;
} }
/** /**
@@ -38,6 +40,15 @@ class ModuleGenerator {
this.controllerGenerator.outputDir = outputDir; // 设置ControllerGenerator的outputDir this.controllerGenerator.outputDir = outputDir; // 设置ControllerGenerator的outputDir
} }
/**
* ✅ 设置中央Service方法签名索引
*/
setServiceMethodSignatureIndex(index) {
this.serviceMethodSignatureIndex = index;
// 传递给ControllerGenerator
this.controllerGenerator.setServiceMethodSignatureIndex(index);
}
/** /**
* 清理旧的生成文件 * 清理旧的生成文件
* ✅ 修复保留已实现的Service文件 * ✅ 修复保留已实现的Service文件

View File

@@ -18,6 +18,10 @@ class JavaToNestJSMigrationCoordinator {
this.mapper = new LayerMapper(); this.mapper = new LayerMapper();
this.moduleGenerator = new ModuleGenerator(); this.moduleGenerator = new ModuleGenerator();
// ✅ 中央数据仓库Service方法签名索引
// 格式:{ 'ServiceImplName.methodName': { parameters: [...], returnType: '...' } }
this.serviceMethodSignatureIndex = new Map();
this.stats = { this.stats = {
startTime: null, startTime: null,
endTime: null, endTime: null,
@@ -79,10 +83,38 @@ class JavaToNestJSMigrationCoordinator {
this.stats.filesProcessed = Object.values(scanResults).reduce((total, arr) => total + arr.length, 0); this.stats.filesProcessed = Object.values(scanResults).reduce((total, arr) => total + arr.length, 0);
console.log(`📊 扫描完成,共处理 ${this.stats.filesProcessed} 个文件`); console.log(`📊 扫描完成,共处理 ${this.stats.filesProcessed} 个文件`);
// ✅ 构建中央Service方法签名索引
console.log('🔍 构建Service方法签名索引...');
this.buildServiceMethodSignatureIndex(scanResults.services);
console.log(`📋 索引完成,共 ${this.serviceMethodSignatureIndex.size} 个方法签名`);
// 验证扫描结果 // 验证扫描结果
this.validateScanResults(scanResults); this.validateScanResults(scanResults);
} }
/**
* ✅ 构建Service方法签名索引
* 从Java扫描结果中提取所有Service方法的参数和返回类型
*/
buildServiceMethodSignatureIndex(services) {
services.forEach(service => {
const className = service.className;
const content = service.content;
// 提取所有方法
const methods = this.scanner.extractMethods(content);
methods.forEach(method => {
const key = `${className}.${method.methodName}`;
this.serviceMethodSignatureIndex.set(key, {
parameters: method.parameters || [],
returnType: method.returnType || 'void',
methodBody: method.methodBody || ''
});
});
});
}
/** /**
* 验证扫描结果 * 验证扫描结果
*/ */
@@ -254,7 +286,9 @@ class JavaToNestJSMigrationCoordinator {
* 生成NestJS模块 * 生成NestJS模块
*/ */
async generateModules(nestJSModules) { async generateModules(nestJSModules) {
// ✅ 传递中央索引给ModuleGenerator
this.moduleGenerator.setOutputDir(this.nestJSPath); this.moduleGenerator.setOutputDir(this.nestJSPath);
this.moduleGenerator.setServiceMethodSignatureIndex(this.serviceMethodSignatureIndex);
await this.moduleGenerator.generateAllModules(nestJSModules); await this.moduleGenerator.generateAllModules(nestJSModules);
this.stats.modulesGenerated = Object.keys(nestJSModules).length; this.stats.modulesGenerated = Object.keys(nestJSModules).length;

View File

@@ -66,8 +66,8 @@ export class AddonDevelopController {
@Get('check/:key') @Get('check/:key')
@ApiOperation({ summary: '/check/{key}' }) @ApiOperation({ summary: '/check/{key}' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getCheckkey(@Param('key') key: string): Promise<Result<any>> { async getCheckkey(@Param('key') key: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.niucloudServiceImplService.checkKey(key); const result = await this.niucloudServiceImplService.checkKey(key, query);
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,8 +14,8 @@ export class AddonController {
@Get('addon/local') @Get('addon/local')
@ApiOperation({ summary: '/addon/local' }) @ApiOperation({ summary: '/addon/local' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getAddonlocal(@Query() query: Record<string, any>): Promise<Result<any>> { async getAddonlocal(): Promise<Result<any>> {
const result = await this.addonServiceImplService.getLocalAddonList(query); const result = await this.addonServiceImplService.getLocalAddonList();
return Result.success(result); return Result.success(result);
} }
@@ -95,16 +95,16 @@ export class AddonController {
@Put('addon/install/cancel/:addon') @Put('addon/install/cancel/:addon')
@ApiOperation({ summary: '/addon/install/cancel/{addon}' }) @ApiOperation({ summary: '/addon/install/cancel/{addon}' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async putAddoninstallcanceladdon(@Body() body: Record<string, any>, @Param('addon') addon: string): Promise<Result<any>> { async putAddoninstallcanceladdon(): Promise<Result<any>> {
const result = await this.addonServiceImplService.cancleInstall(body, addon); const result = await this.addonServiceImplService.cancleInstall();
return Result.success(result); return Result.success(result);
} }
@Get('addon/installtask') @Get('addon/installtask')
@ApiOperation({ summary: '/addon/installtask' }) @ApiOperation({ summary: '/addon/installtask' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getAddoninstalltask(@Query() query: Record<string, any>): Promise<Result<any>> { async getAddoninstalltask(): Promise<Result<any>> {
const result = await this.addonServiceImplService.getInstallTask(query); const result = await this.addonServiceImplService.getInstallTask();
return Result.success(result); return Result.success(result);
} }

View File

@@ -46,24 +46,24 @@ export class BackupController {
@Post('manual') @Post('manual')
@ApiOperation({ summary: '/manual' }) @ApiOperation({ summary: '/manual' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async postManual(@Body() body: Record<string, any>): Promise<Result<any>> { async postManual(): Promise<Result<any>> {
const result = await this.sysBackupRecordsServiceImplService.backup(body); const result = await this.sysBackupRecordsServiceImplService.backup();
return Result.success(result); return Result.success(result);
} }
@Get('task') @Get('task')
@ApiOperation({ summary: '/task' }) @ApiOperation({ summary: '/task' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getTask(@Query() query: Record<string, any>): Promise<Result<any>> { async getTask(): Promise<Result<any>> {
const result = await this.sysBackupRecordsServiceImplService.getBackupTask(query); const result = await this.sysBackupRecordsServiceImplService.getBackupTask();
return Result.success(result); return Result.success(result);
} }
@Get('restore_task') @Get('restore_task')
@ApiOperation({ summary: '/restore_task' }) @ApiOperation({ summary: '/restore_task' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getRestoretask(@Query() query: Record<string, any>): Promise<Result<any>> { async getRestoretask(): Promise<Result<any>> {
const result = await this.sysBackupRecordsServiceImplService.getRestoreTask(query); const result = await this.sysBackupRecordsServiceImplService.getRestoreTask();
return Result.success(result); return Result.success(result);
} }
@@ -78,8 +78,8 @@ export class BackupController {
@Post('check_permission') @Post('check_permission')
@ApiOperation({ summary: '/check_permission' }) @ApiOperation({ summary: '/check_permission' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async postCheckpermission(@Body() body: Record<string, any>): Promise<Result<any>> { async postCheckpermission(): Promise<Result<any>> {
const result = await this.sysBackupRecordsServiceImplService.checkPermission(body); const result = await this.sysBackupRecordsServiceImplService.checkPermission();
return Result.success(result); return Result.success(result);
} }
} }

View File

@@ -80,24 +80,24 @@ export class UpgradeController {
@Get('task') @Get('task')
@ApiOperation({ summary: '/task' }) @ApiOperation({ summary: '/task' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getTask(@Query() query: Record<string, any>): Promise<Result<any>> { async getTask(): Promise<Result<any>> {
const result = await this.upgradeServiceImplService.execute(query); const result = await this.upgradeServiceImplService.execute();
return Result.success(result); return Result.success(result);
} }
@Post('execute') @Post('execute')
@ApiOperation({ summary: '/execute' }) @ApiOperation({ summary: '/execute' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async postExecute(@Body() body: Record<string, any>): Promise<Result<any>> { async postExecute(): Promise<Result<any>> {
const result = await this.upgradeServiceImplService.execute(body); const result = await this.upgradeServiceImplService.execute();
return Result.success(result); return Result.success(result);
} }
@Post('clear') @Post('clear')
@ApiOperation({ summary: '/clear' }) @ApiOperation({ summary: '/clear' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async postClear(@Query() query: Record<string, any>): Promise<Result<any>> { async postClear(): Promise<Result<any>> {
const result = await this.upgradeServiceImplService.clearUpgradeTask(Number(query.delayed)); const result = await this.upgradeServiceImplService.clearUpgradeTask();
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,8 +14,8 @@ export class ConfigController {
@Get('config') @Get('config')
@ApiOperation({ summary: '/config' }) @ApiOperation({ summary: '/config' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfig(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfig(): Promise<Result<any>> {
const result = await this.aliappConfigServiceImplService.getAliappConfig(query); const result = await this.aliappConfigServiceImplService.getAliappConfig();
return Result.success(result); return Result.success(result);
} }

View File

@@ -21,7 +21,7 @@ export class AuthController {
@ApiOperation({ summary: '/authmenu' }) @ApiOperation({ summary: '/authmenu' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getAuthmenu(@Query() query: Record<string, any>): Promise<Result<any>> { async getAuthmenu(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.authServiceImplService.getAuthMenuTreeList(query.addon); const result = await this.authServiceImplService.getAuthMenuTreeList(Number(query.isTree), query.addon);
return Result.success(result); return Result.success(result);
} }
@@ -36,16 +36,16 @@ export class AuthController {
@Get('get') @Get('get')
@ApiOperation({ summary: '/get' }) @ApiOperation({ summary: '/get' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async get(@Query() query: Record<string, any>): Promise<Result<any>> { async get(): Promise<Result<any>> {
const result = await this.authServiceImplService.getAuthUserInfo(query); const result = await this.authServiceImplService.getAuthUserInfo();
return Result.success(result); return Result.success(result);
} }
@Get('tree') @Get('tree')
@ApiOperation({ summary: '/tree' }) @ApiOperation({ summary: '/tree' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getTree(@Query() query: Record<string, any>): Promise<Result<any>> { async getTree(): Promise<Result<any>> {
const result = await this.sysMenuServiceImplService.menuTree(query); const result = await this.sysMenuServiceImplService.menuTree();
return Result.success(result); return Result.success(result);
} }
@@ -60,8 +60,8 @@ export class AuthController {
@Put('logout') @Put('logout')
@ApiOperation({ summary: '/logout' }) @ApiOperation({ summary: '/logout' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async putLogout(@Body() body: Record<string, any>): Promise<Result<any>> { async putLogout(): Promise<Result<any>> {
const result = await this.loginServiceImplService.logout(body); const result = await this.loginServiceImplService.logout();
return Result.success(result); return Result.success(result);
} }
} }

View File

@@ -14,8 +14,8 @@ export class AppController {
@Get('config') @Get('config')
@ApiOperation({ summary: '/config' }) @ApiOperation({ summary: '/config' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfig(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfig(): Promise<Result<any>> {
const result = await this.adminAppServiceImplService.getAppConfig(query); const result = await this.adminAppServiceImplService.getAppConfig();
return Result.success(result); return Result.success(result);
} }

View File

@@ -15,15 +15,15 @@ export class DictController {
@ApiOperation({ summary: '/dict' }) @ApiOperation({ summary: '/dict' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getDict(@Query() query: Record<string, any>): Promise<Result<any>> { async getDict(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.dictServiceImplService.info(Number(query.id)); const result = await this.dictServiceImplService.info(query.key);
return Result.success(result); return Result.success(result);
} }
@Get('dict/:id') @Get('dict/:id')
@ApiOperation({ summary: '/dict/{id}' }) @ApiOperation({ summary: '/dict/{id}' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getDictid(@Param('id') id: string): Promise<Result<any>> { async getDictid(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.dictServiceImplService.info(Number(id)); const result = await this.dictServiceImplService.info(query.key);
return Result.success(result); return Result.success(result);
} }
@@ -31,7 +31,7 @@ export class DictController {
@ApiOperation({ summary: 'dictionary/type/{type}' }) @ApiOperation({ summary: 'dictionary/type/{type}' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getDictionarytypetype(@Query() query: Record<string, any>): Promise<Result<any>> { async getDictionarytypetype(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.dictServiceImplService.info(Number(query.id)); const result = await this.dictServiceImplService.info(query.key);
return Result.success(result); return Result.success(result);
} }
@@ -70,8 +70,8 @@ export class DictController {
@Get('all') @Get('all')
@ApiOperation({ summary: '/all' }) @ApiOperation({ summary: '/all' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getAll(@Query() query: Record<string, any>): Promise<Result<any>> { async getAll(): Promise<Result<any>> {
const result = await this.dictServiceImplService.getAll(query); const result = await this.dictServiceImplService.getAll();
return Result.success(result); return Result.success(result);
} }
} }

View File

@@ -14,8 +14,8 @@ export class ConfigController {
@Get('bottom') @Get('bottom')
@ApiOperation({ summary: '/bottom' }) @ApiOperation({ summary: '/bottom' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getBottom(@Query() query: Record<string, any>): Promise<Result<any>> { async getBottom(): Promise<Result<any>> {
const result = await this.diyConfigServiceImplService.getBottomList(query); const result = await this.diyConfigServiceImplService.getBottomList();
return Result.success(result); return Result.success(result);
} }

View File

@@ -24,8 +24,8 @@ export class DiyFormController {
@Get('form/:id') @Get('form/:id')
@ApiOperation({ summary: '/form/{id}' }) @ApiOperation({ summary: '/form/{id}' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getFormid(@Param('id') id: string): Promise<Result<any>> { async getFormid(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.getInfo(Number(id)); const result = await this.diyFormServiceImplService.getInfo(Number(query.formId));
return Result.success(result); return Result.success(result);
} }
@@ -96,8 +96,8 @@ export class DiyFormController {
@Get('form/type') @Get('form/type')
@ApiOperation({ summary: '/form/type' }) @ApiOperation({ summary: '/form/type' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getFormtype(@Query() query: Record<string, any>): Promise<Result<any>> { async getFormtype(): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.getFormType(query); const result = await this.diyFormServiceImplService.getFormType();
return Result.success(result); return Result.success(result);
} }
@@ -193,7 +193,7 @@ export class DiyFormController {
@ApiOperation({ summary: '/form/qrcode' }) @ApiOperation({ summary: '/form/qrcode' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getFormqrcode(@Query() query: Record<string, any>): Promise<Result<any>> { async getFormqrcode(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.getQrcode(query); const result = await this.diyFormServiceImplService.getQrcode(Number(query.formId));
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,8 +14,8 @@ export class DiyThemeController {
@Get('') @Get('')
@ApiOperation({ summary: '' }) @ApiOperation({ summary: '' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async get(@Query() query: Record<string, any>): Promise<Result<any>> { async get(): Promise<Result<any>> {
const result = await this.diyThemeServiceImplService.getDiyTheme(query); const result = await this.diyThemeServiceImplService.getDiyTheme();
return Result.success(result); return Result.success(result);
} }

View File

@@ -72,16 +72,16 @@ export class DiyController {
@Get('apps') @Get('apps')
@ApiOperation({ summary: '/apps' }) @ApiOperation({ summary: '/apps' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getApps(@Query() query: Record<string, any>): Promise<Result<any>> { async getApps(): Promise<Result<any>> {
const result = await this.diyServiceImplService.getLink(query); const result = await this.diyServiceImplService.getLink();
return Result.success(result); return Result.success(result);
} }
@Get('link') @Get('link')
@ApiOperation({ summary: '/link' }) @ApiOperation({ summary: '/link' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getLink(@Query() query: Record<string, any>): Promise<Result<any>> { async getLink(): Promise<Result<any>> {
const result = await this.diyServiceImplService.getLink(query); const result = await this.diyServiceImplService.getLink();
return Result.success(result); return Result.success(result);
} }

View File

@@ -38,8 +38,8 @@ export class SiteController {
@Get('site/group') @Get('site/group')
@ApiOperation({ summary: '/site/group' }) @ApiOperation({ summary: '/site/group' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getSitegroup(@Query() query: Record<string, any>): Promise<Result<any>> { async getSitegroup(): Promise<Result<any>> {
const result = await this.authSiteServiceImplService.getSiteGroup(query); const result = await this.authSiteServiceImplService.getSiteGroup();
return Result.success(result); return Result.success(result);
} }

View File

@@ -12,8 +12,8 @@ export class ConfigController {
@Get('login') @Get('login')
@ApiOperation({ summary: '/login' }) @ApiOperation({ summary: '/login' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getLogin(@Query() query: Record<string, any>): Promise<Result<any>> { async getLogin(): Promise<Result<any>> {
const result = await this.configServiceImplService.getLoginConfig(query); const result = await this.configServiceImplService.getLoginConfig();
return Result.success(result); return Result.success(result);
} }

View File

@@ -23,8 +23,8 @@ export class LoginController {
@Get('config') @Get('config')
@ApiOperation({ summary: 'config' }) @ApiOperation({ summary: 'config' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfig(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfig(): Promise<Result<any>> {
const result = await this.configServiceImplService.getLoginConfig(query); const result = await this.configServiceImplService.getLoginConfig();
return Result.success(result); return Result.success(result);
} }
} }

View File

@@ -78,8 +78,8 @@ export class MemberCashOutController {
@Get('stat') @Get('stat')
@ApiOperation({ summary: '/stat' }) @ApiOperation({ summary: '/stat' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getStat(@Query() query: Record<string, any>): Promise<Result<any>> { async getStat(): Promise<Result<any>> {
const result = await this.memberCashOutServiceImplService.stat(query); const result = await this.memberCashOutServiceImplService.stat();
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,8 +14,8 @@ export class MemberConfigController {
@Get('login') @Get('login')
@ApiOperation({ summary: '/login' }) @ApiOperation({ summary: '/login' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getLogin(@Query() query: Record<string, any>): Promise<Result<any>> { async getLogin(): Promise<Result<any>> {
const result = await this.memberConfigServiceImplService.getLoginConfig(query); const result = await this.memberConfigServiceImplService.getLoginConfig();
return Result.success(result); return Result.success(result);
} }
@@ -30,8 +30,8 @@ export class MemberConfigController {
@Get('cash_out') @Get('cash_out')
@ApiOperation({ summary: '/cash_out' }) @ApiOperation({ summary: '/cash_out' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getCashout(@Query() query: Record<string, any>): Promise<Result<any>> { async getCashout(): Promise<Result<any>> {
const result = await this.memberConfigServiceImplService.getCashOutConfig(query); const result = await this.memberConfigServiceImplService.getCashOutConfig();
return Result.success(result); return Result.success(result);
} }
@@ -46,8 +46,8 @@ export class MemberConfigController {
@Get('member') @Get('member')
@ApiOperation({ summary: '/member' }) @ApiOperation({ summary: '/member' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getMember(@Query() query: Record<string, any>): Promise<Result<any>> { async getMember(): Promise<Result<any>> {
const result = await this.memberConfigServiceImplService.getMemberConfig(query); const result = await this.memberConfigServiceImplService.getMemberConfig();
return Result.success(result); return Result.success(result);
} }
@@ -62,8 +62,8 @@ export class MemberConfigController {
@Get('growth_rule') @Get('growth_rule')
@ApiOperation({ summary: '/growth_rule' }) @ApiOperation({ summary: '/growth_rule' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getGrowthrule(@Query() query: Record<string, any>): Promise<Result<any>> { async getGrowthrule(): Promise<Result<any>> {
const result = await this.memberConfigServiceImplService.getGrowthRuleConfig(query); const result = await this.memberConfigServiceImplService.getGrowthRuleConfig();
return Result.success(result); return Result.success(result);
} }
@@ -78,8 +78,8 @@ export class MemberConfigController {
@Get('point_rule') @Get('point_rule')
@ApiOperation({ summary: '/point_rule' }) @ApiOperation({ summary: '/point_rule' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getPointrule(@Query() query: Record<string, any>): Promise<Result<any>> { async getPointrule(): Promise<Result<any>> {
const result = await this.memberConfigServiceImplService.getPointRuleConfig(query); const result = await this.memberConfigServiceImplService.getPointRuleConfig();
return Result.success(result); return Result.success(result);
} }

View File

@@ -54,8 +54,8 @@ export class MemberLabelController {
@Get('label/all') @Get('label/all')
@ApiOperation({ summary: '/label/all' }) @ApiOperation({ summary: '/label/all' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getLabelall(@Query() query: Record<string, any>): Promise<Result<any>> { async getLabelall(): Promise<Result<any>> {
const result = await this.memberLabelServiceImplService.all(query); const result = await this.memberLabelServiceImplService.all();
return Result.success(result); return Result.success(result);
} }
} }

View File

@@ -15,7 +15,7 @@ export class MemberLevelController {
@ApiOperation({ summary: '' }) @ApiOperation({ summary: '' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async get(@Query() query: Record<string, any>): Promise<Result<any>> { async get(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.memberLevelServiceImplService.list(query, query); const result = await this.memberLevelServiceImplService.list(query);
return Result.success(result); return Result.success(result);
} }
@@ -54,8 +54,8 @@ export class MemberLevelController {
@Get('all') @Get('all')
@ApiOperation({ summary: '/all' }) @ApiOperation({ summary: '/all' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getAll(@Query() query: Record<string, any>): Promise<Result<any>> { async getAll(): Promise<Result<any>> {
const result = await this.memberLevelServiceImplService.all(query); const result = await this.memberLevelServiceImplService.all();
return Result.success(result); return Result.success(result);
} }
} }

View File

@@ -22,8 +22,8 @@ export class MemberSignController {
@Get('config') @Get('config')
@ApiOperation({ summary: '/config' }) @ApiOperation({ summary: '/config' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfig(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfig(): Promise<Result<any>> {
const result = await this.memberSignServiceImplService.getSignConfig(query); const result = await this.memberSignServiceImplService.getSignConfig();
return Result.success(result); return Result.success(result);
} }

View File

@@ -30,8 +30,8 @@ export class MemberController {
@Get('member/:id') @Get('member/:id')
@ApiOperation({ summary: '/member/{id}' }) @ApiOperation({ summary: '/member/{id}' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getMemberid(@Param('id') id: string): Promise<Result<any>> { async getMemberid(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.memberServiceImplService.info(Number(id)); const result = await this.memberServiceImplService.info(query);
return Result.success(result); return Result.success(result);
} }
@@ -46,8 +46,8 @@ export class MemberController {
@Put('member/:member_id') @Put('member/:member_id')
@ApiOperation({ summary: '/member/{member_id}' }) @ApiOperation({ summary: '/member/{member_id}' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async putMembermemberid(@Body() body: Record<string, any>, @Query() query: Record<string, any>): Promise<Result<any>> { async putMembermemberid(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.memberServiceImplService.edit(Number(query.id), body); const result = await this.memberServiceImplService.edit(body);
return Result.success(result); return Result.success(result);
} }
@@ -70,8 +70,8 @@ export class MemberController {
@Get('memberno') @Get('memberno')
@ApiOperation({ summary: '/memberno' }) @ApiOperation({ summary: '/memberno' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getMemberno(@Query() query: Record<string, any>): Promise<Result<any>> { async getMemberno(): Promise<Result<any>> {
const result = await this.memberServiceImplService.getMemberNo(query); const result = await this.memberServiceImplService.getMemberNo();
return Result.success(result); return Result.success(result);
} }

View File

@@ -38,16 +38,16 @@ export class CloudController {
@Post('build/clear') @Post('build/clear')
@ApiOperation({ summary: '/build/clear' }) @ApiOperation({ summary: '/build/clear' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async postBuildclear(@Body() body: Record<string, any>): Promise<Result<any>> { async postBuildclear(): Promise<Result<any>> {
const result = await this.cloudBuildServiceImplService.clearBuildTask(body); const result = await this.cloudBuildServiceImplService.clearBuildTask();
return Result.success(result); return Result.success(result);
} }
@Get('build/check') @Get('build/check')
@ApiOperation({ summary: '/build/check' }) @ApiOperation({ summary: '/build/check' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getBuildcheck(@Query() query: Record<string, any>): Promise<Result<any>> { async getBuildcheck(): Promise<Result<any>> {
const result = await this.cloudBuildServiceImplService.buildPreCheck(query); const result = await this.cloudBuildServiceImplService.buildPreCheck();
return Result.success(result); return Result.success(result);
} }

View File

@@ -22,16 +22,16 @@ export class NiuSmsController {
@Get('sign/report/config') @Get('sign/report/config')
@ApiOperation({ summary: '/sign/report/config' }) @ApiOperation({ summary: '/sign/report/config' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getSignreportconfig(@Query() query: Record<string, any>): Promise<Result<any>> { async getSignreportconfig(): Promise<Result<any>> {
const result = await this.nuiSmsServiceImplService.captcha(query); const result = await this.nuiSmsServiceImplService.captcha();
return Result.success(result); return Result.success(result);
} }
@Get('captcha') @Get('captcha')
@ApiOperation({ summary: '/captcha' }) @ApiOperation({ summary: '/captcha' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getCaptcha(@Query() query: Record<string, any>): Promise<Result<any>> { async getCaptcha(): Promise<Result<any>> {
const result = await this.nuiSmsServiceImplService.captcha(query); const result = await this.nuiSmsServiceImplService.captcha();
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,8 +14,8 @@ export class NoticeController {
@Get('notice') @Get('notice')
@ApiOperation({ summary: '/notice' }) @ApiOperation({ summary: '/notice' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getNotice(@Query() query: Record<string, any>): Promise<Result<any>> { async getNotice(): Promise<Result<any>> {
const result = await this.noticeServiceImplService.getAddonList(query); const result = await this.noticeServiceImplService.getAddonList();
return Result.success(result); return Result.success(result);
} }

View File

@@ -54,8 +54,8 @@ export class SiteGroupController {
@Get('all') @Get('all')
@ApiOperation({ summary: '/all' }) @ApiOperation({ summary: '/all' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getAll(@Query() query: Record<string, any>): Promise<Result<any>> { async getAll(): Promise<Result<any>> {
const result = await this.siteGroupServiceImplService.getAll(query); const result = await this.siteGroupServiceImplService.getAll();
return Result.success(result); return Result.success(result);
} }

View File

@@ -73,7 +73,7 @@ export class SiteController {
@ApiOperation({ summary: '/statuslist' }) @ApiOperation({ summary: '/statuslist' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getStatuslist(@Query() query: Record<string, any>): Promise<Result<any>> { async getStatuslist(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.authServiceImplService.getAuthMenuTreeList(query.addon); const result = await this.authServiceImplService.getAuthMenuTreeList(Number(query.isTree), query.addon);
return Result.success(result); return Result.success(result);
} }
@@ -81,15 +81,15 @@ export class SiteController {
@ApiOperation({ summary: '/site/menu' }) @ApiOperation({ summary: '/site/menu' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getSitemenu(@Query() query: Record<string, any>): Promise<Result<any>> { async getSitemenu(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.authServiceImplService.getAuthMenuTreeList(query.addon); const result = await this.authServiceImplService.getAuthMenuTreeList(Number(query.isTree), query.addon);
return Result.success(result); return Result.success(result);
} }
@Get('addons') @Get('addons')
@ApiOperation({ summary: '/addons' }) @ApiOperation({ summary: '/addons' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getAddons(@Query() query: Record<string, any>): Promise<Result<any>> { async getAddons(): Promise<Result<any>> {
const result = await this.siteServiceImplService.getSiteAddons(query); const result = await this.siteServiceImplService.getSiteAddons();
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,8 +14,8 @@ export class StatController {
@Get('index') @Get('index')
@ApiOperation({ summary: '/index' }) @ApiOperation({ summary: '/index' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getIndex(@Query() query: Record<string, any>): Promise<Result<any>> { async getIndex(): Promise<Result<any>> {
const result = await this.statServiceImplService.getIndexData(query); const result = await this.statServiceImplService.getIndexData();
return Result.success(result); return Result.success(result);
} }
} }

View File

@@ -14,8 +14,8 @@ export class SysAgreementController {
@Get('agreement') @Get('agreement')
@ApiOperation({ summary: '/agreement' }) @ApiOperation({ summary: '/agreement' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getAgreement(@Query() query: Record<string, any>): Promise<Result<any>> { async getAgreement(): Promise<Result<any>> {
const result = await this.sysAgreementServiceImplService.list(query); const result = await this.sysAgreementServiceImplService.list();
return Result.success(result); return Result.success(result);
} }

View File

@@ -16,8 +16,8 @@ export class SysConfigController {
@Get('config/website') @Get('config/website')
@ApiOperation({ summary: '/config/website' }) @ApiOperation({ summary: '/config/website' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfigwebsite(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfigwebsite(): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.getWebSite(query); const result = await this.sysConfigServiceImplService.getWebSite();
return Result.success(result); return Result.success(result);
} }
@@ -32,16 +32,16 @@ export class SysConfigController {
@Get('config/service') @Get('config/service')
@ApiOperation({ summary: '/config/service' }) @ApiOperation({ summary: '/config/service' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfigservice(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfigservice(): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.getService(query); const result = await this.sysConfigServiceImplService.getService();
return Result.success(result); return Result.success(result);
} }
@Get('config/copyright') @Get('config/copyright')
@ApiOperation({ summary: '/config/copyright' }) @ApiOperation({ summary: '/config/copyright' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfigcopyright(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfigcopyright(): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.getCopyRight(query); const result = await this.sysConfigServiceImplService.getCopyRight();
return Result.success(result); return Result.success(result);
} }
@@ -56,8 +56,8 @@ export class SysConfigController {
@Get('config/map') @Get('config/map')
@ApiOperation({ summary: '/config/map' }) @ApiOperation({ summary: '/config/map' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfigmap(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfigmap(): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.getMap(query); const result = await this.sysConfigServiceImplService.getMap();
return Result.success(result); return Result.success(result);
} }
@@ -72,8 +72,8 @@ export class SysConfigController {
@Get('config/developer_token') @Get('config/developer_token')
@ApiOperation({ summary: '/config/developer_token' }) @ApiOperation({ summary: '/config/developer_token' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfigdevelopertoken(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfigdevelopertoken(): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.getDeveloperToken(query); const result = await this.sysConfigServiceImplService.getDeveloperToken();
return Result.success(result); return Result.success(result);
} }
@@ -88,8 +88,8 @@ export class SysConfigController {
@Get('config/layout') @Get('config/layout')
@ApiOperation({ summary: '/config/layout' }) @ApiOperation({ summary: '/config/layout' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfiglayout(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfiglayout(): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.getLayout(query); const result = await this.sysConfigServiceImplService.getLayout();
return Result.success(result); return Result.success(result);
} }
@@ -104,8 +104,8 @@ export class SysConfigController {
@Get('config/themecolor') @Get('config/themecolor')
@ApiOperation({ summary: '/config/themecolor' }) @ApiOperation({ summary: '/config/themecolor' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfigthemecolor(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfigthemecolor(): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.getThemeColor(query); const result = await this.sysConfigServiceImplService.getThemeColor();
return Result.success(result); return Result.success(result);
} }
@@ -120,32 +120,32 @@ export class SysConfigController {
@Get('date/month') @Get('date/month')
@ApiOperation({ summary: '/date/month' }) @ApiOperation({ summary: '/date/month' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getDatemonth(@Query() query: Record<string, any>): Promise<Result<any>> { async getDatemonth(): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.getUrl(query); const result = await this.sysConfigServiceImplService.getUrl();
return Result.success(result); return Result.success(result);
} }
@Get('date/week') @Get('date/week')
@ApiOperation({ summary: '/date/week' }) @ApiOperation({ summary: '/date/week' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getDateweek(@Query() query: Record<string, any>): Promise<Result<any>> { async getDateweek(): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.getUrl(query); const result = await this.sysConfigServiceImplService.getUrl();
return Result.success(result); return Result.success(result);
} }
@Get('url') @Get('url')
@ApiOperation({ summary: '/url' }) @ApiOperation({ summary: '/url' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getUrl(@Query() query: Record<string, any>): Promise<Result<any>> { async getUrl(): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.getUrl(query); const result = await this.sysConfigServiceImplService.getUrl();
return Result.success(result); return Result.success(result);
} }
@Get('wxoplatform/config') @Get('wxoplatform/config')
@ApiOperation({ summary: '/wxoplatform/config' }) @ApiOperation({ summary: '/wxoplatform/config' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getWxoplatformconfig(@Query() query: Record<string, any>): Promise<Result<any>> { async getWxoplatformconfig(): Promise<Result<any>> {
const result = await this.oplatformConfigServiceImplService.getWxOplatformConfig(query); const result = await this.oplatformConfigServiceImplService.getWxOplatformConfig();
return Result.success(result); return Result.success(result);
} }

View File

@@ -15,7 +15,7 @@ export class SysMenuController {
@ApiOperation({ summary: '/menu/{appType}' }) @ApiOperation({ summary: '/menu/{appType}' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getMenuappType(@Param('appType') appType: string, @Query() query: Record<string, any>): Promise<Result<any>> { async getMenuappType(@Param('appType') appType: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysMenuServiceImplService.getAllMenuList(appType, Number(query.status)); const result = await this.sysMenuServiceImplService.getAllMenuList(appType, query.status, Number(query.isTree), Number(query.isButton));
return Result.success(result); return Result.success(result);
} }
@@ -62,8 +62,8 @@ export class SysMenuController {
@Get('tree') @Get('tree')
@ApiOperation({ summary: '/tree' }) @ApiOperation({ summary: '/tree' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getTree(@Query() query: Record<string, any>): Promise<Result<any>> { async getTree(): Promise<Result<any>> {
const result = await this.sysMenuServiceImplService.menuTree(query); const result = await this.sysMenuServiceImplService.menuTree();
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,8 +14,8 @@ export class SysRoleController {
@Get('role/all') @Get('role/all')
@ApiOperation({ summary: 'role/all' }) @ApiOperation({ summary: 'role/all' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getRoleall(@Query() query: Record<string, any>): Promise<Result<any>> { async getRoleall(): Promise<Result<any>> {
const result = await this.sysRoleServiceImplService.getAllRole(query); const result = await this.sysRoleServiceImplService.getAllRole();
return Result.success(result); return Result.success(result);
} }

View File

@@ -62,32 +62,32 @@ export class SysScheduleController {
@Get('type') @Get('type')
@ApiOperation({ summary: '/type' }) @ApiOperation({ summary: '/type' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getType(@Query() query: Record<string, any>): Promise<Result<any>> { async getType(): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.type(query); const result = await this.sysScheduleServiceImplService.type();
return Result.success(result); return Result.success(result);
} }
@Get('template') @Get('template')
@ApiOperation({ summary: '/template' }) @ApiOperation({ summary: '/template' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getTemplate(@Query() query: Record<string, any>): Promise<Result<any>> { async getTemplate(): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.template(query); const result = await this.sysScheduleServiceImplService.template();
return Result.success(result); return Result.success(result);
} }
@Get('datetype') @Get('datetype')
@ApiOperation({ summary: '/datetype' }) @ApiOperation({ summary: '/datetype' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getDatetype(@Query() query: Record<string, any>): Promise<Result<any>> { async getDatetype(): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.dateType(query); const result = await this.sysScheduleServiceImplService.dateType();
return Result.success(result); return Result.success(result);
} }
@Post('reset') @Post('reset')
@ApiOperation({ summary: '/reset' }) @ApiOperation({ summary: '/reset' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async postReset(@Body() body: Record<string, any>): Promise<Result<any>> { async postReset(): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.resetSchedule(body); const result = await this.sysScheduleServiceImplService.resetSchedule();
return Result.success(result); return Result.success(result);
} }

View File

@@ -13,24 +13,24 @@ export class SysWebConfigController {
@Get('website') @Get('website')
@ApiOperation({ summary: 'website' }) @ApiOperation({ summary: 'website' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getWebsite(@Query() query: Record<string, any>): Promise<Result<any>> { async getWebsite(): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.getWebSite(query); const result = await this.sysConfigServiceImplService.getWebSite();
return Result.success(result); return Result.success(result);
} }
@Get('copyright') @Get('copyright')
@ApiOperation({ summary: '/copyright' }) @ApiOperation({ summary: '/copyright' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getCopyright(@Query() query: Record<string, any>): Promise<Result<any>> { async getCopyright(): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.getCopyRight(query); const result = await this.sysConfigServiceImplService.getCopyRight();
return Result.success(result); return Result.success(result);
} }
@Get('layout') @Get('layout')
@ApiOperation({ summary: 'layout' }) @ApiOperation({ summary: 'layout' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getLayout(@Query() query: Record<string, any>): Promise<Result<any>> { async getLayout(): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.getLayout(query); const result = await this.sysConfigServiceImplService.getLayout();
return Result.success(result); return Result.success(result);
} }

View File

@@ -16,8 +16,8 @@ export class StorageController {
@Get('storage') @Get('storage')
@ApiOperation({ summary: '/storage' }) @ApiOperation({ summary: '/storage' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getStorage(@Query() query: Record<string, any>): Promise<Result<any>> { async getStorage(): Promise<Result<any>> {
const result = await this.storageConfigServiceImplService.getStorageList(query); const result = await this.storageConfigServiceImplService.getStorageList();
return Result.success(result); return Result.success(result);
} }

View File

@@ -94,8 +94,8 @@ export class UserController {
@Get('user_all') @Get('user_all')
@ApiOperation({ summary: '/user_all' }) @ApiOperation({ summary: '/user_all' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getUserall(@Query() query: Record<string, any>): Promise<Result<any>> { async getUserall(): Promise<Result<any>> {
const result = await this.sysUserServiceImplService.getUserAll(query); const result = await this.sysUserServiceImplService.getUserAll();
return Result.success(result); return Result.success(result);
} }

View File

@@ -22,8 +22,8 @@ export class VerifierController {
@Get('select') @Get('select')
@ApiOperation({ summary: '/select' }) @ApiOperation({ summary: '/select' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getSelect(@Query() query: Record<string, any>): Promise<Result<any>> { async getSelect(): Promise<Result<any>> {
const result = await this.verifierServiceImplService.all(query); const result = await this.verifierServiceImplService.all();
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,8 +14,8 @@ export class ConfigController {
@Get('config') @Get('config')
@ApiOperation({ summary: '/config' }) @ApiOperation({ summary: '/config' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfig(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfig(): Promise<Result<any>> {
const result = await this.weappConfigServiceImplService.getWeappConfig(query); const result = await this.weappConfigServiceImplService.getWeappConfig();
return Result.success(result); return Result.success(result);
} }
@@ -54,8 +54,8 @@ export class ConfigController {
@Get('privacysetting') @Get('privacysetting')
@ApiOperation({ summary: '/privacysetting' }) @ApiOperation({ summary: '/privacysetting' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getPrivacysetting(@Query() query: Record<string, any>): Promise<Result<any>> { async getPrivacysetting(): Promise<Result<any>> {
const result = await this.weappConfigServiceImplService.getPrivacySetting(query); const result = await this.weappConfigServiceImplService.getPrivacySetting();
return Result.success(result); return Result.success(result);
} }
} }

View File

@@ -14,8 +14,8 @@ export class TemplateController {
@Get('') @Get('')
@ApiOperation({ summary: '' }) @ApiOperation({ summary: '' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async get(@Query() query: Record<string, any>): Promise<Result<any>> { async get(): Promise<Result<any>> {
const result = await this.weappTemplateServiceImplService.list(query); const result = await this.weappTemplateServiceImplService.list();
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,8 +14,8 @@ export class VersionController {
@Post('version') @Post('version')
@ApiOperation({ summary: '/version' }) @ApiOperation({ summary: '/version' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async postVersion(@Body() body: Record<string, any>): Promise<Result<any>> { async postVersion(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.weappVersionServiceImplService.add(body); const result = await this.weappVersionServiceImplService.add(Number(query.siteGroupId), query.isAll);
return Result.success(result); return Result.success(result);
} }
@@ -30,8 +30,8 @@ export class VersionController {
@Get('preview') @Get('preview')
@ApiOperation({ summary: '/preview' }) @ApiOperation({ summary: '/preview' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getPreview(@Query() query: Record<string, any>): Promise<Result<any>> { async getPreview(): Promise<Result<any>> {
const result = await this.weappVersionServiceImplService.getWeappPreviewImage(query); const result = await this.weappVersionServiceImplService.getWeappPreviewImage();
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,8 +14,8 @@ export class ConfigController {
@Get('config') @Get('config')
@ApiOperation({ summary: '/config' }) @ApiOperation({ summary: '/config' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfig(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfig(): Promise<Result<any>> {
const result = await this.wechatConfigServiceImplService.getWechatConfig(query); const result = await this.wechatConfigServiceImplService.getWechatConfig();
return Result.success(result); return Result.success(result);
} }
@@ -30,8 +30,8 @@ export class ConfigController {
@Get('static') @Get('static')
@ApiOperation({ summary: '/static' }) @ApiOperation({ summary: '/static' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getStatic(@Query() query: Record<string, any>): Promise<Result<any>> { async getStatic(): Promise<Result<any>> {
const result = await this.wechatConfigServiceImplService.staticInfo(query); const result = await this.wechatConfigServiceImplService.staticInfo();
return Result.success(result); return Result.success(result);
} }
} }

View File

@@ -14,8 +14,8 @@ export class MenuController {
@Get('menu') @Get('menu')
@ApiOperation({ summary: '/menu' }) @ApiOperation({ summary: '/menu' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getMenu(@Query() query: Record<string, any>): Promise<Result<any>> { async getMenu(): Promise<Result<any>> {
const result = await this.wechatMenuServiceImplService.info(query); const result = await this.wechatMenuServiceImplService.info();
return Result.success(result); return Result.success(result);
} }

View File

@@ -54,8 +54,8 @@ export class ReplyController {
@Get('default') @Get('default')
@ApiOperation({ summary: '/default' }) @ApiOperation({ summary: '/default' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getDefault(@Query() query: Record<string, any>): Promise<Result<any>> { async getDefault(): Promise<Result<any>> {
const result = await this.wechatReplyServiceImplService.getDefault(query); const result = await this.wechatReplyServiceImplService.getDefault();
return Result.success(result); return Result.success(result);
} }
@@ -70,8 +70,8 @@ export class ReplyController {
@Get('subscribe') @Get('subscribe')
@ApiOperation({ summary: '/subscribe' }) @ApiOperation({ summary: '/subscribe' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getSubscribe(@Query() query: Record<string, any>): Promise<Result<any>> { async getSubscribe(): Promise<Result<any>> {
const result = await this.wechatReplyServiceImplService.getSubscribe(query); const result = await this.wechatReplyServiceImplService.getSubscribe();
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,8 +14,8 @@ export class TemplateController {
@Get('') @Get('')
@ApiOperation({ summary: '' }) @ApiOperation({ summary: '' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async get(@Query() query: Record<string, any>): Promise<Result<any>> { async get(): Promise<Result<any>> {
const result = await this.wechatTemplateServiceImplService.list(query); const result = await this.wechatTemplateServiceImplService.list();
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,16 +14,16 @@ export class ConfigController {
@Get('static') @Get('static')
@ApiOperation({ summary: '/static' }) @ApiOperation({ summary: '/static' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getStatic(@Query() query: Record<string, any>): Promise<Result<any>> { async getStatic(): Promise<Result<any>> {
const result = await this.oplatformConfigServiceImplService.getOplatformStaticInfo(query); const result = await this.oplatformConfigServiceImplService.getOplatformStaticInfo();
return Result.success(result); return Result.success(result);
} }
@Get('config') @Get('config')
@ApiOperation({ summary: '/config' }) @ApiOperation({ summary: '/config' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getConfig(@Query() query: Record<string, any>): Promise<Result<any>> { async getConfig(): Promise<Result<any>> {
const result = await this.oplatformConfigServiceImplService.getWxOplatformConfig(query); const result = await this.oplatformConfigServiceImplService.getWxOplatformConfig();
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,8 +14,8 @@ export class OplatformController {
@Get('authorizationUrl') @Get('authorizationUrl')
@ApiOperation({ summary: '/authorizationUrl' }) @ApiOperation({ summary: '/authorizationUrl' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getAuthorizationUrl(@Query() query: Record<string, any>): Promise<Result<any>> { async getAuthorizationUrl(): Promise<Result<any>> {
const result = await this.oplatformServiceImplService.createPreAuthorizationUrl(query); const result = await this.oplatformServiceImplService.createPreAuthorizationUrl();
return Result.success(result); return Result.success(result);
} }

View File

@@ -14,8 +14,8 @@ export class WeappVersionController {
@Get('weapp/commit/last') @Get('weapp/commit/last')
@ApiOperation({ summary: '/weapp/commit/last' }) @ApiOperation({ summary: '/weapp/commit/last' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getWeappcommitlast(@Query() query: Record<string, any>): Promise<Result<any>> { async getWeappcommitlast(): Promise<Result<any>> {
const result = await this.weappVersionServiceImplService.getLastCommitRecord(query); const result = await this.weappVersionServiceImplService.getLastCommitRecord();
return Result.success(result); return Result.success(result);
} }
@@ -30,16 +30,16 @@ export class WeappVersionController {
@Post('weapp/version/commit') @Post('weapp/version/commit')
@ApiOperation({ summary: '/weapp/version/commit' }) @ApiOperation({ summary: '/weapp/version/commit' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async postWeappversioncommit(@Body() body: Record<string, any>): Promise<Result<any>> { async postWeappversioncommit(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.weappVersionServiceImplService.add(body); const result = await this.weappVersionServiceImplService.add(Number(query.siteGroupId), query.isAll);
return Result.success(result); return Result.success(result);
} }
@Post('site/weapp/commit') @Post('site/weapp/commit')
@ApiOperation({ summary: '/site/weapp/commit' }) @ApiOperation({ summary: '/site/weapp/commit' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async postSiteweappcommit(@Body() body: Record<string, any>): Promise<Result<any>> { async postSiteweappcommit(): Promise<Result<any>> {
const result = await this.weappVersionServiceImplService.siteWeappCommit(body); const result = await this.weappVersionServiceImplService.siteWeappCommit();
return Result.success(result); return Result.success(result);
} }

View File

@@ -36,16 +36,16 @@ export class LoginController {
@Post('password/reset') @Post('password/reset')
@ApiOperation({ summary: '/password/reset' }) @ApiOperation({ summary: '/password/reset' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async postPasswordreset(@Body() body: Record<string, any>): Promise<Result<any>> { async postPasswordreset(): Promise<Result<any>> {
const result = await this.loginServiceImplService.getLoginConfig(body); const result = await this.loginServiceImplService.getLoginConfig();
return Result.success(result); return Result.success(result);
} }
@Get('login/config') @Get('login/config')
@ApiOperation({ summary: '/login/config' }) @ApiOperation({ summary: '/login/config' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getLoginconfig(@Query() query: Record<string, any>): Promise<Result<any>> { async getLoginconfig(): Promise<Result<any>> {
const result = await this.loginServiceImplService.getLoginConfig(query); const result = await this.loginServiceImplService.getLoginConfig();
return Result.success(result); return Result.success(result);
} }

View File

@@ -12,8 +12,8 @@ export class PayController {
@Post('pay') @Post('pay')
@ApiOperation({ summary: '/pay' }) @ApiOperation({ summary: '/pay' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async postPay(@Body() body: Record<string, any>): Promise<Result<any>> { async postPay(@Body() body: Record<string, any>, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.payServiceImplService.asyncNotify(body); const result = await this.payServiceImplService.asyncNotify(body, body, query);
return Result.success(result); return Result.success(result);
} }

View File

@@ -12,16 +12,16 @@ export class TaskController {
@Get('task/growth') @Get('task/growth')
@ApiOperation({ summary: '/task/growth' }) @ApiOperation({ summary: '/task/growth' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getTaskgrowth(@Query() query: Record<string, any>): Promise<Result<any>> { async getTaskgrowth(): Promise<Result<any>> {
const result = await this.taskServiceImplService.getGrowthTask(query); const result = await this.taskServiceImplService.getGrowthTask();
return Result.success(result); return Result.success(result);
} }
@Get('task/point') @Get('task/point')
@ApiOperation({ summary: '/task/point' }) @ApiOperation({ summary: '/task/point' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getTaskpoint(@Query() query: Record<string, any>): Promise<Result<any>> { async getTaskpoint(): Promise<Result<any>> {
const result = await this.taskServiceImplService.getPointTask(query); const result = await this.taskServiceImplService.getPointTask();
return Result.success(result); return Result.success(result);
} }
} }

View File

@@ -44,8 +44,8 @@ export class WeappController {
@Get('getIsTradeManaged') @Get('getIsTradeManaged')
@ApiOperation({ summary: '/getIsTradeManaged' }) @ApiOperation({ summary: '/getIsTradeManaged' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getIsTradeManaged(@Query() query: Record<string, any>): Promise<Result<any>> { async getIsTradeManaged(): Promise<Result<any>> {
const result = await this.weappServiceImplService.getIsTradeManaged(query); const result = await this.weappServiceImplService.getIsTradeManaged();
return Result.success(result); return Result.success(result);
} }

View File

@@ -60,16 +60,16 @@ export class WechatController {
@Get('jssdkconfig') @Get('jssdkconfig')
@ApiOperation({ summary: '/jssdkconfig' }) @ApiOperation({ summary: '/jssdkconfig' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async getJssdkconfig(@Query() query: Record<string, any>): Promise<Result<any>> { async getJssdkconfig(): Promise<Result<any>> {
const result = await this.wechatServiceImplService.scanLogin(query); const result = await this.wechatServiceImplService.scanLogin();
return Result.success(result); return Result.success(result);
} }
@Post('scanlogin') @Post('scanlogin')
@ApiOperation({ summary: '/scanlogin' }) @ApiOperation({ summary: '/scanlogin' })
@ApiResponse({ status: 200, description: '成功' }) @ApiResponse({ status: 200, description: '成功' })
async postScanlogin(@Body() body: Record<string, any>): Promise<Result<any>> { async postScanlogin(): Promise<Result<any>> {
const result = await this.wechatServiceImplService.scanLogin(body); const result = await this.wechatServiceImplService.scanLogin();
return Result.success(result); return Result.success(result);
} }