vip优惠商品添加用户是否vip判断

This commit is contained in:
wuchunlei
2025-03-14 13:09:23 +08:00
parent 7eb3e58a18
commit 16f8166877
12 changed files with 26 additions and 22 deletions

View File

@@ -9,7 +9,7 @@ import java.util.Set;
public interface UserVipService extends IService<UserVip> {
boolean noVip();
boolean isVip();
boolean noMedicalVip();
boolean isMedicalVip();
boolean isChineseWesternVip();

View File

@@ -31,14 +31,14 @@ public class UserVipServiceImpl extends ServiceImpl<UserVipDao, UserVip> impleme
private VipBuyConfigDao vipBuyConfigDao;
@Override
public boolean noVip() {
public boolean isVip() {
List<UserVip> userVipList = userVipDao.selectList(new LambdaQueryWrapper<UserVip>()
.eq(UserVip::getUserId, ShiroUtils.getUId())
.eq(UserVip::getState,0));
if (userVipList.size() > 0) {
return false;
}else {
return true;
}else {
return false;
}
}