From 1e35270762439271767c1b42490eeaa66d89b198 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Fri, 10 Mar 2023 08:41:36 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xkrs/controller/SysUserController.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/xkrs/controller/SysUserController.java b/src/main/java/com/xkrs/controller/SysUserController.java index 6fbfe57..019ab80 100644 --- a/src/main/java/com/xkrs/controller/SysUserController.java +++ b/src/main/java/com/xkrs/controller/SysUserController.java @@ -2,20 +2,18 @@ package com.xkrs.controller; import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse; import com.xkrs.common.encapsulation.PromptMessageEnum; -import com.xkrs.model.va.SysUserQoInsert; -import com.xkrs.model.va.SysUserQoUpdate; -import com.xkrs.service.RedisService; 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; import com.xkrs.model.vo.SysUserVo; +import com.xkrs.service.RedisService; import com.xkrs.service.SysUserService; import com.xkrs.utilsnew.*; -import com.xkrs.utilsnew.AliYunSmsUtils; -import com.xkrs.utilsnew.RandomUtil; import org.apache.hc.core5.util.TextUtils; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.data.domain.Sort; @@ -273,7 +271,7 @@ public class SysUserController { */ @PostMapping("/operateActiveFlag") public String operateActiveFlag(@RequestBody Map map, @RequestHeader(value = "Authorization") String token) { - Long userId = (Long) map.get("userId"); + Integer userId = (Integer) map.get("userId"); String keepType = (String) map.get("keepType"); // 验证token String tokenUserName = TokenUtil.obtainUserNameByToken(token); @@ -283,10 +281,10 @@ public class SysUserController { } // 如果keepType等于1进行启用操作 if ("1".equals(keepType)) { - sysUserService.updateEnable(userId); + sysUserService.updateEnable(Long.valueOf(userId)); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "启用成功", locale); } else { - sysUserService.updateDisable(userId); + sysUserService.updateDisable(Long.valueOf(userId)); return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "禁用成功", locale); } }