updates
This commit is contained in:
parent
49c09dae61
commit
5b7dc7446b
|
|
@ -8,6 +8,8 @@ import org.apache.shiro.SecurityUtils;
|
|||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.AssertUtils;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.modules.mini.dto.VipDTO;
|
||||
import org.jeecg.modules.mini.service.MiniUserService;
|
||||
import org.jeecg.modules.web.dto.ArtRecommendMajorBaseDTO;
|
||||
import org.jeecg.modules.yx.constant.YxConstant;
|
||||
import org.jeecg.modules.yx.dto.UserScoreInfo;
|
||||
|
|
@ -40,6 +42,8 @@ public class UserScoreService {
|
|||
@Resource
|
||||
private YxVolunteerMapper yxVolunteerMapper;
|
||||
@Resource
|
||||
private MiniUserService miniUserService;
|
||||
@Resource
|
||||
private RedisUtil redisUtil;
|
||||
|
||||
/**
|
||||
|
|
@ -92,6 +96,7 @@ public class UserScoreService {
|
|||
long useCount = 0;
|
||||
long residueCount = 0;
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
VipDTO vipDTO = miniUserService.getUserVip(loginUser.getId());
|
||||
AssertUtils.notNull(loginUser, "请先登录!");
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
Date date = new Date();
|
||||
|
|
@ -104,9 +109,19 @@ public class UserScoreService {
|
|||
useCount = yxUserScoreMapper.selectCount(lambdaQueryWrapper);
|
||||
//设置可修改次数
|
||||
if (useCount>0) {
|
||||
residueCount = 0;
|
||||
}else{
|
||||
if(vipDTO.getVipLevel()!=null && vipDTO.getVipLevel()>0 && vipDTO.getVipLevel()<=2){
|
||||
useCount = 10;
|
||||
}else{
|
||||
useCount = 5;
|
||||
}
|
||||
residueCount = 1;
|
||||
}else{
|
||||
if(vipDTO.getVipLevel()!=null && vipDTO.getVipLevel()>0 && vipDTO.getVipLevel()<=2){
|
||||
useCount = 9;
|
||||
}else{
|
||||
useCount = 4;
|
||||
}
|
||||
residueCount = 0;
|
||||
}
|
||||
}else{
|
||||
String format = YxConstant.sdf.format(date);
|
||||
|
|
|
|||
Loading…
Reference in New Issue