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) {
this.namingUtils = new NamingUtils();
this.outputDir = outputDir || '';
// ✅ 中央Service方法签名索引
this.serviceMethodSignatureIndex = null;
}
/**
* ✅ 设置中央Service方法签名索引
*/
setServiceMethodSignatureIndex(index) {
this.serviceMethodSignatureIndex = index;
}
/**
@@ -548,6 +557,7 @@ ${methodBody}
for (const param of serviceParams) {
const paramType = param.type;
const paramName = param.name;
const tsType = this.javaTypeToTsType(paramType); // ✅ Java类型转换
// 路径参数
if (method.path && method.path.includes(`{${paramName}}`)) {
@@ -661,10 +671,15 @@ ${methodBody}
}
/**
* 从Service文件读取方法签名
* ✅ V2: 从中央索引读取Service方法签名不再读取文件
*/
readServiceMethodSignature(method, javaController) {
try {
// 如果没有索引,回退到旧逻辑
if (!this.serviceMethodSignatureIndex) {
return null;
}
// 从methodServiceCalls中获取实际调用的Service名称
const javaMethodName = method.javaMethodName;
const methodServiceCalls = javaController.methodServiceCalls || {};
@@ -675,52 +690,21 @@ ${methodBody}
}
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;
// 提取方法签名async methodName(param1: Type1, param2: Type2): Promise<ReturnType>
const methodRegex = new RegExp(`async\\s+${serviceMethodName}\\s*\\(([^)]*)\\)`, 'm');
const match = serviceContent.match(methodRegex);
// ✅ 从中央索引查询方法签名
const key = `${serviceImplName}.${serviceMethodName}`;
const signature = this.serviceMethodSignatureIndex.get(key);
if (!match || !match[1]) {
return null;
if (!signature) {
return null; // 索引中没有找到
}
const paramsString = match[1].trim();
if (!paramsString) {
return []; // 无参数方法
}
// 返回参数列表(已经是 {name, type} 格式)
return signature.parameters || [];
// 解析参数列表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) {
// 读取失败返回null
// 查询失败返回null
return null;
}
}
@@ -728,11 +712,10 @@ ${methodBody}
/**
* 智能映射Service参数到Controller参数源
*
* ✅ V5 策略(类型感知):
* - 路径参数paramName (string) 或 Number(paramName) (number)
* - DTO/Parambody 或 query
* - 基本类型stringquery.paramName
* - 基本类型numberNumber(query.paramName) 或 Number(id)
* ✅ V6 策略(Java类型感知):
* - Java Integer/Long/int/long → Number(id) 或 Number(query.xxx)
* - Java String → query.xxx
* - DTO/Param → body 或 query
*/
mapServiceParametersToController(serviceParams, method) {
const controllerParams = [];
@@ -744,9 +727,12 @@ ${methodBody}
const paramType = param.type;
const paramName = param.name;
// ✅ 将Java类型转为TS类型用于判断
const tsType = this.javaTypeToTsType(paramType);
// 1. 路径参数:根据类型决定是否转换
if (method.path && method.path.includes(`{${paramName}}`)) {
if (paramType === 'number') {
if (tsType === 'number') {
controllerParams.push(`Number(${paramName})`);
} else {
controllerParams.push(paramName);
@@ -761,11 +747,9 @@ ${methodBody}
}
}
// 3. 基本类型
else if (this.isPrimitiveParameter(paramType)) {
if (paramType === 'number') {
else if (tsType === 'number' || tsType === 'string' || tsType === 'boolean') {
if (tsType === 'number') {
controllerParams.push(`Number(query.${paramName})`);
} else if (paramType === 'string') {
controllerParams.push(`query.${paramName}`);
} else {
controllerParams.push(`query.${paramName}`);
}
@@ -779,6 +763,33 @@ ${methodBody}
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参数
*/

View File

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

View File

@@ -18,6 +18,10 @@ class JavaToNestJSMigrationCoordinator {
this.mapper = new LayerMapper();
this.moduleGenerator = new ModuleGenerator();
// ✅ 中央数据仓库Service方法签名索引
// 格式:{ 'ServiceImplName.methodName': { parameters: [...], returnType: '...' } }
this.serviceMethodSignatureIndex = new Map();
this.stats = {
startTime: null,
endTime: null,
@@ -79,10 +83,38 @@ class JavaToNestJSMigrationCoordinator {
this.stats.filesProcessed = Object.values(scanResults).reduce((total, arr) => total + arr.length, 0);
console.log(`📊 扫描完成,共处理 ${this.stats.filesProcessed} 个文件`);
// ✅ 构建中央Service方法签名索引
console.log('🔍 构建Service方法签名索引...');
this.buildServiceMethodSignatureIndex(scanResults.services);
console.log(`📋 索引完成,共 ${this.serviceMethodSignatureIndex.size} 个方法签名`);
// 验证扫描结果
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模块
*/
async generateModules(nestJSModules) {
// ✅ 传递中央索引给ModuleGenerator
this.moduleGenerator.setOutputDir(this.nestJSPath);
this.moduleGenerator.setServiceMethodSignatureIndex(this.serviceMethodSignatureIndex);
await this.moduleGenerator.generateAllModules(nestJSModules);
this.stats.modulesGenerated = Object.keys(nestJSModules).length;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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