From 0694d104b987f6b153bafbec86393be4a2e7311b Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Fri, 10 Mar 2023 09:23:12 +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 --- .../xkrs/controller/SysUserController.java | 23 ------------------- src/main/java/com/xkrs/dao/SysUserDao.java | 4 ---- 2 files changed, 27 deletions(-) diff --git a/src/main/java/com/xkrs/controller/SysUserController.java b/src/main/java/com/xkrs/controller/SysUserController.java index 4fd5262..9f400d6 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.SysUserVipLevelQo; import com.xkrs.model.va.SysUserQoInsert; import com.xkrs.model.va.SysUserQoUpdate; import com.xkrs.model.vo.SysUserVo; @@ -106,28 +105,6 @@ public class SysUserController { return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, "修改失败," + builder, locale); } - /** - * 修改vip等级 - */ - @Transactional(rollbackFor = Exception.class) - @RequestMapping(value = "/updateviplevel", method = RequestMethod.POST) - public String updateVipLevel(@RequestBody SysUserVipLevelQo sysUserVipLevelQo) { - String ids = sysUserVipLevelQo.getIds(); - List idList = new ArrayList<>(); - if (ids.contains(",")) { - String[] splits = ids.split(","); - for (String split : splits) { - idList.add(Long.parseLong(split)); - } - } else { - idList.add(Long.parseLong(ids)); - } - for (Long id : idList) { - sysUserDao.updateVipLevel(id, sysUserVipLevelQo.getVipLevel()); - } - return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功", locale); - } - /** * 修改是否接收短信 */ diff --git a/src/main/java/com/xkrs/dao/SysUserDao.java b/src/main/java/com/xkrs/dao/SysUserDao.java index ca01510..ad996b2 100644 --- a/src/main/java/com/xkrs/dao/SysUserDao.java +++ b/src/main/java/com/xkrs/dao/SysUserDao.java @@ -11,10 +11,6 @@ import org.springframework.stereotype.Component; @Component public interface SysUserDao extends JpaRepository, JpaSpecificationExecutor { - @Modifying(clearAutomatically = true) - @Query(value = "UPDATE sys_user SET vip_level = ?2 WHERE id = ?1", nativeQuery = true) - void updateVipLevel(Long id, Integer vipLevel); - @Modifying(clearAutomatically = true) @Query(value = "UPDATE sys_user SET receive_sms = ?2 WHERE id = ?1", nativeQuery = true) void updateReceiveSms(Long id, Integer receiveSms);