From 1d223c88e5da124b13dbb1486289b3acd3b2931b Mon Sep 17 00:00:00 2001 From: wanwu Date: Wed, 29 Oct 2025 17:19:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Controller=E5=8F=82=E6=95=B0=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E5=8C=B9=E9=85=8DV5=20-=2014344=E5=88=B014191?= =?UTF-8?q?=E5=87=8F=E5=B0=91153=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../generators/controller-generator.js | 128 +++++++++++++----- .../addon/addon-develop.controller.ts | 20 +-- .../adminapi/addon/addon-log.controller.ts | 6 +- .../adminapi/addon/addon.controller.ts | 30 ++-- .../adminapi/addon/backup.controller.ts | 4 +- .../adminapi/addon/upgrade.controller.ts | 6 +- .../adminapi/auth/auth.controller.ts | 4 +- .../adminapi/channel/app.controller.ts | 18 +-- .../adminapi/channel/h5.controller.ts | 2 +- .../adminapi/channel/pc.controller.ts | 2 +- .../adminapi/dict/dict.controller.ts | 14 +- .../adminapi/diy/config.controller.ts | 2 +- .../adminapi/diy/diy-form.controller.ts | 34 ++--- .../adminapi/diy/diy-route.controller.ts | 4 +- .../adminapi/diy/diy-theme.controller.ts | 4 +- .../adminapi/diy/diy.controller.ts | 12 +- .../adminapi/generator/generate.controller.ts | 22 +-- .../adminapi/home/site.controller.ts | 6 +- .../adminapi/login/captcha.controller.ts | 2 +- .../adminapi/login/login.controller.ts | 2 +- .../member/member-address.controller.ts | 8 +- .../member/member-cash-out.controller.ts | 18 +-- .../member/member-config.controller.ts | 4 +- .../member/member-label.controller.ts | 8 +- .../member/member-level.controller.ts | 8 +- .../adminapi/member/member.controller.ts | 20 +-- .../adminapi/niucloud/cloud.controller.ts | 8 +- .../adminapi/notice/niu-sms.controller.ts | 10 +- .../adminapi/notice/notice-log.controller.ts | 4 +- .../notice/notice-sms-log.controller.ts | 4 +- .../adminapi/notice/notice.controller.ts | 6 +- .../adminapi/pay/pay-channel.controller.ts | 12 +- .../adminapi/pay/pay-refund.controller.ts | 4 +- .../adminapi/pay/pay.controller.ts | 12 +- .../site/site-account-log.controller.ts | 4 +- .../adminapi/site/site-group.controller.ts | 10 +- .../adminapi/site/site.controller.ts | 26 ++-- .../adminapi/site/user-log.controller.ts | 4 +- .../adminapi/site/user.controller.ts | 16 +-- .../adminapi/stat/stat-hour.controller.ts | 10 +- .../adminapi/sys/sys-agreement.controller.ts | 8 +- .../adminapi/sys/sys-area.controller.ts | 16 +-- .../adminapi/sys/sys-attachment.controller.ts | 8 +- .../adminapi/sys/sys-config.controller.ts | 4 +- .../adminapi/sys/sys-export.controller.ts | 8 +- .../adminapi/sys/sys-menu.controller.ts | 20 +-- .../adminapi/sys/sys-notice.controller.ts | 10 +- .../adminapi/sys/sys-poster.controller.ts | 16 +-- .../adminapi/sys/sys-role.controller.ts | 10 +- .../adminapi/sys/sys-schedule.controller.ts | 20 +-- .../adminapi/sys/sys-user-role.controller.ts | 10 +- .../adminapi/upload/storage.controller.ts | 10 +- .../adminapi/user/user.controller.ts | 24 ++-- .../adminapi/verify/verifier.controller.ts | 2 +- .../adminapi/verify/verify.controller.ts | 4 +- .../adminapi/weapp/config.controller.ts | 2 +- .../adminapi/weapp/version.controller.ts | 4 +- .../adminapi/wechat/media.controller.ts | 6 +- .../adminapi/wechat/menu.controller.ts | 2 +- .../adminapi/wechat/reply.controller.ts | 8 +- .../controllers/api/login/login.controller.ts | 6 +- .../api/login/register.controller.ts | 8 +- .../api/member/member-sign.controller.ts | 4 +- .../src/controllers/api/pay/pay.controller.ts | 4 +- .../controllers/api/sys/upload.controller.ts | 4 +- .../controllers/api/weapp/weapp.controller.ts | 2 +- .../api/wechat/wechat.controller.ts | 2 +- .../controllers/core/core-addon.controller.ts | 4 +- 68 files changed, 401 insertions(+), 343 deletions(-) diff --git a/wwjcloud-nest-v1/tools/java-to-nestjs-migration/generators/controller-generator.js b/wwjcloud-nest-v1/tools/java-to-nestjs-migration/generators/controller-generator.js index 6767af42..4e78cef8 100644 --- a/wwjcloud-nest-v1/tools/java-to-nestjs-migration/generators/controller-generator.js +++ b/wwjcloud-nest-v1/tools/java-to-nestjs-migration/generators/controller-generator.js @@ -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'; 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'); + // 多个路径参数,分别声明 + pathParams.forEach(paramName => { + parameters.push(`@Param('${paramName}') ${paramName}: string`); + }); } } - // 添加查询参数 - 使用Record类型代替any - if (method.httpMethod.toLowerCase() === 'get') { + if (needsQuery) { const queryType = method.queryDto || 'Record'; parameters.push(`@Query() query: ${queryType}`); } @@ -682,9 +728,11 @@ ${methodBody} /** * 智能映射Service参数到Controller参数源 * - * ✅ 策略: - * - GET请求:所有参数从query获取(除了路径参数) - * - POST/PUT请求:DTO/Param从body获取 + * ✅ V5 策略(类型感知): + * - 路径参数:paramName (string) 或 Number(paramName) (number) + * - DTO/Param:body 或 query + * - 基本类型string:query.paramName + * - 基本类型number:Number(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'); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/addon-develop.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/addon-develop.controller.ts index ee1fca33..d7f71a25 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/addon-develop.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/addon-develop.controller.ts @@ -18,8 +18,8 @@ export class AddonDevelopController { @Post('build/:key') @ApiOperation({ summary: '/build/{key}' }) @ApiResponse({ status: 200, description: '成功' }) - async postBuildkey(@Body() body: Record, @Param('key') key: string): Promise> { - const result = await this.addonDevelopBuildServiceImplService.build(query); + async postBuildkey(@Query() query: Record): Promise> { + 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): Promise> { - const result = await this.addonDevelopServiceImplService.info(query); + async getKey(@Param('key') key: string): Promise> { + 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, @Param('key') key: string): Promise> { + async postKey(@Body() body: Record): Promise> { 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, @Param('key') key: string): Promise> { + async putKey(@Body() body: Record): Promise> { 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): Promise> { - const result = await this.niucloudServiceImplService.checkKey(query); + async getCheckkey(@Param('key') key: string): Promise> { + 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): Promise> { - 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, @Param('key') key: string): Promise> { + async postDownloadkey(@Param('key') key: string): Promise> { const result = await this.addonDevelopBuildServiceImplService.download(key); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/addon-log.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/addon-log.controller.ts index 2ab06d0e..1f0f0f1f 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/addon-log.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/addon-log.controller.ts @@ -23,7 +23,7 @@ export class AddonLogController { @ApiOperation({ summary: '/detail' }) @ApiResponse({ status: 200, description: '成功' }) async getDetail(@Query() query: Record): Promise> { - 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): Promise> { - const result = await this.addonLogServiceImplService.del(query); + async postDel(@Query() query: Record): Promise> { + const result = await this.addonLogServiceImplService.del(Number(query.id)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/addon.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/addon.controller.ts index 730e779b..4be349fa 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/addon.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/addon.controller.ts @@ -32,7 +32,7 @@ export class AddonController { @ApiResponse({ status: 200, description: '成功' }) @Public() async getAddonlistinstall(@Query() query: Record): Promise> { - 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): Promise> { - 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): Promise> { - const result = await this.addonServiceImplService.del(query); + async postAddondel(@Query() query: Record): Promise> { + 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, @Param('addon') addon: string): Promise> { - const result = await this.addonServiceImplService.install(addon, query); + async postAddoninstalladdon(@Param('addon') addon: string, @Query() query: Record): Promise> { + 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, @Param('addon') addon: string): Promise> { - const result = await this.addonServiceImplService.install(addon, query); + async postAddoncloudinstalladdon(@Param('addon') addon: string, @Query() query: Record): Promise> { + 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): Promise> { - const result = await this.addonServiceImplService.cloudInstallLog(query); + async getAddoncloudinstalladdon(@Param('addon') addon: string): Promise> { + 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): Promise> { - const result = await this.addonServiceImplService.installCheck(query); + async getAddoninstallcheckaddon(@Param('addon') addon: string): Promise> { + 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, @Param('addon') addon: string): Promise> { + async postAddonuninstalladdon(@Param('addon') addon: string): Promise> { 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): Promise> { - const result = await this.addonServiceImplService.uninstallCheck(query); + async getAddonuninstallcheckaddon(@Param('addon') addon: string): Promise> { + const result = await this.addonServiceImplService.uninstallCheck(addon); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/backup.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/backup.controller.ts index d3df2027..41e62104 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/backup.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/backup.controller.ts @@ -30,8 +30,8 @@ export class BackupController { @Put('remark') @ApiOperation({ summary: '/remark' }) @ApiResponse({ status: 200, description: '成功' }) - async putRemark(@Body() body: Record): Promise> { - const result = await this.sysBackupRecordsServiceImplService.edit(query, body); + async putRemark(@Body() body: Record, @Query() query: Record): Promise> { + const result = await this.sysBackupRecordsServiceImplService.edit(Number(query.id), body); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/upgrade.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/upgrade.controller.ts index e481e45c..1277fee6 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/upgrade.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/addon/upgrade.controller.ts @@ -96,15 +96,15 @@ export class UpgradeController { @Post('clear') @ApiOperation({ summary: '/clear' }) @ApiResponse({ status: 200, description: '成功' }) - async postClear(@Body() body: Record): Promise> { - const result = await this.upgradeServiceImplService.clearUpgradeTask(query); + async postClear(@Query() query: Record): Promise> { + 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, @Param('operate') operate: string): Promise> { + async postOperateoperate(@Param('operate') operate: string): Promise> { const result = await this.upgradeServiceImplService.operate(operate); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/auth/auth.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/auth/auth.controller.ts index 2d11fe1c..c8eecdd1 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/auth/auth.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/auth/auth.controller.ts @@ -21,7 +21,7 @@ export class AuthController { @ApiOperation({ summary: '/authmenu' }) @ApiResponse({ status: 200, description: '成功' }) async getAuthmenu(@Query() query: Record): Promise> { - 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): Promise> { - const result = await this.siteServiceImplService.info(query); + const result = await this.siteServiceImplService.info(Number(query.id)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/channel/app.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/channel/app.controller.ts index 5267f221..3cf56f38 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/channel/app.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/channel/app.controller.ts @@ -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): Promise> { - const result = await this.adminAppServiceImplService.getVersionInfo(id); + async getVersionid(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { - 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> { - 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): Promise> { - 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): Promise> { - const result = await this.adminAppServiceImplService.getBuildLog(query); + async getBuildlogkey(@Param('key') key: string): Promise> { + 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, @Param('id') id: string): Promise> { - const result = await this.adminAppServiceImplService.release(id); + async putVersionidrelease(@Param('id') id: string): Promise> { + const result = await this.adminAppServiceImplService.release(Number(id)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/channel/h5.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/channel/h5.controller.ts index e770ed23..e96e81e4 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/channel/h5.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/channel/h5.controller.ts @@ -15,7 +15,7 @@ export class H5Controller { @ApiOperation({ summary: '/config' }) @ApiResponse({ status: 200, description: '成功' }) async getConfig(@Query() query: Record): Promise> { - const result = await this.coreH5ServiceImplService.getH5(query); + const result = await this.coreH5ServiceImplService.getH5(Number(query.siteId)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/channel/pc.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/channel/pc.controller.ts index 8ac31d69..d6abb3e4 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/channel/pc.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/channel/pc.controller.ts @@ -15,7 +15,7 @@ export class PcController { @ApiOperation({ summary: '/config' }) @ApiResponse({ status: 200, description: '成功' }) async getConfig(@Query() query: Record): Promise> { - const result = await this.corePcServiceImplService.getPc(query); + const result = await this.corePcServiceImplService.getPc(Number(query.siteId)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/dict/dict.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/dict/dict.controller.ts index c1a13a94..60dd548a 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/dict/dict.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/dict/dict.controller.ts @@ -15,23 +15,23 @@ export class DictController { @ApiOperation({ summary: '/dict' }) @ApiResponse({ status: 200, description: '成功' }) async getDict(@Query() query: Record): Promise> { - 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): Promise> { - const result = await this.dictServiceImplService.info(id); + async getDictid(@Param('id') id: string): Promise> { + 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): Promise> { - const result = await this.dictServiceImplService.info(query); + async getDictionarytypetype(@Query() query: Record): Promise> { + 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, @Param('id') id: string): Promise> { - 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> { - const result = await this.dictServiceImplService.del(id); + const result = await this.dictServiceImplService.del(Number(id)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/config.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/config.controller.ts index 34f2a7d1..620577ce 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/config.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/config.controller.ts @@ -23,7 +23,7 @@ export class ConfigController { @ApiOperation({ summary: '/bottom/config' }) @ApiResponse({ status: 200, description: '成功' }) async getBottomconfig(@Query() query: Record): Promise> { - const result = await this.diyConfigServiceImplService.getBottomConfig(query); + const result = await this.diyConfigServiceImplService.getBottomConfig(query.key); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy-form.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy-form.controller.ts index 36dd5302..ea45e35e 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy-form.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy-form.controller.ts @@ -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): Promise> { - const result = await this.diyFormServiceImplService.getInfo(id); + async getFormid(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { - 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): Promise> { + async putFormdelete(@Query() query: Record): Promise> { 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): Promise> { - 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): Promise> { - const result = await this.diyFormServiceImplService.modifyShare(query, query); + async putFormshare(@Query() query: Record): Promise> { + 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): Promise> { - const result = await this.diyFormServiceImplService.copy(query); + async postFormcopy(@Query() query: Record): Promise> { + 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): Promise> { - const result = await this.diyFormServiceImplService.getRecordInfo(query); + async getFormrecordsrecordsid(@Query() query: Record): Promise> { + 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> { - const result = await this.diyFormServiceImplService.delRecord(query, query); + async deleteFormrecordsdelete(@Query() query: Record): Promise> { + 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): Promise> { - const result = await this.diyFormConfigServiceImplService.getWriteConfig(query); + async getFormwriteformid(@Query() query: Record): Promise> { + 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): Promise> { - const result = await this.diyFormConfigServiceImplService.getSubmitConfig(query); + async getFormsubmitformid(@Query() query: Record): Promise> { + const result = await this.diyFormConfigServiceImplService.getSubmitConfig(Number(query.formId)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy-route.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy-route.controller.ts index 48f5a78d..1735e1b7 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy-route.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy-route.controller.ts @@ -25,7 +25,7 @@ export class DiyRouteController { @ApiOperation({ summary: '/apps' }) @ApiResponse({ status: 200, description: '成功' }) async getApps(@Query() query: Record): Promise> { - 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): Promise> { - const result = await this.diyRouteServiceImplService.getInfoByName(query); + const result = await this.diyRouteServiceImplService.getInfoByName(query.name); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy-theme.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy-theme.controller.ts index 4a77f17b..c9d92e0d 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy-theme.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy-theme.controller.ts @@ -47,7 +47,7 @@ export class DiyThemeController { @ApiOperation({ summary: '/{id}' }) @ApiResponse({ status: 200, description: '成功' }) async putId(@Body() body: Record, @Param('id') id: string): Promise> { - 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> { - const result = await this.diyThemeServiceImplService.delDiyTheme(id); + const result = await this.diyThemeServiceImplService.delDiyTheme(Number(id)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy.controller.ts index 26cc60c3..51c14ff8 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/diy/diy.controller.ts @@ -49,7 +49,7 @@ export class DiyController { @ApiOperation({ summary: '/diy/{id}' }) @ApiResponse({ status: 200, description: '成功' }) async putDiyid(@Body() body: Record, @Param('id') id: string): Promise> { - 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> { - 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, @Param('id') id: string): Promise> { - const result = await this.diyServiceImplService.setUse(id); + async putUseid(@Param('id') id: string): Promise> { + 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): Promise> { - const result = await this.diyServiceImplService.copy(query); + async postCopy(@Query() query: Record): Promise> { + const result = await this.diyServiceImplService.copy(Number(query.id)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/generator/generate.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/generator/generate.controller.ts index 926814be..25f7608b 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/generator/generate.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/generator/generate.controller.ts @@ -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): Promise> { - const result = await this.generateServiceImplService.getInfo(id); + async getGeneratorid(@Param('id') id: string): Promise> { + 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): Promise> { - const result = await this.generateServiceImplService.edit(query, body); + async postGenerator(@Body() body: Record, @Query() query: Record): Promise> { + 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, @Param('id') id: string): Promise> { - 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> { - 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): Promise> { - 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): Promise> { - const result = await this.generateServiceImplService.preview(id); + async getPreviewid(@Param('id') id: string): Promise> { + 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): Promise> { - 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): Promise> { - const result = await this.generateServiceImplService.getTableColumn(query); + const result = await this.generateServiceImplService.getTableColumn(query.tableName); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/home/site.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/home/site.controller.ts index 949d4a86..75c97584 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/home/site.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/home/site.controller.ts @@ -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): Promise> { - const result = await this.authSiteServiceImplService.info(id); + async getSiteid(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { - const result = await this.authSiteServiceImplService.edit(id, body); + const result = await this.authSiteServiceImplService.edit(Number(id), body); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/login/captcha.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/login/captcha.controller.ts index d34a4fa7..afe14cf4 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/login/captcha.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/login/captcha.controller.ts @@ -14,7 +14,7 @@ export class CaptchaController { @ApiOperation({ summary: '/create' }) @ApiResponse({ status: 200, description: '成功' }) async getCreate(@Query() query: Record): Promise> { - const result = await this.coreCaptchaImgServiceImplService.create(query); + const result = await this.coreCaptchaImgServiceImplService.create(query.captchaType); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/login/login.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/login/login.controller.ts index 570c7c44..f2d4f352 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/login/login.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/login/login.controller.ts @@ -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): Promise> { + async getAppType(@Query() query: Record): Promise> { const result = await this.loginServiceImplService.login(query); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-address.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-address.controller.ts index 66c4780e..bc53cb97 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-address.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-address.controller.ts @@ -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): Promise> { - const result = await this.memberAddressServiceImplService.info(id); + async getId(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { - 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> { - const result = await this.memberAddressServiceImplService.del(id); + const result = await this.memberAddressServiceImplService.del(Number(id)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-cash-out.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-cash-out.controller.ts index d9859b51..5dad034a 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-cash-out.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-cash-out.controller.ts @@ -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): Promise> { - const result = await this.memberCashOutServiceImplService.info(id); + async getId(@Param('id') id: string): Promise> { + 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, @Param() params: Record): Promise> { + async putAuditidaction(@Body() body: Record): Promise> { 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, @Param('id') id: string): Promise> { - const result = await this.memberCashOutServiceImplService.cancel(id); + async putCancelid(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { - 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, @Param('id') id: string): Promise> { + async putTransferid(@Body() body: Record): Promise> { 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, @Param('id') id: string): Promise> { - const result = await this.memberCashOutServiceImplService.checkTransferStatus(id); + async putCheckid(@Param('id') id: string): Promise> { + const result = await this.memberCashOutServiceImplService.checkTransferStatus(Number(id)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-config.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-config.controller.ts index 8f39ecae..0d4a9677 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-config.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-config.controller.ts @@ -70,7 +70,7 @@ export class MemberConfigController { @Post('growth_rule') @ApiOperation({ summary: '/growth_rule' }) @ApiResponse({ status: 200, description: '成功' }) - async postGrowthrule(@Body() body: Record): Promise> { + async postGrowthrule(@Query() query: Record): Promise> { 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): Promise> { + async postPointrule(@Query() query: Record): Promise> { const result = await this.memberConfigServiceImplService.setPointRuleConfig(query); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-label.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-label.controller.ts index be548251..f0f2358c 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-label.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-label.controller.ts @@ -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): Promise> { - const result = await this.memberLabelServiceImplService.info(id); + async getLabelid(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { - 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> { - const result = await this.memberLabelServiceImplService.del(id); + const result = await this.memberLabelServiceImplService.del(Number(id)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-level.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-level.controller.ts index e6ab6173..d4e8cbd5 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-level.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member-level.controller.ts @@ -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): Promise> { - const result = await this.memberLevelServiceImplService.info(id); + async getId(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { - 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> { - const result = await this.memberLevelServiceImplService.del(id); + const result = await this.memberLevelServiceImplService.del(Number(id)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member.controller.ts index e9498def..3dfe64c3 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/member/member.controller.ts @@ -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): Promise> { - const result = await this.memberServiceImplService.info(id); + async getMemberid(@Param('id') id: string): Promise> { + 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, @Param('member_id') member_id: string): Promise> { - const result = await this.memberServiceImplService.edit(query, body); + async putMembermemberid(@Body() body: Record, @Query() query: Record): Promise> { + 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, @Param() params: Record): Promise> { + async putMembermodifymemberidfield(@Body() body: Record): Promise> { 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> { - const result = await this.memberServiceImplService.del(query); + async deleteMembermemberid(@Query() query: Record): Promise> { + 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, @Param('status') status: string): Promise> { - 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): Promise> { + async postGiftscontent(@Query() query: Record): Promise> { 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): Promise> { + async postBenefitscontent(@Query() query: Record): Promise> { const result = await this.memberServiceImplService.getMemberBenefitsContent(query); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/niucloud/cloud.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/niucloud/cloud.controller.ts index 45371175..2916aca2 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/niucloud/cloud.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/niucloud/cloud.controller.ts @@ -15,15 +15,15 @@ export class CloudController { @ApiOperation({ summary: '/build' }) @ApiResponse({ status: 200, description: '成功' }) async getBuild(@Query() query: Record): Promise> { - 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): Promise> { - const result = await this.cloudBuildServiceImplService.build(query); + async postBuild(@Query() query: Record): Promise> { + 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): Promise> { - const result = await this.cloudBuildServiceImplService.getBuildLog(query); + const result = await this.cloudBuildServiceImplService.getBuildLog(query.mode); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/niu-sms.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/niu-sms.controller.ts index 2444d6ff..c6361cec 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/niu-sms.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/niu-sms.controller.ts @@ -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, @Query() query: Record): Promise> { + async getTemplatelistsmsTypeusername(@Param('smsType') smsType: string, @Param('username') username: string, @Query() query: Record): Promise> { // 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, @Query() query: Record): Promise> { + async getTemplatesyncsmsTypeusername(@Param('smsType') smsType: string, @Param('username') username: string, @Query() query: Record): Promise> { // 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, @Param() params: Record): Promise> { + async postTemplatereportsmsTypeusername(@Body() body: Record, @Param('smsType') smsType: string, @Param('username') username: string): Promise> { // 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): Promise> { + async deleteTemplateusernametemplateId(@Param('username') username: string, @Param('templateId') templateId: string): Promise> { // 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, @Query() query: Record): Promise> { + async getTemplateinfosmsTypeusername(@Param('smsType') smsType: string, @Param('username') username: string, @Query() query: Record): Promise> { // TODO: 实现业务逻辑 return Result.success(null); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/notice-log.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/notice-log.controller.ts index 6f404ba9..bb0c2136 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/notice-log.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/notice-log.controller.ts @@ -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): Promise> { - const result = await this.sysNoticeLogServiceImplService.info(id); + async getId(@Param('id') id: string): Promise> { + const result = await this.sysNoticeLogServiceImplService.info(Number(id)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/notice-sms-log.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/notice-sms-log.controller.ts index 94ee1976..51691801 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/notice-sms-log.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/notice-sms-log.controller.ts @@ -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): Promise> { - const result = await this.sysNoticeSmsLogServiceImplService.info(id); + async getId(@Param('id') id: string): Promise> { + const result = await this.sysNoticeSmsLogServiceImplService.info(Number(id)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/notice.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/notice.controller.ts index 57bc1a0a..2cd39143 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/notice.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/notice/notice.controller.ts @@ -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): Promise> { - const result = await this.noticeServiceImplService.getInfo(query); + async getNoticekey(@Param('key') key: string): Promise> { + 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, @Param('sms_type') sms_type: string): Promise> { + async putNoticesmssmstype(@Body() body: Record): Promise> { const result = await this.noticeServiceImplService.editMessageStatus(body); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/pay/pay-channel.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/pay/pay-channel.controller.ts index 616dbc28..5e319637 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/pay/pay-channel.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/pay/pay-channel.controller.ts @@ -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): Promise> { - const result = await this.payChannelServiceImplService.set(query, query, query); + async postChannelsetall(@Query() query: Record): Promise> { + 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, @Param() params: Record): Promise> { + async postChannelsetchanneltype(@Param('channel') channel: string, @Param('type') type: string, @Query() query: Record): Promise> { 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): Promise> { - const result = await this.payChannelServiceImplService.getListByChannel(query); + async getChannellistschannel(@Param('channel') channel: string): Promise> { + 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): Promise> { + async postChannelsettransfer(@Query() query: Record): Promise> { const result = await this.payChannelServiceImplService.setTransfer(query); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/pay/pay-refund.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/pay/pay-refund.controller.ts index d26f1e58..fd9c1eb7 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/pay/pay-refund.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/pay/pay-refund.controller.ts @@ -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): Promise> { - const result = await this.payRefundServiceImplService.info(query); + async getRefundno(@Query() query: Record): Promise> { + const result = await this.payRefundServiceImplService.info(query.refundNo); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/pay/pay.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/pay/pay.controller.ts index 812e8596..d497541c 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/pay/pay.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/pay/pay.controller.ts @@ -23,7 +23,7 @@ export class PayController { @ApiOperation({ summary: '/info' }) @ApiResponse({ status: 200, description: '成功' }) async getInfo(@Query() query: Record): Promise> { - 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): Promise> { - const result = await this.payServiceImplService.edit(query, body); + async postEdit(@Body() body: Record, @Query() query: Record): Promise> { + 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): Promise> { - const result = await this.payServiceImplService.del(query); + async postDel(@Query() query: Record): Promise> { + 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, @Query() query: Record): Promise> { + async getFriendspayinfotradetypetradeidchannel(@Param('trade_type') trade_type: string, @Param('trade_id') trade_id: string, @Param('channel') channel: string, @Query() query: Record): Promise> { // TODO: 实现业务逻辑 return Result.success(null); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/site-account-log.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/site-account-log.controller.ts index 721f4f02..f2fb3398 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/site-account-log.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/site-account-log.controller.ts @@ -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): Promise> { - const result = await this.siteAccountLogServiceImplService.info(id); + async getId(@Param('id') id: string): Promise> { + const result = await this.siteAccountLogServiceImplService.info(Number(id)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/site-group.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/site-group.controller.ts index d8f7b3c4..765786f4 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/site-group.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/site-group.controller.ts @@ -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): Promise> { - const result = await this.siteGroupServiceImplService.info(id); + async getId(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { - 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> { - 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): Promise> { - const result = await this.siteGroupServiceImplService.getUserSiteGroupAll(query); + const result = await this.siteGroupServiceImplService.getUserSiteGroupAll(Number(query.uid)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/site.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/site.controller.ts index 4204b71f..b319f2d8 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/site.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/site.controller.ts @@ -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): Promise> { - const result = await this.siteServiceImplService.info(id); + async getSiteid(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { - 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> { - 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, @Param('id') id: string): Promise> { - const result = await this.siteServiceImplService.closeSite(query); + async putClosesiteid(@Query() query: Record): Promise> { + 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, @Param('id') id: string): Promise> { - const result = await this.siteServiceImplService.openSite(query); + async putOpensiteid(@Query() query: Record): Promise> { + 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): Promise> { - 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): Promise> { - 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): Promise> { - 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): Promise> { - const result = await this.siteServiceImplService.siteInit(query); + async postInit(@Query() query: Record): Promise> { + const result = await this.siteServiceImplService.siteInit(Number(query.siteId)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/user-log.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/user-log.controller.ts index 1d5e4f5d..d42e301c 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/user-log.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/user-log.controller.ts @@ -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): Promise> { - const result = await this.sysUserLogServiceImplService.info(id); + async getLogid(@Param('id') id: string): Promise> { + const result = await this.sysUserLogServiceImplService.info(Number(id)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/user.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/user.controller.ts index 41f36516..3036f8e0 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/user.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/site/user.controller.ts @@ -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): Promise> { - const result = await this.siteUserServiceImplService.getInfo(uid); + async getUseruid(@Param('uid') uid: string): Promise> { + 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, @Param('uid') uid: string): Promise> { - 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, @Param('uid') uid: string): Promise> { - const result = await this.siteUserServiceImplService.lock(uid); + async putUserlockuid(@Param('uid') uid: string): Promise> { + 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, @Param('uid') uid: string): Promise> { - const result = await this.siteUserServiceImplService.unlock(uid); + async putUserunlockuid(@Param('uid') uid: string): Promise> { + 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> { - const result = await this.siteUserServiceImplService.delete(uid); + const result = await this.siteUserServiceImplService.delete(Number(uid)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/stat/stat-hour.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/stat/stat-hour.controller.ts index b5d7068b..eb931e7c 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/stat/stat-hour.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/stat/stat-hour.controller.ts @@ -23,7 +23,7 @@ export class StatHourController { @ApiOperation({ summary: '/info' }) @ApiResponse({ status: 200, description: '成功' }) async getInfo(@Query() query: Record): Promise> { - 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): Promise> { - const result = await this.statHourServiceImplService.edit(query, body); + async postEdit(@Body() body: Record, @Query() query: Record): Promise> { + 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): Promise> { - const result = await this.statHourServiceImplService.del(query); + async postDel(@Query() query: Record): Promise> { + const result = await this.statHourServiceImplService.del(Number(query.id)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-agreement.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-agreement.controller.ts index 9763b16f..7295a8e1 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-agreement.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-agreement.controller.ts @@ -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): Promise> { - const result = await this.sysAgreementServiceImplService.getAgreement(query); + async getAgreementkey(@Param('key') key: string): Promise> { + 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, @Param('key') key: string): Promise> { - const result = await this.sysAgreementServiceImplService.setAgreement(key, query, query); + async putAgreementkey(@Param('key') key: string, @Query() query: Record): Promise> { + const result = await this.sysAgreementServiceImplService.setAgreement(key, query.title, query.content); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-area.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-area.controller.ts index 9e06e09e..44f48973 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-area.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-area.controller.ts @@ -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): Promise> { - const result = await this.sysAreaServiceImplService.getListByPid(pid); + async getListbypidpid(@Param('pid') pid: string): Promise> { + 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): Promise> { - const result = await this.sysAreaServiceImplService.getAreaTree(query); + async getTreelevel(@Param('level') level: string): Promise> { + 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): Promise> { - const result = await this.sysAreaServiceImplService.getAddressInfo(query); + async getCodecode(@Query() query: Record): Promise> { + 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): Promise> { - 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): Promise> { - const result = await this.sysAreaServiceImplService.getAddress(query); + const result = await this.sysAreaServiceImplService.getAddress(query.address); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-attachment.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-attachment.controller.ts index 3c127f1e..34267b52 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-attachment.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-attachment.controller.ts @@ -22,7 +22,7 @@ export class SysAttachmentController { @Delete('attachment/del') @ApiOperation({ summary: '/attachment/del' }) @ApiResponse({ status: 200, description: '成功' }) - async deleteAttachmentdel(): Promise> { + async deleteAttachmentdel(@Query() query: Record): Promise> { 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, @Param('type') type: string): Promise> { + async postDocumenttype(@Body() body: Record): Promise> { 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, @Param('id') id: string): Promise> { - 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> { - const result = await this.sysAttachmentServiceImplService.delCategory(id); + const result = await this.sysAttachmentServiceImplService.delCategory(Number(id)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-config.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-config.controller.ts index e038835f..9bcfc228 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-config.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-config.controller.ts @@ -96,7 +96,7 @@ export class SysConfigController { @Put('config/layout') @ApiOperation({ summary: '/config/layout' }) @ApiResponse({ status: 200, description: '成功' }) - async putConfiglayout(@Body() body: Record): Promise> { + async putConfiglayout(@Query() query: Record): Promise> { 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): Promise> { + async putConfigthemecolor(@Query() query: Record): Promise> { const result = await this.sysConfigServiceImplService.setThemeColor(query); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-export.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-export.controller.ts index 5bc39c3c..62881ae8 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-export.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-export.controller.ts @@ -31,7 +31,7 @@ export class SysExportController { @ApiOperation({ summary: '/export/type' }) @ApiResponse({ status: 200, description: '成功' }) async getExporttype(@Query() query: Record): Promise> { - 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): Promise> { - 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): Promise> { - 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> { - const result = await this.sysExportServiceImplService.del(id); + const result = await this.sysExportServiceImplService.del(Number(id)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-menu.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-menu.controller.ts index 0d713356..ab642a6f 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-menu.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-menu.controller.ts @@ -15,15 +15,15 @@ export class SysMenuController { @ApiOperation({ summary: '/menu/{appType}' }) @ApiResponse({ status: 200, description: '成功' }) async getMenuappType(@Param('appType') appType: string, @Query() query: Record): Promise> { - 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, @Query() query: Record): Promise> { - const result = await this.sysMenuServiceImplService.get(query, query); + async getMenuappTypeinfomenuKey(@Param('appType') appType: string, @Param('menuKey') menuKey: string): Promise> { + 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, @Param() params: Record): Promise> { + async putMenuappTypemenuKey(@Body() body: Record, @Param('appType') appType: string, @Param('menuKey') menuKey: string): Promise> { 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): Promise> { + async deleteMenuappTypemenuKey(@Param('appType') appType: string, @Param('menuKey') menuKey: string): Promise> { 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): Promise> { - const result = await this.sysMenuServiceImplService.getMenuByTypeDir(query); + async getMenudiraddon(@Param('addon') addon: string): Promise> { + 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): Promise> { - const result = await this.sysMenuServiceImplService.getSystemMenu(query, query, query); + async getMenuaddonmenuappkey(@Query() query: Record): Promise> { + 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): Promise> { - 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); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-notice.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-notice.controller.ts index 088d94c2..4cc24547 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-notice.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-notice.controller.ts @@ -23,7 +23,7 @@ export class SysNoticeController { @ApiOperation({ summary: '/info' }) @ApiResponse({ status: 200, description: '成功' }) async getInfo(@Query() query: Record): Promise> { - 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): Promise> { - const result = await this.sysNoticeServiceImplService.edit(query, body); + async postEdit(@Body() body: Record, @Query() query: Record): Promise> { + 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): Promise> { - const result = await this.sysNoticeServiceImplService.del(query); + async postDel(@Query() query: Record): Promise> { + const result = await this.sysNoticeServiceImplService.del(Number(query.id)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-poster.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-poster.controller.ts index 4daa28ff..53286885 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-poster.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-poster.controller.ts @@ -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): Promise> { - const result = await this.sysPosterServiceImplService.info(id); + async getId(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { - 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> { - 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): Promise> { - const result = await this.sysPosterServiceImplService.modifyStatus(query, query); + async putStatus(@Query() query: Record): Promise> { + 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): Promise> { - const result = await this.sysPosterServiceImplService.modifyDefault(query); + async putDefault(@Query() query: Record): Promise> { + const result = await this.sysPosterServiceImplService.modifyDefault(Number(query.id)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-role.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-role.controller.ts index b716aa74..d9437ac9 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-role.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-role.controller.ts @@ -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): Promise> { - const result = await this.sysRoleServiceImplService.info(query); + async getRoleroleId(@Query() query: Record): Promise> { + 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, @Param('roleId') roleId: string): Promise> { - 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> { - const result = await this.sysRoleServiceImplService.del(query); + async deleteRoleroleId(@Query() query: Record): Promise> { + const result = await this.sysRoleServiceImplService.del(Number(query.id)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-schedule.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-schedule.controller.ts index d99e0135..a1bf6262 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-schedule.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-schedule.controller.ts @@ -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): Promise> { - const result = await this.sysScheduleServiceImplService.info(id); + async getInfoid(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { + async putModifystatusid(@Body() body: Record): Promise> { 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, @Param('id') id: string): Promise> { - 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> { - 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, @Param('id') id: string): Promise> { - const result = await this.sysScheduleServiceImplService.doSchedule(id); + async putDoid(@Param('id') id: string): Promise> { + 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): Promise> { + async putLogdelete(@Query() query: Record): Promise> { 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): Promise> { - const result = await this.sysScheduleServiceImplService.clearLog(query); + async putLogclear(@Query() query: Record): Promise> { + const result = await this.sysScheduleServiceImplService.clearLog(Number(query.scheduleId)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-user-role.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-user-role.controller.ts index 225ea5f7..5bc0afce 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-user-role.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/sys/sys-user-role.controller.ts @@ -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): Promise> { - const result = await this.sysUserRoleServiceImplService.info(id); + async getId(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { + async putId(@Body() body: Record): Promise> { 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): Promise> { - const result = await this.sysUserRoleServiceImplService.del(query); + async postDel(@Query() query: Record): Promise> { + const result = await this.sysUserRoleServiceImplService.del(Number(query.id)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/upload/storage.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/upload/storage.controller.ts index 564b00c7..52be18b9 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/upload/storage.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/upload/storage.controller.ts @@ -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): Promise> { - const result = await this.storageConfigServiceImplService.getStorageConfig(query); + async getStoragestorageType(@Param('storageType') storageType: string): Promise> { + 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, @Param('storageType') storageType: string): Promise> { + async putStoragestorageType(@Param('storageType') storageType: string, @Query() query: Record): Promise> { 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): Promise> { - const result = await this.sysUserLogServiceImplService.info(id); + async getLogid(@Param('id') id: string): Promise> { + const result = await this.sysUserLogServiceImplService.info(Number(id)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/user/user.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/user/user.controller.ts index 9fb74b15..8db85d77 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/user/user.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/user/user.controller.ts @@ -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): Promise> { - const result = await this.sysUserServiceImplService.info(id); + async getUserid(@Param('id') id: string): Promise> { + 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, @Param('uid') uid: string): Promise> { - 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): Promise> { - 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): Promise> { - const result = await this.sysUserServiceImplService.getUserCreateSiteLimit(uid); + async getUsercreatesitelimituid(@Param('uid') uid: string): Promise> { + 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): Promise> { - const result = await this.sysUserServiceImplService.getUserCreateSiteLimitInfo(id); + async getUsercreatesitelimitinfoid(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { + async putUsercreatesitelimitid(@Body() body: Record): Promise> { 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> { - 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): Promise> { - 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> { - const result = await this.sysUserServiceImplService.del(id); + const result = await this.sysUserServiceImplService.del(Number(id)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/verify/verifier.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/verify/verifier.controller.ts index 5d84917d..5018fe98 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/verify/verifier.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/verify/verifier.controller.ts @@ -39,7 +39,7 @@ export class VerifierController { @ApiOperation({ summary: '/{id}' }) @ApiResponse({ status: 200, description: '成功' }) async deleteId(@Param('id') id: string): Promise> { - const result = await this.verifierServiceImplService.del(id); + const result = await this.verifierServiceImplService.del(Number(id)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/verify/verify.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/verify/verify.controller.ts index 6d24693f..708f9ac9 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/verify/verify.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/verify/verify.controller.ts @@ -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): Promise> { - const result = await this.verifyServiceImplService.detail(query); + async getVerifycode(@Query() query: Record): Promise> { + const result = await this.verifyServiceImplService.detail(query.code); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/weapp/config.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/weapp/config.controller.ts index a292fe06..01464b20 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/weapp/config.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/weapp/config.controller.ts @@ -46,7 +46,7 @@ export class ConfigController { @Put('privacysetting') @ApiOperation({ summary: '/privacysetting' }) @ApiResponse({ status: 200, description: '成功' }) - async putPrivacysetting(@Body() body: Record): Promise> { + async putPrivacysetting(@Query() query: Record): Promise> { const result = await this.weappConfigServiceImplService.setPrivacySetting(query); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/weapp/version.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/weapp/version.controller.ts index 7b13f78b..af075d3f 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/weapp/version.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/weapp/version.controller.ts @@ -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): Promise> { - const result = await this.weappVersionServiceImplService.getWeappCompileLog(query); + async getUploadkey(@Param('key') key: string): Promise> { + const result = await this.weappVersionServiceImplService.getWeappCompileLog(key); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/wechat/media.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/wechat/media.controller.ts index 175ed865..461c9516 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/wechat/media.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/wechat/media.controller.ts @@ -22,7 +22,7 @@ export class MediaController { @Post('media/image') @ApiOperation({ summary: '/media/image' }) @ApiResponse({ status: 200, description: '成功' }) - async postMediaimage(@Body() body: Record): Promise> { + async postMediaimage(@Query() query: Record): Promise> { 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): Promise> { + async postMediavideo(@Query() query: Record): Promise> { 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): Promise> { - const result = await this.wechatMediaServiceImplService.syncNews(query); + const result = await this.wechatMediaServiceImplService.syncNews(Number(query.offset)); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/wechat/menu.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/wechat/menu.controller.ts index be8808a7..f5835382 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/wechat/menu.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/wechat/menu.controller.ts @@ -22,7 +22,7 @@ export class MenuController { @Put('menu') @ApiOperation({ summary: '/menu' }) @ApiResponse({ status: 200, description: '成功' }) - async putMenu(@Body() body: Record): Promise> { + async putMenu(@Query() query: Record): Promise> { const result = await this.wechatMenuServiceImplService.edit(query); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/wechat/reply.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/wechat/reply.controller.ts index 9b0016a7..b2563e9f 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/wechat/reply.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/adminapi/wechat/reply.controller.ts @@ -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): Promise> { - const result = await this.wechatReplyServiceImplService.getKeywordInfo(id); + async getKeywordsid(@Param('id') id: string): Promise> { + 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, @Param('id') id: string): Promise> { - 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> { - const result = await this.wechatReplyServiceImplService.delKeyword(id); + const result = await this.wechatReplyServiceImplService.delKeyword(Number(id)); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/login/login.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/login/login.controller.ts index 771e1646..d7a15c77 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/login/login.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/login/login.controller.ts @@ -21,15 +21,15 @@ export class LoginController { @ApiOperation({ summary: '/login' }) @ApiResponse({ status: 200, description: '成功' }) async getLogin(@Query() query: Record): Promise> { - 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): Promise> { - const result = await this.registerServiceImplService.checkLoginConfig(query); + async postLoginmobile(@Query() query: Record): Promise> { + const result = await this.registerServiceImplService.checkLoginConfig(query.type); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/login/register.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/login/register.controller.ts index 6b6682c7..d5000331 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/login/register.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/login/register.controller.ts @@ -16,16 +16,16 @@ export class RegisterController { @Post('register') @ApiOperation({ summary: '/register' }) @ApiResponse({ status: 200, description: '成功' }) - async postRegister(@Body() body: Record): Promise> { - const result = await this.registerServiceImplService.checkLoginConfig(query); + async postRegister(@Query() query: Record): Promise> { + 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): Promise> { - const result = await this.registerServiceImplService.checkLoginConfig(query); + async postRegistermobile(@Query() query: Record): Promise> { + const result = await this.registerServiceImplService.checkLoginConfig(query.type); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/member/member-sign.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/member/member-sign.controller.ts index cb0eff69..ac74485e 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/member/member-sign.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/member/member-sign.controller.ts @@ -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, @Query() query: Record): Promise> { + async getSigninfoyearmonth(@Param('year') year: string, @Param('month') month: string, @Query() query: Record): Promise> { // 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, @Query() query: Record): Promise> { + async getSignawardyearmonthday(@Param('year') year: string, @Param('month') month: string, @Param('day') day: string, @Query() query: Record): Promise> { // TODO: 实现业务逻辑 return Result.success(null); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/pay/pay.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/pay/pay.controller.ts index 6c0977a5..150c68ad 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/pay/pay.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/pay/pay.controller.ts @@ -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, @Query() query: Record): Promise> { + async getPayinfotradetypetradeid(@Param('trade_type') trade_type: string, @Param('trade_id') trade_id: string, @Query() query: Record): Promise> { // 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, @Query() query: Record): Promise> { + async getPayfriendspayinfotradetypetradeid(@Param('trade_type') trade_type: string, @Param('trade_id') trade_id: string, @Query() query: Record): Promise> { // TODO: 实现业务逻辑 return Result.success(null); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/sys/upload.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/sys/upload.controller.ts index 85056a6f..7a48d0f0 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/sys/upload.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/sys/upload.controller.ts @@ -38,8 +38,8 @@ export class UploadController { @Post('image/base64') @ApiOperation({ summary: '/image/base64' }) @ApiResponse({ status: 200, description: '成功' }) - async postImagebase64(@Body() body: Record): Promise> { - const result = await this.base64ServiceImplService.image(query); + async postImagebase64(@Query() query: Record): Promise> { + const result = await this.base64ServiceImplService.image(query.content); return Result.success(result); } } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/weapp/weapp.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/weapp/weapp.controller.ts index 489f9ccc..9d1c5272 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/weapp/weapp.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/weapp/weapp.controller.ts @@ -37,7 +37,7 @@ export class WeappController { @ApiOperation({ summary: '/subscribemsg' }) @ApiResponse({ status: 200, description: '成功' }) async getSubscribemsg(@Query() query: Record): Promise> { - const result = await this.weappServiceImplService.subscribeMessage(query); + const result = await this.weappServiceImplService.subscribeMessage(query.keys); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/wechat/wechat.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/wechat/wechat.controller.ts index 62bdf219..a4639859 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/wechat/wechat.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/api/wechat/wechat.controller.ts @@ -13,7 +13,7 @@ export class WechatController { @ApiOperation({ summary: '/codeurl' }) @ApiResponse({ status: 200, description: '成功' }) async getCodeurl(@Query() query: Record): Promise> { - const result = await this.wechatServiceImplService.getCodeUrl(query, query); + const result = await this.wechatServiceImplService.getCodeUrl(query.url, query.scopes); return Result.success(result); } diff --git a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/core/core-addon.controller.ts b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/core/core-addon.controller.ts index f1dbbb85..a145816e 100644 --- a/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/core/core-addon.controller.ts +++ b/wwjcloud-nest-v1/wwjcloud/libs/wwjcloud-core/src/controllers/core/core-addon.controller.ts @@ -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): Promise> { - const result = await this.coreAddonInstallServiceImplService.installCheck(query); + async getSetupid(@Query() query: Record): Promise> { + const result = await this.coreAddonInstallServiceImplService.installCheck(query.addon); return Result.success(result); }