替换旧代码

This commit is contained in:
liuchengqian 2023-02-15 17:31:08 +08:00
parent 7659e78e08
commit 9cfa6bd47b

View File

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