From ea09ef1fb5bd5b9ba0d4c271a1ad7c51dbd6c0f4 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Mon, 27 Mar 2023 14:33:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=BC=8F=E6=B4=9E=20?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E7=94=A8=E6=88=B7500?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/xkrs/controller/SysUserController.java | 2 +- src/main/java/com/xkrs/service/SysUserService.java | 8 -------- .../java/com/xkrs/service/impl/SysUserServiceImpl.java | 9 --------- src/main/java/com/xkrs/utilsnew/VipTimeRangeUtils.java | 3 +++ 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/main/java/com/xkrs/controller/SysUserController.java b/src/main/java/com/xkrs/controller/SysUserController.java index 0822bbd..3011d64 100644 --- a/src/main/java/com/xkrs/controller/SysUserController.java +++ b/src/main/java/com/xkrs/controller/SysUserController.java @@ -221,7 +221,7 @@ public class SysUserController { if (sysUserEntity == null) { return outputEncapsulationObject(PromptMessageEnum.USER_LOGIN_ERROR, "您还没有注册登录,请先注册登录", locale); } - List sysUserEntityList = sysUserService.selectAllUser(); + List sysUserEntityList = sysUserDao.findAll(Sort.by(Sort.Direction.DESC, "id")); List sysUserVoList = new ArrayList<>(); for (SysUserEntity sysUser : sysUserEntityList) { sysUserVoList.add(SysUserConvertUtils.convert(sysUser)); diff --git a/src/main/java/com/xkrs/service/SysUserService.java b/src/main/java/com/xkrs/service/SysUserService.java index a1a9b7e..a1e248b 100644 --- a/src/main/java/com/xkrs/service/SysUserService.java +++ b/src/main/java/com/xkrs/service/SysUserService.java @@ -4,7 +4,6 @@ import com.xkrs.model.entity.SysUserEntity; import com.xkrs.model.qo.SysUserQo; import javax.servlet.http.HttpServletRequest; -import java.util.List; /** * 系统用户服务接口 @@ -59,13 +58,6 @@ public interface SysUserService { */ int updateSysUser(SysUserQo sysUserQo); - /** - * 查询用户的信息 - * - * @return - */ - List selectAllUser(); - /** * 启用 * diff --git a/src/main/java/com/xkrs/service/impl/SysUserServiceImpl.java b/src/main/java/com/xkrs/service/impl/SysUserServiceImpl.java index 673e8db..0995c01 100644 --- a/src/main/java/com/xkrs/service/impl/SysUserServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/SysUserServiceImpl.java @@ -9,7 +9,6 @@ import com.xkrs.model.entity.SysUserEntity; import com.xkrs.model.qo.SysUserQo; import com.xkrs.service.RedisService; import com.xkrs.service.SysUserService; -import com.xkrs.utilsnew.VipTimeRangeUtils; import org.apache.http.util.TextUtils; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.data.domain.Sort; @@ -304,14 +303,6 @@ public class SysUserServiceImpl implements SysUserService { return 1; } - /** - * 查询用户的信息 - */ - @Override - public List selectAllUser() { - return sysUserDao.findAll(Sort.by(Sort.Direction.DESC, "id")); - } - /** * 启用 */ diff --git a/src/main/java/com/xkrs/utilsnew/VipTimeRangeUtils.java b/src/main/java/com/xkrs/utilsnew/VipTimeRangeUtils.java index f100489..7831853 100644 --- a/src/main/java/com/xkrs/utilsnew/VipTimeRangeUtils.java +++ b/src/main/java/com/xkrs/utilsnew/VipTimeRangeUtils.java @@ -44,6 +44,9 @@ public class VipTimeRangeUtils { private static LocalDateTime obtainLastOverTime(String oldVipTimeRangeJson) { //oldVipTimeRangeJson不为空说明不是新注册用户,解析该用户的VIP时间范围 + if (TextUtils.isEmpty(oldVipTimeRangeJson)) { + return null; + } VipTimeRangeBean vipTimeRangeBean = JsonUtils.deserialize(oldVipTimeRangeJson, VipTimeRangeBean.class); if (vipTimeRangeBean == null || vipTimeRangeBean.getList() == null || vipTimeRangeBean.getList().size() == 0) { return null;