From f974bf528f0fd1f7316bdb3f06be8004e8db9f15 Mon Sep 17 00:00:00 2001 From: wangwh <2397901735@qq.com> Date: Wed, 21 Aug 2024 17:24:07 +0800 Subject: [PATCH] 用户中心部分迁移1 --- dyh-service/dyh-base/src/main/resources/template/webController.ftl | 19 ++++++++----------- 1 files changed, 8 insertions(+), 11 deletions(-) diff --git a/dyh-service/dyh-base/src/main/resources/template/webController.ftl b/dyh-service/dyh-base/src/main/resources/template/webController.ftl index 67f08d1..f875772 100644 --- a/dyh-service/dyh-base/src/main/resources/template/webController.ftl +++ b/dyh-service/dyh-base/src/main/resources/template/webController.ftl @@ -1,6 +1,7 @@ package ${basePackage}.${packageName}.controller; -import cn.huge.base.common.utils.ReturnUtils; +import cn.huge.base.common.utils.ReturnFailUtils; +import cn.huge.base.common.utils.ReturnSucUtils; import ${basePackage}.${packageName}.domain.po.${className}; import ${basePackage}.${packageName}.service.${className}Service; import com.google.common.collect.Maps; @@ -119,19 +120,15 @@ } /** - * 根据主键单个/批量删除 - * @url {ctx}/api/web<#if classPath??>/${classPath}</#if>/deleteByIds - * @param ids 主键编号 + * 根据主键单个 + * @url {ctx}/api/web<#if classPath??>/${classPath}</#if>/deleteById + * @param id 主键编号 * @return Object */ - @GetMapping("/deleteByIds") - public Object deleteByIds(@RequestParam(value = "ids") String ids) { + @GetMapping("/deleteById") + public Object deleteById(@RequestParam(value = "id") String id) { try { - if (ids.indexOf(",") != -1) { - service.removeByIds(Stream.of(ids.split(",")).collect(Collectors.toList())); - }else{ - service.removeById(ids); - } + service.removeById(id); return ReturnSucUtils.getRepInfo(); } catch (Exception e) { return ReturnFailUtils.getRepInfo(); -- Gitblit v1.8.0