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);