fix: Controller参数智能匹配V5 - 14344到14191减少153错误

This commit is contained in:
wanwu
2025-10-29 17:19:28 +08:00
parent 4eabee8a46
commit 1d223c88e5
68 changed files with 401 additions and 343 deletions

View File

@@ -397,7 +397,7 @@ ${methods}
generateMethod(method, javaController, methodName) {
// 使用传入的方法名,确保无重复
const httpDecorator = this.getHttpDecorator(method.httpMethod);
const parameters = this.generateMethodParameters(method);
const parameters = this.generateMethodParameters(method, javaController);
const returnType = this.generateReturnType(method);
// 将 /{key} 格式转换为 NestJS 的 :key 格式,并移除前导斜杠
@@ -528,34 +528,80 @@ ${methodBody}
}
/**
* 生成方法参数
* 生成方法参数V2基于Service签名
*/
generateMethodParameters(method) {
generateMethodParameters(method, javaController) {
const parameters = [];
const httpMethod = method.httpMethod.toLowerCase();
const isPost = httpMethod === 'post' || httpMethod === 'put';
const isGet = httpMethod === 'get';
// 根据HTTP方法添加参数
if (method.httpMethod.toLowerCase() === 'post' || method.httpMethod.toLowerCase() === 'put') {
// 如果有对应的DTO使用DTO类型否则使用Record类型代替any
// 尝试读取Service签名确定需要哪些参数
const serviceParams = javaController ? this.readServiceMethodSignature(method, javaController) : null;
let needsBody = false;
let needsQuery = false;
let pathParams = [];
if (serviceParams !== null) {
// 根据Service参数类型确定Controller需要哪些参数
for (const param of serviceParams) {
const paramType = param.type;
const paramName = param.name;
// 路径参数
if (method.path && method.path.includes(`{${paramName}}`)) {
pathParams.push(paramName);
}
// DTO/Param类型
else if (this.isBodyParameter(paramType)) {
if (isPost) {
needsBody = true;
} else {
needsQuery = true;
}
}
// 基本类型或其他
else {
if (isPost) {
needsQuery = true; // POST请求的基本类型从query获取
} else {
needsQuery = true;
}
}
}
} else {
// 无法读取Service签名使用默认逻辑
needsBody = isPost;
needsQuery = isGet;
// 提取路径参数
if (method.path.includes('{')) {
const paramNames = method.path.match(/\{(\w+)\}/g);
if (paramNames) {
pathParams = paramNames.map(p => p.replace(/[{}]/g, ''));
}
}
}
// 生成参数列表
if (needsBody) {
const dtoType = method.requestDto || 'Record<string, any>';
parameters.push(`@Body() body: ${dtoType}`);
}
// 添加路径参数 - 使用具体类型
if (method.path.includes('{')) {
// 提取路径参数名称
const paramNames = method.path.match(/\{(\w+)\}/g);
if (paramNames && paramNames.length === 1) {
// 单个参数,直接使用具体类型
const paramName = paramNames[0].replace(/[{}]/g, '');
parameters.push(`@Param('${paramName}') ${paramName}: string`);
if (pathParams.length > 0) {
if (pathParams.length === 1) {
parameters.push(`@Param('${pathParams[0]}') ${pathParams[0]}: string`);
} else {
// 多个参数,使用对象类型
parameters.push('@Param() params: Record<string, string>');
// 多个路径参数,分别声明
pathParams.forEach(paramName => {
parameters.push(`@Param('${paramName}') ${paramName}: string`);
});
}
}
// 添加查询参数 - 使用Record类型代替any
if (method.httpMethod.toLowerCase() === 'get') {
if (needsQuery) {
const queryType = method.queryDto || 'Record<string, any>';
parameters.push(`@Query() query: ${queryType}`);
}
@@ -682,9 +728,11 @@ ${methodBody}
/**
* 智能映射Service参数到Controller参数源
*
* ✅ 策略
* - GET请求所有参数从query获取除了路径参数
* - POST/PUT请求DTO/Parambody获取
* ✅ V5 策略(类型感知)
* - 路径参数paramName (string) 或 Number(paramName) (number)
* - DTO/Parambody 或 query
* - 基本类型stringquery.paramName
* - 基本类型numberNumber(query.paramName) 或 Number(id)
*/
mapServiceParametersToController(serviceParams, method) {
const controllerParams = [];
@@ -696,23 +744,33 @@ ${methodBody}
const paramType = param.type;
const paramName = param.name;
// ID参数优先从路径参数获取
if (this.isIdParameter(paramName, paramType) && method.path && method.path.includes(`{${paramName}}`)) {
controllerParams.push(paramName);
// 1. 路径参数:根据类型决定是否转换
if (method.path && method.path.includes(`{${paramName}}`)) {
if (paramType === 'number') {
controllerParams.push(`Number(${paramName})`);
} else {
controllerParams.push(paramName);
}
}
// GET请求所有非路径参数都从query获取
else if (isGetRequest) {
controllerParams.push('query');
// 2. DTO/Param类型整体传递
else if (this.isBodyParameter(paramType)) {
if (isPostOrPut) {
controllerParams.push('body');
} else {
controllerParams.push('query');
}
}
// POST/PUT请求DTO/Param从body获取
else if (isPostOrPut && this.isBodyParameter(paramType)) {
controllerParams.push('body');
// 3. 基本类型
else if (this.isPrimitiveParameter(paramType)) {
if (paramType === 'number') {
controllerParams.push(`Number(query.${paramName})`);
} else if (paramType === 'string') {
controllerParams.push(`query.${paramName}`);
} else {
controllerParams.push(`query.${paramName}`);
}
}
// 基本类型:优先从路径参数
else if (this.isPrimitiveParameter(paramType) && method.path && method.path.includes(`{${paramName}}`)) {
controllerParams.push(paramName);
}
// 默认从query获取
// 4. 默认query
else {
controllerParams.push('query');
}

View File

@@ -18,8 +18,8 @@ export class AddonDevelopController {
@Post('build/:key')
@ApiOperation({ summary: '/build/{key}' })
@ApiResponse({ status: 200, description: '成功' })
async postBuildkey(@Body() body: Record<string, any>, @Param('key') key: string): Promise<Result<any>> {
const result = await this.addonDevelopBuildServiceImplService.build(query);
async postBuildkey(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.addonDevelopBuildServiceImplService.build(query.addon);
return Result.success(result);
}
@@ -34,15 +34,15 @@ export class AddonDevelopController {
@Get(':key')
@ApiOperation({ summary: '/{key}' })
@ApiResponse({ status: 200, description: '成功' })
async getKey(@Param('key') key: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.addonDevelopServiceImplService.info(query);
async getKey(@Param('key') key: string): Promise<Result<any>> {
const result = await this.addonDevelopServiceImplService.info(key);
return Result.success(result);
}
@Post(':key')
@ApiOperation({ summary: '/{key}' })
@ApiResponse({ status: 200, description: '成功' })
async postKey(@Body() body: Record<string, any>, @Param('key') key: string): Promise<Result<any>> {
async postKey(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.addonDevelopServiceImplService.add(body);
return Result.success(result);
}
@@ -50,7 +50,7 @@ export class AddonDevelopController {
@Put(':key')
@ApiOperation({ summary: '/{key}' })
@ApiResponse({ status: 200, description: '成功' })
async putKey(@Body() body: Record<string, any>, @Param('key') key: string): Promise<Result<any>> {
async putKey(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.addonDevelopServiceImplService.edit(body);
return Result.success(result);
}
@@ -66,8 +66,8 @@ export class AddonDevelopController {
@Get('check/:key')
@ApiOperation({ summary: '/check/{key}' })
@ApiResponse({ status: 200, description: '成功' })
async getCheckkey(@Param('key') key: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.niucloudServiceImplService.checkKey(query);
async getCheckkey(@Param('key') key: string): Promise<Result<any>> {
const result = await this.niucloudServiceImplService.checkKey(key);
return Result.success(result);
}
@@ -75,14 +75,14 @@ export class AddonDevelopController {
@ApiOperation({ summary: '/key/blacklist' })
@ApiResponse({ status: 200, description: '成功' })
async getKeyblacklist(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.addonDevelopBuildServiceImplService.download(query);
const result = await this.addonDevelopBuildServiceImplService.download(query.key);
return Result.success(result);
}
@Post('download/:key')
@ApiOperation({ summary: '/download/{key}' })
@ApiResponse({ status: 200, description: '成功' })
async postDownloadkey(@Body() body: Record<string, any>, @Param('key') key: string): Promise<Result<any>> {
async postDownloadkey(@Param('key') key: string): Promise<Result<any>> {
const result = await this.addonDevelopBuildServiceImplService.download(key);
return Result.success(result);
}

View File

@@ -23,7 +23,7 @@ export class AddonLogController {
@ApiOperation({ summary: '/detail' })
@ApiResponse({ status: 200, description: '成功' })
async getDetail(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.addonLogServiceImplService.detail(query);
const result = await this.addonLogServiceImplService.detail(Number(query.id));
return Result.success(result);
}
@@ -38,8 +38,8 @@ export class AddonLogController {
@Post('del')
@ApiOperation({ summary: '/del' })
@ApiResponse({ status: 200, description: '成功' })
async postDel(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.addonLogServiceImplService.del(query);
async postDel(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.addonLogServiceImplService.del(Number(query.id));
return Result.success(result);
}
}

View File

@@ -32,7 +32,7 @@ export class AddonController {
@ApiResponse({ status: 200, description: '成功' })
@Public()
async getAddonlistinstall(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.addonServiceImplService.info(query);
const result = await this.addonServiceImplService.info(Number(query.id));
return Result.success(result);
}
@@ -40,7 +40,7 @@ export class AddonController {
@ApiOperation({ summary: '/addon/:id' })
@ApiResponse({ status: 200, description: '成功' })
async getAddonid(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.addonServiceImplService.info(query);
const result = await this.addonServiceImplService.info(Number(query.id));
return Result.success(result);
}
@@ -55,40 +55,40 @@ export class AddonController {
@Post('addon/del')
@ApiOperation({ summary: '/addon/del' })
@ApiResponse({ status: 200, description: '成功' })
async postAddondel(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.addonServiceImplService.del(query);
async postAddondel(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.addonServiceImplService.del(Number(query.id));
return Result.success(result);
}
@Post('addon/install/:addon')
@ApiOperation({ summary: '/addon/install/{addon}' })
@ApiResponse({ status: 200, description: '成功' })
async postAddoninstalladdon(@Body() body: Record<string, any>, @Param('addon') addon: string): Promise<Result<any>> {
const result = await this.addonServiceImplService.install(addon, query);
async postAddoninstalladdon(@Param('addon') addon: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.addonServiceImplService.install(addon, query.mode);
return Result.success(result);
}
@Post('addon/cloudinstall/:addon')
@ApiOperation({ summary: '/addon/cloudinstall/{addon}' })
@ApiResponse({ status: 200, description: '成功' })
async postAddoncloudinstalladdon(@Body() body: Record<string, any>, @Param('addon') addon: string): Promise<Result<any>> {
const result = await this.addonServiceImplService.install(addon, query);
async postAddoncloudinstalladdon(@Param('addon') addon: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.addonServiceImplService.install(addon, query.mode);
return Result.success(result);
}
@Get('addon/cloudinstall/:addon')
@ApiOperation({ summary: '/addon/cloudinstall/{addon}' })
@ApiResponse({ status: 200, description: '成功' })
async getAddoncloudinstalladdon(@Param('addon') addon: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.addonServiceImplService.cloudInstallLog(query);
async getAddoncloudinstalladdon(@Param('addon') addon: string): Promise<Result<any>> {
const result = await this.addonServiceImplService.cloudInstallLog(addon);
return Result.success(result);
}
@Get('addon/install/check/:addon')
@ApiOperation({ summary: '/addon/install/check/{addon}' })
@ApiResponse({ status: 200, description: '成功' })
async getAddoninstallcheckaddon(@Param('addon') addon: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.addonServiceImplService.installCheck(query);
async getAddoninstallcheckaddon(@Param('addon') addon: string): Promise<Result<any>> {
const result = await this.addonServiceImplService.installCheck(addon);
return Result.success(result);
}
@@ -111,7 +111,7 @@ export class AddonController {
@Post('addon/uninstall/:addon')
@ApiOperation({ summary: '/addon/uninstall/{addon}' })
@ApiResponse({ status: 200, description: '成功' })
async postAddonuninstalladdon(@Body() body: Record<string, any>, @Param('addon') addon: string): Promise<Result<any>> {
async postAddonuninstalladdon(@Param('addon') addon: string): Promise<Result<any>> {
const result = await this.addonServiceImplService.uninstall(addon);
return Result.success(result);
}
@@ -119,8 +119,8 @@ export class AddonController {
@Get('addon/uninstall/check/:addon')
@ApiOperation({ summary: '/addon/uninstall/check/{addon}' })
@ApiResponse({ status: 200, description: '成功' })
async getAddonuninstallcheckaddon(@Param('addon') addon: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.addonServiceImplService.uninstallCheck(query);
async getAddonuninstallcheckaddon(@Param('addon') addon: string): Promise<Result<any>> {
const result = await this.addonServiceImplService.uninstallCheck(addon);
return Result.success(result);
}

View File

@@ -30,8 +30,8 @@ export class BackupController {
@Put('remark')
@ApiOperation({ summary: '/remark' })
@ApiResponse({ status: 200, description: '成功' })
async putRemark(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.sysBackupRecordsServiceImplService.edit(query, body);
async putRemark(@Body() body: Record<string, any>, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysBackupRecordsServiceImplService.edit(Number(query.id), body);
return Result.success(result);
}

View File

@@ -96,15 +96,15 @@ export class UpgradeController {
@Post('clear')
@ApiOperation({ summary: '/clear' })
@ApiResponse({ status: 200, description: '成功' })
async postClear(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.upgradeServiceImplService.clearUpgradeTask(query);
async postClear(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.upgradeServiceImplService.clearUpgradeTask(Number(query.delayed));
return Result.success(result);
}
@Post('operate/:operate')
@ApiOperation({ summary: '/operate/{operate}' })
@ApiResponse({ status: 200, description: '成功' })
async postOperateoperate(@Body() body: Record<string, any>, @Param('operate') operate: string): Promise<Result<any>> {
async postOperateoperate(@Param('operate') operate: string): Promise<Result<any>> {
const result = await this.upgradeServiceImplService.operate(operate);
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);
const result = await this.authServiceImplService.getAuthMenuTreeList(query.addon);
return Result.success(result);
}
@@ -29,7 +29,7 @@ export class AuthController {
@ApiOperation({ summary: '/site' })
@ApiResponse({ status: 200, description: '成功' })
async getSite(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.siteServiceImplService.info(query);
const result = await this.siteServiceImplService.info(Number(query.id));
return Result.success(result);
}

View File

@@ -38,8 +38,8 @@ export class AppController {
@Get('version/:id')
@ApiOperation({ summary: '/version/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getVersionid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.adminAppServiceImplService.getVersionInfo(id);
async getVersionid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.adminAppServiceImplService.getVersionInfo(Number(id));
return Result.success(result);
}
@@ -55,7 +55,7 @@ export class AppController {
@ApiOperation({ summary: '/version/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putVersionid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.adminAppServiceImplService.editVersion(id, body);
const result = await this.adminAppServiceImplService.editVersion(Number(id), body);
return Result.success(result);
}
@@ -63,7 +63,7 @@ export class AppController {
@ApiOperation({ summary: '/version/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteVersionid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.adminAppServiceImplService.delVersion(id);
const result = await this.adminAppServiceImplService.delVersion(Number(id));
return Result.success(result);
}
@@ -71,23 +71,23 @@ export class AppController {
@ApiOperation({ summary: '/platfrom' })
@ApiResponse({ status: 200, description: '成功' })
async getPlatfrom(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.adminAppServiceImplService.getBuildLog(query);
const result = await this.adminAppServiceImplService.getBuildLog(query.key);
return Result.success(result);
}
@Get('build/log/:key')
@ApiOperation({ summary: '/build/log/{key}' })
@ApiResponse({ status: 200, description: '成功' })
async getBuildlogkey(@Param('key') key: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.adminAppServiceImplService.getBuildLog(query);
async getBuildlogkey(@Param('key') key: string): Promise<Result<any>> {
const result = await this.adminAppServiceImplService.getBuildLog(key);
return Result.success(result);
}
@Put('version/:id/release')
@ApiOperation({ summary: '/version/{id}/release' })
@ApiResponse({ status: 200, description: '成功' })
async putVersionidrelease(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.adminAppServiceImplService.release(id);
async putVersionidrelease(@Param('id') id: string): Promise<Result<any>> {
const result = await this.adminAppServiceImplService.release(Number(id));
return Result.success(result);
}

View File

@@ -15,7 +15,7 @@ export class H5Controller {
@ApiOperation({ summary: '/config' })
@ApiResponse({ status: 200, description: '成功' })
async getConfig(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.coreH5ServiceImplService.getH5(query);
const result = await this.coreH5ServiceImplService.getH5(Number(query.siteId));
return Result.success(result);
}

View File

@@ -15,7 +15,7 @@ export class PcController {
@ApiOperation({ summary: '/config' })
@ApiResponse({ status: 200, description: '成功' })
async getConfig(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.corePcServiceImplService.getPc(query);
const result = await this.corePcServiceImplService.getPc(Number(query.siteId));
return Result.success(result);
}

View File

@@ -15,23 +15,23 @@ 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(query);
const result = await this.dictServiceImplService.info(Number(query.id));
return Result.success(result);
}
@Get('dict/:id')
@ApiOperation({ summary: '/dict/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getDictid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.dictServiceImplService.info(id);
async getDictid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.dictServiceImplService.info(Number(id));
return Result.success(result);
}
@Get('dictionary/type/:type')
@ApiOperation({ summary: 'dictionary/type/{type}' })
@ApiResponse({ status: 200, description: '成功' })
async getDictionarytypetype(@Param('type') type: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.dictServiceImplService.info(query);
async getDictionarytypetype(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.dictServiceImplService.info(Number(query.id));
return Result.success(result);
}
@@ -47,7 +47,7 @@ export class DictController {
@ApiOperation({ summary: '/dict/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putDictid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.dictServiceImplService.edit(id, body);
const result = await this.dictServiceImplService.edit(Number(id), body);
return Result.success(result);
}
@@ -63,7 +63,7 @@ export class DictController {
@ApiOperation({ summary: '/dict/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteDictid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.dictServiceImplService.del(id);
const result = await this.dictServiceImplService.del(Number(id));
return Result.success(result);
}

View File

@@ -23,7 +23,7 @@ export class ConfigController {
@ApiOperation({ summary: '/bottom/config' })
@ApiResponse({ status: 200, description: '成功' })
async getBottomconfig(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyConfigServiceImplService.getBottomConfig(query);
const result = await this.diyConfigServiceImplService.getBottomConfig(query.key);
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, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.getInfo(id);
async getFormid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.getInfo(Number(id));
return Result.success(result);
}
@@ -41,14 +41,14 @@ export class DiyFormController {
@ApiOperation({ summary: '/form/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putFormid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.edit(id, body);
const result = await this.diyFormServiceImplService.edit(Number(id), body);
return Result.success(result);
}
@Put('form/delete')
@ApiOperation({ summary: '/form/delete' })
@ApiResponse({ status: 200, description: '成功' })
async putFormdelete(@Body() body: Record<string, any>): Promise<Result<any>> {
async putFormdelete(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.del(query);
return Result.success(result);
}
@@ -73,23 +73,23 @@ export class DiyFormController {
@ApiOperation({ summary: '/form/template' })
@ApiResponse({ status: 200, description: '成功' })
async getFormtemplate(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.modifyShare(query, query);
const result = await this.diyFormServiceImplService.modifyShare(Number(query.formId), query.share);
return Result.success(result);
}
@Put('form/share')
@ApiOperation({ summary: '/form/share' })
@ApiResponse({ status: 200, description: '成功' })
async putFormshare(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.modifyShare(query, query);
async putFormshare(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.modifyShare(Number(query.formId), query.share);
return Result.success(result);
}
@Post('form/copy')
@ApiOperation({ summary: '/form/copy' })
@ApiResponse({ status: 200, description: '成功' })
async postFormcopy(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.copy(query);
async postFormcopy(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.copy(Number(query.formId));
return Result.success(result);
}
@@ -120,16 +120,16 @@ export class DiyFormController {
@Get('form/records/:records_id')
@ApiOperation({ summary: '/form/records/{records_id}' })
@ApiResponse({ status: 200, description: '成功' })
async getFormrecordsrecordsid(@Param('records_id') records_id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.getRecordInfo(query);
async getFormrecordsrecordsid(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.getRecordInfo(Number(query.recordId));
return Result.success(result);
}
@Delete('form/records/delete')
@ApiOperation({ summary: '/form/records/delete' })
@ApiResponse({ status: 200, description: '成功' })
async deleteFormrecordsdelete(): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.delRecord(query, query);
async deleteFormrecordsdelete(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormServiceImplService.delRecord(Number(query.formId), Number(query.recordId));
return Result.success(result);
}
@@ -144,8 +144,8 @@ export class DiyFormController {
@Get('form/write/:form_id')
@ApiOperation({ summary: '/form/write/{form_id}' })
@ApiResponse({ status: 200, description: '成功' })
async getFormwriteformid(@Param('form_id') form_id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormConfigServiceImplService.getWriteConfig(query);
async getFormwriteformid(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormConfigServiceImplService.getWriteConfig(Number(query.formId));
return Result.success(result);
}
@@ -160,8 +160,8 @@ export class DiyFormController {
@Get('form/submit/:form_id')
@ApiOperation({ summary: '/form/submit/{form_id}' })
@ApiResponse({ status: 200, description: '成功' })
async getFormsubmitformid(@Param('form_id') form_id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormConfigServiceImplService.getSubmitConfig(query);
async getFormsubmitformid(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyFormConfigServiceImplService.getSubmitConfig(Number(query.formId));
return Result.success(result);
}

View File

@@ -25,7 +25,7 @@ export class DiyRouteController {
@ApiOperation({ summary: '/apps' })
@ApiResponse({ status: 200, description: '成功' })
async getApps(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyRouteServiceImplService.getInfoByName(query);
const result = await this.diyRouteServiceImplService.getInfoByName(query.name);
return Result.success(result);
}
@@ -33,7 +33,7 @@ export class DiyRouteController {
@ApiOperation({ summary: '/info' })
@ApiResponse({ status: 200, description: '成功' })
async getInfo(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyRouteServiceImplService.getInfoByName(query);
const result = await this.diyRouteServiceImplService.getInfoByName(query.name);
return Result.success(result);
}

View File

@@ -47,7 +47,7 @@ export class DiyThemeController {
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putId(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.diyThemeServiceImplService.editDiyTheme(id, body);
const result = await this.diyThemeServiceImplService.editDiyTheme(Number(id), body);
return Result.success(result);
}
@@ -55,7 +55,7 @@ export class DiyThemeController {
@ApiOperation({ summary: '/delete/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.diyThemeServiceImplService.delDiyTheme(id);
const result = await this.diyThemeServiceImplService.delDiyTheme(Number(id));
return Result.success(result);
}
}

View File

@@ -49,7 +49,7 @@ export class DiyController {
@ApiOperation({ summary: '/diy/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putDiyid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.diyServiceImplService.edit(id, body);
const result = await this.diyServiceImplService.edit(Number(id), body);
return Result.success(result);
}
@@ -57,7 +57,7 @@ export class DiyController {
@ApiOperation({ summary: '/diy/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteDiyid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.diyServiceImplService.del(id);
const result = await this.diyServiceImplService.del(Number(id));
return Result.success(result);
}
@@ -88,8 +88,8 @@ export class DiyController {
@Put('use/:id')
@ApiOperation({ summary: '/use/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putUseid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.diyServiceImplService.setUse(id);
async putUseid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.diyServiceImplService.setUse(Number(id));
return Result.success(result);
}
@@ -136,8 +136,8 @@ export class DiyController {
@Post('copy')
@ApiOperation({ summary: '/copy' })
@ApiResponse({ status: 200, description: '成功' })
async postCopy(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.diyServiceImplService.copy(query);
async postCopy(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.diyServiceImplService.copy(Number(query.id));
return Result.success(result);
}

View File

@@ -20,16 +20,16 @@ export class GenerateController {
@Get('generator/:id')
@ApiOperation({ summary: '/generator/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getGeneratorid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.generateServiceImplService.getInfo(id);
async getGeneratorid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.generateServiceImplService.getInfo(Number(id));
return Result.success(result);
}
@Post('generator')
@ApiOperation({ summary: '/generator' })
@ApiResponse({ status: 200, description: '成功' })
async postGenerator(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.generateServiceImplService.edit(query, body);
async postGenerator(@Body() body: Record<string, any>, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.generateServiceImplService.edit(Number(query.id), body);
return Result.success(result);
}
@@ -37,7 +37,7 @@ export class GenerateController {
@ApiOperation({ summary: '/generator/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putGeneratorid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.generateServiceImplService.edit(id, body);
const result = await this.generateServiceImplService.edit(Number(id), body);
return Result.success(result);
}
@@ -45,7 +45,7 @@ export class GenerateController {
@ApiOperation({ summary: '/generator/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteGeneratorid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.generateServiceImplService.del(id);
const result = await this.generateServiceImplService.del(Number(id));
return Result.success(result);
}
@@ -61,15 +61,15 @@ export class GenerateController {
@ApiOperation({ summary: '/table' })
@ApiResponse({ status: 200, description: '成功' })
async getTable(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.generateServiceImplService.preview(query);
const result = await this.generateServiceImplService.preview(Number(query.id));
return Result.success(result);
}
@Get('preview/:id')
@ApiOperation({ summary: '/preview/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getPreviewid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.generateServiceImplService.preview(id);
async getPreviewid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.generateServiceImplService.preview(Number(id));
return Result.success(result);
}
@@ -77,7 +77,7 @@ export class GenerateController {
@ApiOperation({ summary: '/check_file' })
@ApiResponse({ status: 200, description: '成功' })
async getCheckfile(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.generateServiceImplService.checkFile(query);
const result = await this.generateServiceImplService.checkFile(query.checkFile);
return Result.success(result);
}
@@ -85,7 +85,7 @@ export class GenerateController {
@ApiOperation({ summary: '/table_column' })
@ApiResponse({ status: 200, description: '成功' })
async getTablecolumn(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.generateServiceImplService.getTableColumn(query);
const result = await this.generateServiceImplService.getTableColumn(query.tableName);
return Result.success(result);
}

View File

@@ -22,8 +22,8 @@ export class SiteController {
@Get('site/:id')
@ApiOperation({ summary: '/site/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getSiteid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.authSiteServiceImplService.info(id);
async getSiteid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.authSiteServiceImplService.info(Number(id));
return Result.success(result);
}
@@ -31,7 +31,7 @@ export class SiteController {
@ApiOperation({ summary: '/site/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putSiteid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.authSiteServiceImplService.edit(id, body);
const result = await this.authSiteServiceImplService.edit(Number(id), body);
return Result.success(result);
}

View File

@@ -14,7 +14,7 @@ export class CaptchaController {
@ApiOperation({ summary: '/create' })
@ApiResponse({ status: 200, description: '成功' })
async getCreate(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.coreCaptchaImgServiceImplService.create(query);
const result = await this.coreCaptchaImgServiceImplService.create(query.captchaType);
return Result.success(result);
}

View File

@@ -15,7 +15,7 @@ export class LoginController {
@Get(':appType')
@ApiOperation({ summary: '/{appType}' })
@ApiResponse({ status: 200, description: '成功' })
async getAppType(@Param('appType') appType: string, @Query() query: Record<string, any>): Promise<Result<any>> {
async getAppType(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.loginServiceImplService.login(query);
return Result.success(result);
}

View File

@@ -22,8 +22,8 @@ export class MemberAddressController {
@Get(':id')
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getId(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.memberAddressServiceImplService.info(id);
async getId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.memberAddressServiceImplService.info(Number(id));
return Result.success(result);
}
@@ -39,7 +39,7 @@ export class MemberAddressController {
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putId(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.memberAddressServiceImplService.edit(id, body);
const result = await this.memberAddressServiceImplService.edit(Number(id), body);
return Result.success(result);
}
@@ -47,7 +47,7 @@ export class MemberAddressController {
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.memberAddressServiceImplService.del(id);
const result = await this.memberAddressServiceImplService.del(Number(id));
return Result.success(result);
}
}

View File

@@ -22,8 +22,8 @@ export class MemberCashOutController {
@Get(':id')
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getId(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.memberCashOutServiceImplService.info(id);
async getId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.memberCashOutServiceImplService.info(Number(id));
return Result.success(result);
}
@@ -38,7 +38,7 @@ export class MemberCashOutController {
@Put('audit/:id/:action')
@ApiOperation({ summary: '/audit/{id}/{action}' })
@ApiResponse({ status: 200, description: '成功' })
async putAuditidaction(@Body() body: Record<string, any>, @Param() params: Record<string, string>): Promise<Result<any>> {
async putAuditidaction(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.memberCashOutServiceImplService.audit(body);
return Result.success(result);
}
@@ -46,8 +46,8 @@ export class MemberCashOutController {
@Put('cancel/:id')
@ApiOperation({ summary: '/cancel/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putCancelid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.memberCashOutServiceImplService.cancel(id);
async putCancelid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.memberCashOutServiceImplService.cancel(Number(id));
return Result.success(result);
}
@@ -55,7 +55,7 @@ export class MemberCashOutController {
@ApiOperation({ summary: '/remark/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putRemarkid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.memberCashOutServiceImplService.remark(id, body);
const result = await this.memberCashOutServiceImplService.remark(Number(id), body);
return Result.success(result);
}
@@ -70,7 +70,7 @@ export class MemberCashOutController {
@Put('transfer/:id')
@ApiOperation({ summary: '/transfer/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putTransferid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
async putTransferid(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.memberCashOutServiceImplService.transfer(body);
return Result.success(result);
}
@@ -86,8 +86,8 @@ export class MemberCashOutController {
@Put('check/:id')
@ApiOperation({ summary: '/check/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putCheckid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.memberCashOutServiceImplService.checkTransferStatus(id);
async putCheckid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.memberCashOutServiceImplService.checkTransferStatus(Number(id));
return Result.success(result);
}
}

View File

@@ -70,7 +70,7 @@ export class MemberConfigController {
@Post('growth_rule')
@ApiOperation({ summary: '/growth_rule' })
@ApiResponse({ status: 200, description: '成功' })
async postGrowthrule(@Body() body: Record<string, any>): Promise<Result<any>> {
async postGrowthrule(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.memberConfigServiceImplService.setGrowthRuleConfig(query);
return Result.success(result);
}
@@ -86,7 +86,7 @@ export class MemberConfigController {
@Post('point_rule')
@ApiOperation({ summary: '/point_rule' })
@ApiResponse({ status: 200, description: '成功' })
async postPointrule(@Body() body: Record<string, any>): Promise<Result<any>> {
async postPointrule(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.memberConfigServiceImplService.setPointRuleConfig(query);
return Result.success(result);
}

View File

@@ -22,8 +22,8 @@ export class MemberLabelController {
@Get('label/:id')
@ApiOperation({ summary: '/label/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getLabelid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.memberLabelServiceImplService.info(id);
async getLabelid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.memberLabelServiceImplService.info(Number(id));
return Result.success(result);
}
@@ -39,7 +39,7 @@ export class MemberLabelController {
@ApiOperation({ summary: '/label/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putLabelid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.memberLabelServiceImplService.edit(id, body);
const result = await this.memberLabelServiceImplService.edit(Number(id), body);
return Result.success(result);
}
@@ -47,7 +47,7 @@ export class MemberLabelController {
@ApiOperation({ summary: '/label/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteLabelid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.memberLabelServiceImplService.del(id);
const result = await this.memberLabelServiceImplService.del(Number(id));
return Result.success(result);
}

View File

@@ -22,8 +22,8 @@ export class MemberLevelController {
@Get(':id')
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getId(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.memberLevelServiceImplService.info(id);
async getId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.memberLevelServiceImplService.info(Number(id));
return Result.success(result);
}
@@ -39,7 +39,7 @@ export class MemberLevelController {
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putId(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.memberLevelServiceImplService.edit(id, body);
const result = await this.memberLevelServiceImplService.edit(Number(id), body);
return Result.success(result);
}
@@ -47,7 +47,7 @@ export class MemberLevelController {
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.memberLevelServiceImplService.del(id);
const result = await this.memberLevelServiceImplService.del(Number(id));
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, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.memberServiceImplService.info(id);
async getMemberid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.memberServiceImplService.info(Number(id));
return Result.success(result);
}
@@ -46,15 +46,15 @@ export class MemberController {
@Put('member/:member_id')
@ApiOperation({ summary: '/member/{member_id}' })
@ApiResponse({ status: 200, description: '成功' })
async putMembermemberid(@Body() body: Record<string, any>, @Param('member_id') member_id: string): Promise<Result<any>> {
const result = await this.memberServiceImplService.edit(query, body);
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);
return Result.success(result);
}
@Put('member/modify/:member_id/:field')
@ApiOperation({ summary: '/member/modify/{member_id}/{field}' })
@ApiResponse({ status: 200, description: '成功' })
async putMembermodifymemberidfield(@Body() body: Record<string, any>, @Param() params: Record<string, string>): Promise<Result<any>> {
async putMembermodifymemberidfield(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.memberServiceImplService.modify(body);
return Result.success(result);
}
@@ -62,8 +62,8 @@ export class MemberController {
@Delete('member/:member_id')
@ApiOperation({ summary: '/member/{member_id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteMembermemberid(@Param('member_id') member_id: string): Promise<Result<any>> {
const result = await this.memberServiceImplService.del(query);
async deleteMembermemberid(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.memberServiceImplService.del(Number(query.id));
return Result.success(result);
}
@@ -103,7 +103,7 @@ export class MemberController {
@ApiOperation({ summary: '/setstatus/{status}' })
@ApiResponse({ status: 200, description: '成功' })
async putSetstatusstatus(@Body() body: Record<string, any>, @Param('status') status: string): Promise<Result<any>> {
const result = await this.memberServiceImplService.setStatus(status, body);
const result = await this.memberServiceImplService.setStatus(Number(status), body);
return Result.success(result);
}
@@ -142,7 +142,7 @@ export class MemberController {
@Post('gifts/content')
@ApiOperation({ summary: '/gifts/content' })
@ApiResponse({ status: 200, description: '成功' })
async postGiftscontent(@Body() body: Record<string, any>): Promise<Result<any>> {
async postGiftscontent(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.memberServiceImplService.getMemberGiftsContent(query);
return Result.success(result);
}
@@ -150,7 +150,7 @@ export class MemberController {
@Post('benefits/content')
@ApiOperation({ summary: '/benefits/content' })
@ApiResponse({ status: 200, description: '成功' })
async postBenefitscontent(@Body() body: Record<string, any>): Promise<Result<any>> {
async postBenefitscontent(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.memberServiceImplService.getMemberBenefitsContent(query);
return Result.success(result);
}

View File

@@ -15,15 +15,15 @@ export class CloudController {
@ApiOperation({ summary: '/build' })
@ApiResponse({ status: 200, description: '成功' })
async getBuild(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.cloudBuildServiceImplService.getBuildTask(query);
const result = await this.cloudBuildServiceImplService.getBuildTask(query.mode);
return Result.success(result);
}
@Post('build')
@ApiOperation({ summary: '/build' })
@ApiResponse({ status: 200, description: '成功' })
async postBuild(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.cloudBuildServiceImplService.build(query);
async postBuild(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.cloudBuildServiceImplService.build(query.mode);
return Result.success(result);
}
@@ -31,7 +31,7 @@ export class CloudController {
@ApiOperation({ summary: '/build/log' })
@ApiResponse({ status: 200, description: '成功' })
async getBuildlog(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.cloudBuildServiceImplService.getBuildLog(query);
const result = await this.cloudBuildServiceImplService.getBuildLog(query.mode);
return Result.success(result);
}

View File

@@ -86,7 +86,7 @@ export class NiuSmsController {
@Get('template/list/:smsType/:username')
@ApiOperation({ summary: '/template/list/{smsType}/{username}' })
@ApiResponse({ status: 200, description: '成功' })
async getTemplatelistsmsTypeusername(@Param() params: Record<string, string>, @Query() query: Record<string, any>): Promise<Result<any>> {
async getTemplatelistsmsTypeusername(@Param('smsType') smsType: string, @Param('username') username: string, @Query() query: Record<string, any>): Promise<Result<any>> {
// TODO: 实现业务逻辑
return Result.success(null);
}
@@ -198,7 +198,7 @@ export class NiuSmsController {
@Get('template/sync/:smsType/:username')
@ApiOperation({ summary: '/template/sync/{smsType}/{username}' })
@ApiResponse({ status: 200, description: '成功' })
async getTemplatesyncsmsTypeusername(@Param() params: Record<string, string>, @Query() query: Record<string, any>): Promise<Result<any>> {
async getTemplatesyncsmsTypeusername(@Param('smsType') smsType: string, @Param('username') username: string, @Query() query: Record<string, any>): Promise<Result<any>> {
// TODO: 实现业务逻辑
return Result.success(null);
}
@@ -206,7 +206,7 @@ export class NiuSmsController {
@Post('template/report/:smsType/:username')
@ApiOperation({ summary: '/template/report/{smsType}/{username}' })
@ApiResponse({ status: 200, description: '成功' })
async postTemplatereportsmsTypeusername(@Body() body: Record<string, any>, @Param() params: Record<string, string>): Promise<Result<any>> {
async postTemplatereportsmsTypeusername(@Body() body: Record<string, any>, @Param('smsType') smsType: string, @Param('username') username: string): Promise<Result<any>> {
// TODO: 实现业务逻辑
return Result.success(null);
}
@@ -214,7 +214,7 @@ export class NiuSmsController {
@Delete('template/:username/:templateId')
@ApiOperation({ summary: '/template/{username}/{templateId}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteTemplateusernametemplateId(@Param() params: Record<string, string>): Promise<Result<any>> {
async deleteTemplateusernametemplateId(@Param('username') username: string, @Param('templateId') templateId: string): Promise<Result<any>> {
// TODO: 实现业务逻辑
return Result.success(null);
}
@@ -222,7 +222,7 @@ export class NiuSmsController {
@Get('template/info/:smsType/:username')
@ApiOperation({ summary: '/template/info/{smsType}/{username}' })
@ApiResponse({ status: 200, description: '成功' })
async getTemplateinfosmsTypeusername(@Param() params: Record<string, string>, @Query() query: Record<string, any>): Promise<Result<any>> {
async getTemplateinfosmsTypeusername(@Param('smsType') smsType: string, @Param('username') username: string, @Query() query: Record<string, any>): Promise<Result<any>> {
// TODO: 实现业务逻辑
return Result.success(null);
}

View File

@@ -22,8 +22,8 @@ export class NoticeLogController {
@Get(':id')
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getId(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysNoticeLogServiceImplService.info(id);
async getId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysNoticeLogServiceImplService.info(Number(id));
return Result.success(result);
}
}

View File

@@ -22,8 +22,8 @@ export class NoticeSmsLogController {
@Get(':id')
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getId(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysNoticeSmsLogServiceImplService.info(id);
async getId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysNoticeSmsLogServiceImplService.info(Number(id));
return Result.success(result);
}
}

View File

@@ -22,8 +22,8 @@ export class NoticeController {
@Get('notice/:key')
@ApiOperation({ summary: '/notice/{key}' })
@ApiResponse({ status: 200, description: '成功' })
async getNoticekey(@Param('key') key: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.noticeServiceImplService.getInfo(query);
async getNoticekey(@Param('key') key: string): Promise<Result<any>> {
const result = await this.noticeServiceImplService.getInfo(key);
return Result.success(result);
}
@@ -54,7 +54,7 @@ export class NoticeController {
@Put('notice/sms/:sms_type')
@ApiOperation({ summary: '/notice/sms/{sms_type}' })
@ApiResponse({ status: 200, description: '成功' })
async putNoticesmssmstype(@Body() body: Record<string, any>, @Param('sms_type') sms_type: string): Promise<Result<any>> {
async putNoticesmssmstype(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.noticeServiceImplService.editMessageStatus(body);
return Result.success(result);
}

View File

@@ -30,15 +30,15 @@ export class PayChannelController {
@Post('channel/set/all')
@ApiOperation({ summary: '/channel/set/all' })
@ApiResponse({ status: 200, description: '成功' })
async postChannelsetall(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.payChannelServiceImplService.set(query, query, query);
async postChannelsetall(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.payChannelServiceImplService.set(query.channel, query.type, query);
return Result.success(result);
}
@Post('channel/set/:channel/:type')
@ApiOperation({ summary: '/channel/set/{channel}/{type}' })
@ApiResponse({ status: 200, description: '成功' })
async postChannelsetchanneltype(@Body() body: Record<string, any>, @Param() params: Record<string, string>): Promise<Result<any>> {
async postChannelsetchanneltype(@Param('channel') channel: string, @Param('type') type: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.payChannelServiceImplService.set(channel, type, query);
return Result.success(result);
}
@@ -46,15 +46,15 @@ export class PayChannelController {
@Get('channel/lists/:channel')
@ApiOperation({ summary: '/channel/lists/{channel}' })
@ApiResponse({ status: 200, description: '成功' })
async getChannellistschannel(@Param('channel') channel: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.payChannelServiceImplService.getListByChannel(query);
async getChannellistschannel(@Param('channel') channel: string): Promise<Result<any>> {
const result = await this.payChannelServiceImplService.getListByChannel(channel);
return Result.success(result);
}
@Post('channel/set/transfer')
@ApiOperation({ summary: '/channel/set/transfer' })
@ApiResponse({ status: 200, description: '成功' })
async postChannelsettransfer(@Body() body: Record<string, any>): Promise<Result<any>> {
async postChannelsettransfer(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.payChannelServiceImplService.setTransfer(query);
return Result.success(result);
}

View File

@@ -22,8 +22,8 @@ export class PayRefundController {
@Get(':refund_no')
@ApiOperation({ summary: '/{refund_no}' })
@ApiResponse({ status: 200, description: '成功' })
async getRefundno(@Param('refund_no') refund_no: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.payRefundServiceImplService.info(query);
async getRefundno(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.payRefundServiceImplService.info(query.refundNo);
return Result.success(result);
}

View File

@@ -23,7 +23,7 @@ export class PayController {
@ApiOperation({ summary: '/info' })
@ApiResponse({ status: 200, description: '成功' })
async getInfo(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.payServiceImplService.info(query);
const result = await this.payServiceImplService.info(Number(query.id));
return Result.success(result);
}
@@ -38,23 +38,23 @@ export class PayController {
@Post('edit')
@ApiOperation({ summary: '/edit' })
@ApiResponse({ status: 200, description: '成功' })
async postEdit(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.payServiceImplService.edit(query, body);
async postEdit(@Body() body: Record<string, any>, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.payServiceImplService.edit(Number(query.id), body);
return Result.success(result);
}
@Post('del')
@ApiOperation({ summary: '/del' })
@ApiResponse({ status: 200, description: '成功' })
async postDel(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.payServiceImplService.del(query);
async postDel(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.payServiceImplService.del(Number(query.id));
return Result.success(result);
}
@Get('friendspay/info/:trade_type/:trade_id/:channel')
@ApiOperation({ summary: '/friendspay/info/{trade_type}/{trade_id}/{channel}' })
@ApiResponse({ status: 200, description: '成功' })
async getFriendspayinfotradetypetradeidchannel(@Param() params: Record<string, string>, @Query() query: Record<string, any>): Promise<Result<any>> {
async getFriendspayinfotradetypetradeidchannel(@Param('trade_type') trade_type: string, @Param('trade_id') trade_id: string, @Param('channel') channel: string, @Query() query: Record<string, any>): Promise<Result<any>> {
// TODO: 实现业务逻辑
return Result.success(null);
}

View File

@@ -22,8 +22,8 @@ export class SiteAccountLogController {
@Get(':id')
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getId(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.siteAccountLogServiceImplService.info(id);
async getId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.siteAccountLogServiceImplService.info(Number(id));
return Result.success(result);
}

View File

@@ -30,8 +30,8 @@ export class SiteGroupController {
@Get(':id')
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getId(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.siteGroupServiceImplService.info(id);
async getId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.siteGroupServiceImplService.info(Number(id));
return Result.success(result);
}
@@ -39,7 +39,7 @@ export class SiteGroupController {
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putId(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.siteGroupServiceImplService.edit(id, body);
const result = await this.siteGroupServiceImplService.edit(Number(id), body);
return Result.success(result);
}
@@ -47,7 +47,7 @@ export class SiteGroupController {
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.siteGroupServiceImplService.del(id);
const result = await this.siteGroupServiceImplService.del(Number(id));
return Result.success(result);
}
@@ -63,7 +63,7 @@ export class SiteGroupController {
@ApiOperation({ summary: '/user' })
@ApiResponse({ status: 200, description: '成功' })
async getUser(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.siteGroupServiceImplService.getUserSiteGroupAll(query);
const result = await this.siteGroupServiceImplService.getUserSiteGroupAll(Number(query.uid));
return Result.success(result);
}

View File

@@ -24,8 +24,8 @@ export class SiteController {
@Get('site/:id')
@ApiOperation({ summary: '/site/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getSiteid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.siteServiceImplService.info(id);
async getSiteid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.siteServiceImplService.info(Number(id));
return Result.success(result);
}
@@ -41,7 +41,7 @@ export class SiteController {
@ApiOperation({ summary: '/site/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putSiteid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.siteServiceImplService.edit(id, body);
const result = await this.siteServiceImplService.edit(Number(id), body);
return Result.success(result);
}
@@ -49,23 +49,23 @@ export class SiteController {
@ApiOperation({ summary: '/site/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteSiteid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.siteServiceImplService.del(id);
const result = await this.siteServiceImplService.del(Number(id));
return Result.success(result);
}
@Put('closesite/:id')
@ApiOperation({ summary: '/closesite/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putClosesiteid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.siteServiceImplService.closeSite(query);
async putClosesiteid(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.siteServiceImplService.closeSite(Number(query.siteId));
return Result.success(result);
}
@Put('opensite/:id')
@ApiOperation({ summary: '/opensite/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putOpensiteid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.siteServiceImplService.openSite(query);
async putOpensiteid(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.siteServiceImplService.openSite(Number(query.siteId));
return Result.success(result);
}
@@ -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);
const result = await this.authServiceImplService.getAuthMenuTreeList(query.addon);
return Result.success(result);
}
@@ -81,7 +81,7 @@ 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);
const result = await this.authServiceImplService.getAuthMenuTreeList(query.addon);
return Result.success(result);
}
@@ -129,15 +129,15 @@ export class SiteController {
@ApiOperation({ summary: '/captcha/create' })
@ApiResponse({ status: 200, description: '成功' })
async getCaptchacreate(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.siteServiceImplService.siteInit(query);
const result = await this.siteServiceImplService.siteInit(Number(query.siteId));
return Result.success(result);
}
@Post('init')
@ApiOperation({ summary: '/init' })
@ApiResponse({ status: 200, description: '成功' })
async postInit(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.siteServiceImplService.siteInit(query);
async postInit(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.siteServiceImplService.siteInit(Number(query.siteId));
return Result.success(result);
}

View File

@@ -22,8 +22,8 @@ export class UserLogController {
@Get('log/:id')
@ApiOperation({ summary: '/log/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getLogid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysUserLogServiceImplService.info(id);
async getLogid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysUserLogServiceImplService.info(Number(id));
return Result.success(result);
}

View File

@@ -30,8 +30,8 @@ export class UserController {
@Get('user/:uid')
@ApiOperation({ summary: 'user/{uid}' })
@ApiResponse({ status: 200, description: '成功' })
async getUseruid(@Param('uid') uid: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.siteUserServiceImplService.getInfo(uid);
async getUseruid(@Param('uid') uid: string): Promise<Result<any>> {
const result = await this.siteUserServiceImplService.getInfo(Number(uid));
return Result.success(result);
}
@@ -39,23 +39,23 @@ export class UserController {
@ApiOperation({ summary: 'user/{uid}' })
@ApiResponse({ status: 200, description: '成功' })
async putUseruid(@Body() body: Record<string, any>, @Param('uid') uid: string): Promise<Result<any>> {
const result = await this.siteUserServiceImplService.edit(uid, body);
const result = await this.siteUserServiceImplService.edit(Number(uid), body);
return Result.success(result);
}
@Put('user/lock/:uid')
@ApiOperation({ summary: 'user/lock/{uid}' })
@ApiResponse({ status: 200, description: '成功' })
async putUserlockuid(@Body() body: Record<string, any>, @Param('uid') uid: string): Promise<Result<any>> {
const result = await this.siteUserServiceImplService.lock(uid);
async putUserlockuid(@Param('uid') uid: string): Promise<Result<any>> {
const result = await this.siteUserServiceImplService.lock(Number(uid));
return Result.success(result);
}
@Put('user/unlock/:uid')
@ApiOperation({ summary: 'user/unlock/{uid}' })
@ApiResponse({ status: 200, description: '成功' })
async putUserunlockuid(@Body() body: Record<string, any>, @Param('uid') uid: string): Promise<Result<any>> {
const result = await this.siteUserServiceImplService.unlock(uid);
async putUserunlockuid(@Param('uid') uid: string): Promise<Result<any>> {
const result = await this.siteUserServiceImplService.unlock(Number(uid));
return Result.success(result);
}
@@ -63,7 +63,7 @@ export class UserController {
@ApiOperation({ summary: 'user/{uid}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteUseruid(@Param('uid') uid: string): Promise<Result<any>> {
const result = await this.siteUserServiceImplService.delete(uid);
const result = await this.siteUserServiceImplService.delete(Number(uid));
return Result.success(result);
}
}

View File

@@ -23,7 +23,7 @@ export class StatHourController {
@ApiOperation({ summary: '/info' })
@ApiResponse({ status: 200, description: '成功' })
async getInfo(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.statHourServiceImplService.info(query);
const result = await this.statHourServiceImplService.info(Number(query.id));
return Result.success(result);
}
@@ -38,16 +38,16 @@ export class StatHourController {
@Post('edit')
@ApiOperation({ summary: '/edit' })
@ApiResponse({ status: 200, description: '成功' })
async postEdit(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.statHourServiceImplService.edit(query, body);
async postEdit(@Body() body: Record<string, any>, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.statHourServiceImplService.edit(Number(query.id), body);
return Result.success(result);
}
@Post('del')
@ApiOperation({ summary: '/del' })
@ApiResponse({ status: 200, description: '成功' })
async postDel(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.statHourServiceImplService.del(query);
async postDel(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.statHourServiceImplService.del(Number(query.id));
return Result.success(result);
}
}

View File

@@ -22,16 +22,16 @@ export class SysAgreementController {
@Get('agreement/:key')
@ApiOperation({ summary: '/agreement/{key}' })
@ApiResponse({ status: 200, description: '成功' })
async getAgreementkey(@Param('key') key: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysAgreementServiceImplService.getAgreement(query);
async getAgreementkey(@Param('key') key: string): Promise<Result<any>> {
const result = await this.sysAgreementServiceImplService.getAgreement(key);
return Result.success(result);
}
@Put('agreement/:key')
@ApiOperation({ summary: '/agreement/{key}' })
@ApiResponse({ status: 200, description: '成功' })
async putAgreementkey(@Body() body: Record<string, any>, @Param('key') key: string): Promise<Result<any>> {
const result = await this.sysAgreementServiceImplService.setAgreement(key, query, query);
async putAgreementkey(@Param('key') key: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysAgreementServiceImplService.setAgreement(key, query.title, query.content);
return Result.success(result);
}
}

View File

@@ -14,24 +14,24 @@ export class SysAreaController {
@Get('list_by_pid/:pid')
@ApiOperation({ summary: '/list_by_pid/{pid}' })
@ApiResponse({ status: 200, description: '成功' })
async getListbypidpid(@Param('pid') pid: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysAreaServiceImplService.getListByPid(pid);
async getListbypidpid(@Param('pid') pid: string): Promise<Result<any>> {
const result = await this.sysAreaServiceImplService.getListByPid(Number(pid));
return Result.success(result);
}
@Get('tree/:level')
@ApiOperation({ summary: '/tree/{level}' })
@ApiResponse({ status: 200, description: '成功' })
async getTreelevel(@Param('level') level: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysAreaServiceImplService.getAreaTree(query);
async getTreelevel(@Param('level') level: string): Promise<Result<any>> {
const result = await this.sysAreaServiceImplService.getAreaTree(Number(level));
return Result.success(result);
}
@Get('code/:code')
@ApiOperation({ summary: '/code/{code}' })
@ApiResponse({ status: 200, description: '成功' })
async getCodecode(@Param('code') code: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysAreaServiceImplService.getAddressInfo(query);
async getCodecode(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysAreaServiceImplService.getAddressInfo(query.location);
return Result.success(result);
}
@@ -39,7 +39,7 @@ export class SysAreaController {
@ApiOperation({ summary: '/contrary' })
@ApiResponse({ status: 200, description: '成功' })
async getContrary(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysAreaServiceImplService.getAddressInfo(query);
const result = await this.sysAreaServiceImplService.getAddressInfo(query.location);
return Result.success(result);
}
@@ -47,7 +47,7 @@ export class SysAreaController {
@ApiOperation({ summary: '/get_info' })
@ApiResponse({ status: 200, description: '成功' })
async getinfo(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysAreaServiceImplService.getAddress(query);
const result = await this.sysAreaServiceImplService.getAddress(query.address);
return Result.success(result);
}
}

View File

@@ -22,7 +22,7 @@ export class SysAttachmentController {
@Delete('attachment/del')
@ApiOperation({ summary: '/attachment/del' })
@ApiResponse({ status: 200, description: '成功' })
async deleteAttachmentdel(): Promise<Result<any>> {
async deleteAttachmentdel(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysAttachmentServiceImplService.del(query);
return Result.success(result);
}
@@ -54,7 +54,7 @@ export class SysAttachmentController {
@Post('document/:type')
@ApiOperation({ summary: '/document/{type}' })
@ApiResponse({ status: 200, description: '成功' })
async postDocumenttype(@Body() body: Record<string, any>, @Param('type') type: string): Promise<Result<any>> {
async postDocumenttype(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.sysAttachmentServiceImplService.document(body);
return Result.success(result);
}
@@ -79,7 +79,7 @@ export class SysAttachmentController {
@ApiOperation({ summary: '/attachment/category/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putAttachmentcategoryid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.sysAttachmentServiceImplService.editCategory(id, body);
const result = await this.sysAttachmentServiceImplService.editCategory(Number(id), body);
return Result.success(result);
}
@@ -87,7 +87,7 @@ export class SysAttachmentController {
@ApiOperation({ summary: '/attachment/category/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteAttachmentcategoryid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysAttachmentServiceImplService.delCategory(id);
const result = await this.sysAttachmentServiceImplService.delCategory(Number(id));
return Result.success(result);
}

View File

@@ -96,7 +96,7 @@ export class SysConfigController {
@Put('config/layout')
@ApiOperation({ summary: '/config/layout' })
@ApiResponse({ status: 200, description: '成功' })
async putConfiglayout(@Body() body: Record<string, any>): Promise<Result<any>> {
async putConfiglayout(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.setLayout(query);
return Result.success(result);
}
@@ -112,7 +112,7 @@ export class SysConfigController {
@Put('config/themecolor')
@ApiOperation({ summary: '/config/themecolor' })
@ApiResponse({ status: 200, description: '成功' })
async putConfigthemecolor(@Body() body: Record<string, any>): Promise<Result<any>> {
async putConfigthemecolor(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysConfigServiceImplService.setThemeColor(query);
return Result.success(result);
}

View File

@@ -31,7 +31,7 @@ export class SysExportController {
@ApiOperation({ summary: '/export/type' })
@ApiResponse({ status: 200, description: '成功' })
async getExporttype(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysExportServiceImplService.checkExportData(query, query, query);
const result = await this.sysExportServiceImplService.checkExportData(query.type, query, query);
return Result.success(result);
}
@@ -39,7 +39,7 @@ export class SysExportController {
@ApiOperation({ summary: '/export/check/{type}' })
@ApiResponse({ status: 200, description: '成功' })
async getExportchecktype(@Param('type') type: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysExportServiceImplService.checkExportData(query, query, query);
const result = await this.sysExportServiceImplService.checkExportData(type, query, query);
return Result.success(result);
}
@@ -47,7 +47,7 @@ export class SysExportController {
@ApiOperation({ summary: '/export/{type}' })
@ApiResponse({ status: 200, description: '成功' })
async getExporttype1(@Param('type') type: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysExportServiceImplService.exportData(query, query, query);
const result = await this.sysExportServiceImplService.exportData(type, query, query);
return Result.success(result);
}
@@ -55,7 +55,7 @@ export class SysExportController {
@ApiOperation({ summary: '/export/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteExportid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysExportServiceImplService.del(id);
const result = await this.sysExportServiceImplService.del(Number(id));
return Result.success(result);
}
}

View File

@@ -15,15 +15,15 @@ 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(query, query);
const result = await this.sysMenuServiceImplService.getAllMenuList(appType, Number(query.status));
return Result.success(result);
}
@Get('menu/:appType/info/:menuKey')
@ApiOperation({ summary: '/menu/{appType}/info/{menuKey}' })
@ApiResponse({ status: 200, description: '成功' })
async getMenuappTypeinfomenuKey(@Param() params: Record<string, string>, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysMenuServiceImplService.get(query, query);
async getMenuappTypeinfomenuKey(@Param('appType') appType: string, @Param('menuKey') menuKey: string): Promise<Result<any>> {
const result = await this.sysMenuServiceImplService.get(appType, menuKey);
return Result.success(result);
}
@@ -38,7 +38,7 @@ export class SysMenuController {
@Put('menu/:appType/:menuKey')
@ApiOperation({ summary: '/menu/{appType}/{menuKey}' })
@ApiResponse({ status: 200, description: '成功' })
async putMenuappTypemenuKey(@Body() body: Record<string, any>, @Param() params: Record<string, string>): Promise<Result<any>> {
async putMenuappTypemenuKey(@Body() body: Record<string, any>, @Param('appType') appType: string, @Param('menuKey') menuKey: string): Promise<Result<any>> {
const result = await this.sysMenuServiceImplService.edit(appType, menuKey, body);
return Result.success(result);
}
@@ -46,7 +46,7 @@ export class SysMenuController {
@Delete('menu/:appType/:menuKey')
@ApiOperation({ summary: '/menu/{appType}/{menuKey}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteMenuappTypemenuKey(@Param() params: Record<string, string>): Promise<Result<any>> {
async deleteMenuappTypemenuKey(@Param('appType') appType: string, @Param('menuKey') menuKey: string): Promise<Result<any>> {
const result = await this.sysMenuServiceImplService.del(appType, menuKey);
return Result.success(result);
}
@@ -70,16 +70,16 @@ export class SysMenuController {
@Get('menu/dir/:addon')
@ApiOperation({ summary: '/menu/dir/{addon}' })
@ApiResponse({ status: 200, description: '成功' })
async getMenudiraddon(@Param('addon') addon: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysMenuServiceImplService.getMenuByTypeDir(query);
async getMenudiraddon(@Param('addon') addon: string): Promise<Result<any>> {
const result = await this.sysMenuServiceImplService.getMenuByTypeDir(addon);
return Result.success(result);
}
@Get('menu/addon_menu/:app_key')
@ApiOperation({ summary: '/menu/addon_menu/{app_key}' })
@ApiResponse({ status: 200, description: '成功' })
async getMenuaddonmenuappkey(@Param('app_key') app_key: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysMenuServiceImplService.getSystemMenu(query, query, query);
async getMenuaddonmenuappkey(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysMenuServiceImplService.getSystemMenu(query.status, Number(query.isTree), Number(query.isButton));
return Result.success(result);
}
@@ -87,7 +87,7 @@ export class SysMenuController {
@ApiOperation({ summary: '/menu/system_menu' })
@ApiResponse({ status: 200, description: '成功' })
async getMenusystemmenu(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysMenuServiceImplService.getSystemMenu(query, query, query);
const result = await this.sysMenuServiceImplService.getSystemMenu(query.status, Number(query.isTree), Number(query.isButton));
return Result.success(result);
}
}

View File

@@ -23,7 +23,7 @@ export class SysNoticeController {
@ApiOperation({ summary: '/info' })
@ApiResponse({ status: 200, description: '成功' })
async getInfo(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysNoticeServiceImplService.info(query);
const result = await this.sysNoticeServiceImplService.info(Number(query.id));
return Result.success(result);
}
@@ -38,16 +38,16 @@ export class SysNoticeController {
@Post('edit')
@ApiOperation({ summary: '/edit' })
@ApiResponse({ status: 200, description: '成功' })
async postEdit(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.sysNoticeServiceImplService.edit(query, body);
async postEdit(@Body() body: Record<string, any>, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysNoticeServiceImplService.edit(Number(query.id), body);
return Result.success(result);
}
@Post('del')
@ApiOperation({ summary: '/del' })
@ApiResponse({ status: 200, description: '成功' })
async postDel(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.sysNoticeServiceImplService.del(query);
async postDel(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysNoticeServiceImplService.del(Number(query.id));
return Result.success(result);
}
}

View File

@@ -32,8 +32,8 @@ export class SysPosterController {
@Get(':id')
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getId(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysPosterServiceImplService.info(id);
async getId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysPosterServiceImplService.info(Number(id));
return Result.success(result);
}
@@ -49,7 +49,7 @@ export class SysPosterController {
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putId(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.sysPosterServiceImplService.edit(id, body);
const result = await this.sysPosterServiceImplService.edit(Number(id), body);
return Result.success(result);
}
@@ -57,7 +57,7 @@ export class SysPosterController {
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysPosterServiceImplService.del(id);
const result = await this.sysPosterServiceImplService.del(Number(id));
return Result.success(result);
}
@@ -88,16 +88,16 @@ export class SysPosterController {
@Put('status')
@ApiOperation({ summary: '/status' })
@ApiResponse({ status: 200, description: '成功' })
async putStatus(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.sysPosterServiceImplService.modifyStatus(query, query);
async putStatus(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysPosterServiceImplService.modifyStatus(Number(query.id), Number(query.status));
return Result.success(result);
}
@Put('default')
@ApiOperation({ summary: '/default' })
@ApiResponse({ status: 200, description: '成功' })
async putDefault(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.sysPosterServiceImplService.modifyDefault(query);
async putDefault(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysPosterServiceImplService.modifyDefault(Number(query.id));
return Result.success(result);
}

View File

@@ -38,8 +38,8 @@ export class SysRoleController {
@Get('role/:roleId')
@ApiOperation({ summary: '/role/{roleId}' })
@ApiResponse({ status: 200, description: '成功' })
async getRoleroleId(@Param('roleId') roleId: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysRoleServiceImplService.info(query);
async getRoleroleId(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysRoleServiceImplService.info(Number(query.id));
return Result.success(result);
}
@@ -47,15 +47,15 @@ export class SysRoleController {
@ApiOperation({ summary: '/role/{roleId}' })
@ApiResponse({ status: 200, description: '成功' })
async putRoleroleId(@Body() body: Record<string, any>, @Param('roleId') roleId: string): Promise<Result<any>> {
const result = await this.sysRoleServiceImplService.edit(roleId, body);
const result = await this.sysRoleServiceImplService.edit(Number(roleId), body);
return Result.success(result);
}
@Delete('role/:roleId')
@ApiOperation({ summary: '/role/{roleId}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteRoleroleId(@Param('roleId') roleId: string): Promise<Result<any>> {
const result = await this.sysRoleServiceImplService.del(query);
async deleteRoleroleId(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysRoleServiceImplService.del(Number(query.id));
return Result.success(result);
}
}

View File

@@ -22,15 +22,15 @@ export class SysScheduleController {
@Get('info/:id')
@ApiOperation({ summary: '/info/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getInfoid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.info(id);
async getInfoid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.info(Number(id));
return Result.success(result);
}
@Put('modify/status/:id')
@ApiOperation({ summary: '/modify/status/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putModifystatusid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
async putModifystatusid(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.modifyStatus(body);
return Result.success(result);
}
@@ -47,7 +47,7 @@ export class SysScheduleController {
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putId(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.edit(id, body);
const result = await this.sysScheduleServiceImplService.edit(Number(id), body);
return Result.success(result);
}
@@ -55,7 +55,7 @@ export class SysScheduleController {
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.del(id);
const result = await this.sysScheduleServiceImplService.del(Number(id));
return Result.success(result);
}
@@ -102,15 +102,15 @@ export class SysScheduleController {
@Put('do/:id')
@ApiOperation({ summary: '/do/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putDoid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.doSchedule(id);
async putDoid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.doSchedule(Number(id));
return Result.success(result);
}
@Put('log/delete')
@ApiOperation({ summary: '/log/delete' })
@ApiResponse({ status: 200, description: '成功' })
async putLogdelete(@Body() body: Record<string, any>): Promise<Result<any>> {
async putLogdelete(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.delLog(query);
return Result.success(result);
}
@@ -118,8 +118,8 @@ export class SysScheduleController {
@Put('log/clear')
@ApiOperation({ summary: '/log/clear' })
@ApiResponse({ status: 200, description: '成功' })
async putLogclear(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.clearLog(query);
async putLogclear(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysScheduleServiceImplService.clearLog(Number(query.scheduleId));
return Result.success(result);
}
}

View File

@@ -22,8 +22,8 @@ export class SysUserRoleController {
@Get(':id')
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getId(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysUserRoleServiceImplService.info(id);
async getId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysUserRoleServiceImplService.info(Number(id));
return Result.success(result);
}
@@ -38,7 +38,7 @@ export class SysUserRoleController {
@Put(':id')
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putId(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
async putId(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.sysUserRoleServiceImplService.edit(body);
return Result.success(result);
}
@@ -46,8 +46,8 @@ export class SysUserRoleController {
@Post('del')
@ApiOperation({ summary: '/del' })
@ApiResponse({ status: 200, description: '成功' })
async postDel(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.sysUserRoleServiceImplService.del(query);
async postDel(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysUserRoleServiceImplService.del(Number(query.id));
return Result.success(result);
}
}

View File

@@ -24,15 +24,15 @@ export class StorageController {
@Get('storage/:storageType')
@ApiOperation({ summary: '/storage/{storageType}' })
@ApiResponse({ status: 200, description: '成功' })
async getStoragestorageType(@Param('storageType') storageType: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.storageConfigServiceImplService.getStorageConfig(query);
async getStoragestorageType(@Param('storageType') storageType: string): Promise<Result<any>> {
const result = await this.storageConfigServiceImplService.getStorageConfig(storageType);
return Result.success(result);
}
@Put('storage/:storageType')
@ApiOperation({ summary: '/storage/{storageType}' })
@ApiResponse({ status: 200, description: '成功' })
async putStoragestorageType(@Body() body: Record<string, any>, @Param('storageType') storageType: string): Promise<Result<any>> {
async putStoragestorageType(@Param('storageType') storageType: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.storageConfigServiceImplService.setStorageConfig(storageType, query);
return Result.success(result);
}
@@ -40,8 +40,8 @@ export class StorageController {
@Get('log/:id')
@ApiOperation({ summary: '/log/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getLogid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysUserLogServiceImplService.info(id);
async getLogid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysUserLogServiceImplService.info(Number(id));
return Result.success(result);
}
}

View File

@@ -22,8 +22,8 @@ export class UserController {
@Get('user/:id')
@ApiOperation({ summary: '/user/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getUserid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysUserServiceImplService.info(id);
async getUserid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysUserServiceImplService.info(Number(id));
return Result.success(result);
}
@@ -39,7 +39,7 @@ export class UserController {
@ApiOperation({ summary: '/user/{uid}' })
@ApiResponse({ status: 200, description: '成功' })
async putUseruid(@Body() body: Record<string, any>, @Param('uid') uid: string): Promise<Result<any>> {
const result = await this.sysUserServiceImplService.edit(uid, body);
const result = await this.sysUserServiceImplService.edit(Number(uid), body);
return Result.success(result);
}
@@ -47,23 +47,23 @@ export class UserController {
@ApiOperation({ summary: '/isexist' })
@ApiResponse({ status: 200, description: '成功' })
async getIsexist(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysUserServiceImplService.checkUserName(query);
const result = await this.sysUserServiceImplService.checkUserName(query.userName);
return Result.success(result);
}
@Get('user/create_site_limit/:uid')
@ApiOperation({ summary: '/user/create_site_limit/{uid}' })
@ApiResponse({ status: 200, description: '成功' })
async getUsercreatesitelimituid(@Param('uid') uid: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysUserServiceImplService.getUserCreateSiteLimit(uid);
async getUsercreatesitelimituid(@Param('uid') uid: string): Promise<Result<any>> {
const result = await this.sysUserServiceImplService.getUserCreateSiteLimit(Number(uid));
return Result.success(result);
}
@Get('user/create_site_limit/info/:id')
@ApiOperation({ summary: '/user/create_site_limit/info/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getUsercreatesitelimitinfoid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysUserServiceImplService.getUserCreateSiteLimitInfo(id);
async getUsercreatesitelimitinfoid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysUserServiceImplService.getUserCreateSiteLimitInfo(Number(id));
return Result.success(result);
}
@@ -78,7 +78,7 @@ export class UserController {
@Put('user/create_site_limit/:id')
@ApiOperation({ summary: '/user/create_site_limit/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putUsercreatesitelimitid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
async putUsercreatesitelimitid(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.sysUserServiceImplService.editUserCreateSiteLimit(body);
return Result.success(result);
}
@@ -87,7 +87,7 @@ export class UserController {
@ApiOperation({ summary: '/user/create_site_limit/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteUsercreatesitelimitid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysUserServiceImplService.delUserCreateSiteLimit(id);
const result = await this.sysUserServiceImplService.delUserCreateSiteLimit(Number(id));
return Result.success(result);
}
@@ -103,7 +103,7 @@ export class UserController {
@ApiOperation({ summary: 'user_select' })
@ApiResponse({ status: 200, description: '成功' })
async getUserselect(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.sysUserServiceImplService.getUserSelect(query);
const result = await this.sysUserServiceImplService.getUserSelect(query.username);
return Result.success(result);
}
@@ -111,7 +111,7 @@ export class UserController {
@ApiOperation({ summary: '/user/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteUserid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.sysUserServiceImplService.del(id);
const result = await this.sysUserServiceImplService.del(Number(id));
return Result.success(result);
}
}

View File

@@ -39,7 +39,7 @@ export class VerifierController {
@ApiOperation({ summary: '/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteId(@Param('id') id: string): Promise<Result<any>> {
const result = await this.verifierServiceImplService.del(id);
const result = await this.verifierServiceImplService.del(Number(id));
return Result.success(result);
}

View File

@@ -22,8 +22,8 @@ export class VerifyController {
@Get(':verify_code')
@ApiOperation({ summary: '/{verify_code}' })
@ApiResponse({ status: 200, description: '成功' })
async getVerifycode(@Param('verify_code') verify_code: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.verifyServiceImplService.detail(query);
async getVerifycode(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.verifyServiceImplService.detail(query.code);
return Result.success(result);
}
}

View File

@@ -46,7 +46,7 @@ export class ConfigController {
@Put('privacysetting')
@ApiOperation({ summary: '/privacysetting' })
@ApiResponse({ status: 200, description: '成功' })
async putPrivacysetting(@Body() body: Record<string, any>): Promise<Result<any>> {
async putPrivacysetting(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.weappConfigServiceImplService.setPrivacySetting(query);
return Result.success(result);
}

View File

@@ -38,8 +38,8 @@ export class VersionController {
@Get('upload/:key')
@ApiOperation({ summary: '/upload/{key}' })
@ApiResponse({ status: 200, description: '成功' })
async getUploadkey(@Param('key') key: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.weappVersionServiceImplService.getWeappCompileLog(query);
async getUploadkey(@Param('key') key: string): Promise<Result<any>> {
const result = await this.weappVersionServiceImplService.getWeappCompileLog(key);
return Result.success(result);
}
}

View File

@@ -22,7 +22,7 @@ export class MediaController {
@Post('media/image')
@ApiOperation({ summary: '/media/image' })
@ApiResponse({ status: 200, description: '成功' })
async postMediaimage(@Body() body: Record<string, any>): Promise<Result<any>> {
async postMediaimage(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.wechatMediaServiceImplService.image(query);
return Result.success(result);
}
@@ -30,7 +30,7 @@ export class MediaController {
@Post('media/video')
@ApiOperation({ summary: '/media/video' })
@ApiResponse({ status: 200, description: '成功' })
async postMediavideo(@Body() body: Record<string, any>): Promise<Result<any>> {
async postMediavideo(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.wechatMediaServiceImplService.video(query);
return Result.success(result);
}
@@ -39,7 +39,7 @@ export class MediaController {
@ApiOperation({ summary: '/sync/news' })
@ApiResponse({ status: 200, description: '成功' })
async getSyncnews(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.wechatMediaServiceImplService.syncNews(query);
const result = await this.wechatMediaServiceImplService.syncNews(Number(query.offset));
return Result.success(result);
}
}

View File

@@ -22,7 +22,7 @@ export class MenuController {
@Put('menu')
@ApiOperation({ summary: '/menu' })
@ApiResponse({ status: 200, description: '成功' })
async putMenu(@Body() body: Record<string, any>): Promise<Result<any>> {
async putMenu(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.wechatMenuServiceImplService.edit(query);
return Result.success(result);
}

View File

@@ -22,8 +22,8 @@ export class ReplyController {
@Get('keywords/:id')
@ApiOperation({ summary: '/keywords/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getKeywordsid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.wechatReplyServiceImplService.getKeywordInfo(id);
async getKeywordsid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.wechatReplyServiceImplService.getKeywordInfo(Number(id));
return Result.success(result);
}
@@ -39,7 +39,7 @@ export class ReplyController {
@ApiOperation({ summary: '/keywords/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async putKeywordsid(@Body() body: Record<string, any>, @Param('id') id: string): Promise<Result<any>> {
const result = await this.wechatReplyServiceImplService.editKeyword(id, body);
const result = await this.wechatReplyServiceImplService.editKeyword(Number(id), body);
return Result.success(result);
}
@@ -47,7 +47,7 @@ export class ReplyController {
@ApiOperation({ summary: '/keywords/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async deleteKeywordsid(@Param('id') id: string): Promise<Result<any>> {
const result = await this.wechatReplyServiceImplService.delKeyword(id);
const result = await this.wechatReplyServiceImplService.delKeyword(Number(id));
return Result.success(result);
}

View File

@@ -21,15 +21,15 @@ export class LoginController {
@ApiOperation({ summary: '/login' })
@ApiResponse({ status: 200, description: '成功' })
async getLogin(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.registerServiceImplService.checkLoginConfig(query);
const result = await this.registerServiceImplService.checkLoginConfig(query.type);
return Result.success(result);
}
@Post('login/mobile')
@ApiOperation({ summary: '/login/mobile' })
@ApiResponse({ status: 200, description: '成功' })
async postLoginmobile(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.registerServiceImplService.checkLoginConfig(query);
async postLoginmobile(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.registerServiceImplService.checkLoginConfig(query.type);
return Result.success(result);
}

View File

@@ -16,16 +16,16 @@ export class RegisterController {
@Post('register')
@ApiOperation({ summary: '/register' })
@ApiResponse({ status: 200, description: '成功' })
async postRegister(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.registerServiceImplService.checkLoginConfig(query);
async postRegister(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.registerServiceImplService.checkLoginConfig(query.type);
return Result.success(result);
}
@Post('register/mobile')
@ApiOperation({ summary: '/register/mobile' })
@ApiResponse({ status: 200, description: '成功' })
async postRegistermobile(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.registerServiceImplService.checkLoginConfig(query);
async postRegistermobile(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.registerServiceImplService.checkLoginConfig(query.type);
return Result.success(result);
}
}

View File

@@ -36,7 +36,7 @@ export class MemberSignController {
@Get('sign/info/:year/:month')
@ApiOperation({ summary: '/sign/info/{year}/{month}' })
@ApiResponse({ status: 200, description: '成功' })
async getSigninfoyearmonth(@Param() params: Record<string, string>, @Query() query: Record<string, any>): Promise<Result<any>> {
async getSigninfoyearmonth(@Param('year') year: string, @Param('month') month: string, @Query() query: Record<string, any>): Promise<Result<any>> {
// TODO: 实现业务逻辑
return Result.success(null);
}
@@ -44,7 +44,7 @@ export class MemberSignController {
@Get('sign/award/:year/:month/:day')
@ApiOperation({ summary: '/sign/award/{year}/{month}/{day}' })
@ApiResponse({ status: 200, description: '成功' })
async getSignawardyearmonthday(@Param() params: Record<string, string>, @Query() query: Record<string, any>): Promise<Result<any>> {
async getSignawardyearmonthday(@Param('year') year: string, @Param('month') month: string, @Param('day') day: string, @Query() query: Record<string, any>): Promise<Result<any>> {
// TODO: 实现业务逻辑
return Result.success(null);
}

View File

@@ -20,7 +20,7 @@ export class PayController {
@Get('pay/info/:trade_type/:trade_id')
@ApiOperation({ summary: '/pay/info/{trade_type}/{trade_id}' })
@ApiResponse({ status: 200, description: '成功' })
async getPayinfotradetypetradeid(@Param() params: Record<string, string>, @Query() query: Record<string, any>): Promise<Result<any>> {
async getPayinfotradetypetradeid(@Param('trade_type') trade_type: string, @Param('trade_id') trade_id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
// TODO: 实现业务逻辑
return Result.success(null);
}
@@ -28,7 +28,7 @@ export class PayController {
@Get('pay/friendspay/info/:trade_type/:trade_id')
@ApiOperation({ summary: '/pay/friendspay/info/{trade_type}/{trade_id}' })
@ApiResponse({ status: 200, description: '成功' })
async getPayfriendspayinfotradetypetradeid(@Param() params: Record<string, string>, @Query() query: Record<string, any>): Promise<Result<any>> {
async getPayfriendspayinfotradetypetradeid(@Param('trade_type') trade_type: string, @Param('trade_id') trade_id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
// TODO: 实现业务逻辑
return Result.success(null);
}

View File

@@ -38,8 +38,8 @@ export class UploadController {
@Post('image/base64')
@ApiOperation({ summary: '/image/base64' })
@ApiResponse({ status: 200, description: '成功' })
async postImagebase64(@Body() body: Record<string, any>): Promise<Result<any>> {
const result = await this.base64ServiceImplService.image(query);
async postImagebase64(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.base64ServiceImplService.image(query.content);
return Result.success(result);
}
}

View File

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

View File

@@ -13,7 +13,7 @@ export class WechatController {
@ApiOperation({ summary: '/codeurl' })
@ApiResponse({ status: 200, description: '成功' })
async getCodeurl(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.wechatServiceImplService.getCodeUrl(query, query);
const result = await this.wechatServiceImplService.getCodeUrl(query.url, query.scopes);
return Result.success(result);
}

View File

@@ -20,8 +20,8 @@ export class CoreAddonController {
@Get('setup/:id')
@ApiOperation({ summary: '/setup/{id}' })
@ApiResponse({ status: 200, description: '成功' })
async getSetupid(@Param('id') id: string, @Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.coreAddonInstallServiceImplService.installCheck(query);
async getSetupid(@Query() query: Record<string, any>): Promise<Result<any>> {
const result = await this.coreAddonInstallServiceImplService.installCheck(query.addon);
return Result.success(result);
}