From e7d63e5ccdd514a27a5e49601e28374c7f9c5127 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Fri, 10 Mar 2023 09:20:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xkrs/controller/SysUserController.java | 13 ------------- src/main/java/com/xkrs/dao/SysUserDao.java | 4 ---- 2 files changed, 17 deletions(-) diff --git a/src/main/java/com/xkrs/controller/SysUserController.java b/src/main/java/com/xkrs/controller/SysUserController.java index f077b7a..4fd5262 100644 --- a/src/main/java/com/xkrs/controller/SysUserController.java +++ b/src/main/java/com/xkrs/controller/SysUserController.java @@ -6,7 +6,6 @@ import com.xkrs.dao.SysUserDao; import com.xkrs.model.entity.SysUserEntity; import com.xkrs.model.qo.SysUserQo; import com.xkrs.model.qo.SysUserReceiveSmsQo; -import com.xkrs.model.qo.SysUserRemarkQo; import com.xkrs.model.qo.SysUserVipLevelQo; import com.xkrs.model.va.SysUserQoInsert; import com.xkrs.model.va.SysUserQoUpdate; @@ -151,18 +150,6 @@ public class SysUserController { return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功", locale); } - @Transactional(rollbackFor = Exception.class) - @RequestMapping(value = "/updateremark", method = RequestMethod.POST) - public String updateRemark(@RequestBody SysUserRemarkQo sysUserRemarkQo) { - Long id = sysUserRemarkQo.getId(); - Optional optionalById = sysUserDao.findById(id); - if (optionalById.isEmpty()) { - return outputEncapsulationObject(PromptMessageEnum.PARAM_ILLEGAL, "修改失败,用户找不到", locale); - } - sysUserDao.updateRemark(id, sysUserRemarkQo.getRemark()); - return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功", locale); - } - /** * 登录用户Token验证 */ diff --git a/src/main/java/com/xkrs/dao/SysUserDao.java b/src/main/java/com/xkrs/dao/SysUserDao.java index 5e7b1c9..ca01510 100644 --- a/src/main/java/com/xkrs/dao/SysUserDao.java +++ b/src/main/java/com/xkrs/dao/SysUserDao.java @@ -19,10 +19,6 @@ public interface SysUserDao extends JpaRepository, JpaSpeci @Query(value = "UPDATE sys_user SET receive_sms = ?2 WHERE id = ?1", nativeQuery = true) void updateReceiveSms(Long id, Integer receiveSms); - @Modifying(clearAutomatically = true) - @Query(value = "UPDATE sys_user SET remark = ?2 WHERE id = ?1", nativeQuery = true) - void updateRemark(Long id, String remark); - /** * 检查系统用户名是否存在 */