From 9cfa6bd47b7f0d3eac8819d650f8976e43efc5d6 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Wed, 15 Feb 2023 17:31:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=BF=E6=8D=A2=E6=97=A7=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xkrs/straw/service/impl/SysUserServiceImpl.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/xkrs/straw/service/impl/SysUserServiceImpl.java b/src/main/java/com/xkrs/straw/service/impl/SysUserServiceImpl.java index 14d0ce5..8105f4d 100644 --- a/src/main/java/com/xkrs/straw/service/impl/SysUserServiceImpl.java +++ b/src/main/java/com/xkrs/straw/service/impl/SysUserServiceImpl.java @@ -14,6 +14,7 @@ import com.xkrs.straw.model.entity.RelUserRoleEntity; import com.xkrs.straw.model.entity.SysRoleEntity; import com.xkrs.straw.model.entity.SysUserEntity; import com.xkrs.straw.service.SysUserService; +import com.xkrs.straw.utils.VipTimeRangeUtils; import org.apache.http.util.TextUtils; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.data.domain.Sort; @@ -149,9 +150,15 @@ public class SysUserServiceImpl implements SysUserService { sysUserEntity.setAccountType("县级"); } if (9 == countyCode.length()) {//街道账号7天后过期 - sysUserEntity.setOverTime(dateTimeToString(LocalDateTime.now().plusDays(7L))); + //生成新的VIP时间范围Json内容 + String newVipTimeRangeJson = VipTimeRangeUtils.obtainNewVipTimeRangeJson(null, LocalDateTime.now().plusDays(7L)); + //更新字段 + sysUserEntity.setVipTimeRangeJson(newVipTimeRangeJson); } else {//省市区县账号5天后过期 - sysUserEntity.setOverTime(dateTimeToString(LocalDateTime.now().plusDays(5L))); + //生成新的VIP时间范围Json内容 + String newVipTimeRangeJson = VipTimeRangeUtils.obtainNewVipTimeRangeJson(null, LocalDateTime.now().plusDays(5L)); + //更新字段 + sysUserEntity.setVipTimeRangeJson(newVipTimeRangeJson); } sysUserEntity.setAddTime(dateTimeToString(LocalDateTime.now())); sysUserEntity.setLoginNum(0);