vip_opt
This commit is contained in:
2025-06-05 15:47:43 +08:00
parent 8ccadb7241
commit 427b614532
4 changed files with 33 additions and 1 deletions

View File

@@ -30,6 +30,8 @@ import com.accompany.business.mybatismapper.NameplateMapper;
import com.accompany.business.service.car.CarGoodsService;
import com.accompany.business.service.dress.InfoCardService;
import com.accompany.business.service.gift.GiftService;
import com.accompany.business.service.headwear.HeadwearService;
import com.accompany.business.service.medal.MedalService;
import com.accompany.business.service.vip.*;
import com.accompany.common.constant.Constant;
import com.accompany.common.redis.RedisKey;
@@ -86,6 +88,10 @@ public class VipAdminService {
private CarGoodsService carGoodsService;
@Autowired
private ChatBubbleService chatBubbleService;
@Autowired
private HeadwearService headwearService;
@Autowired
private MedalService medalService;
@Autowired
private VipReturnProfitService vipReturnProfitService;
@@ -237,7 +243,27 @@ public class VipAdminService {
}
if (needAddAuth) {
// 需要添加的权益物品
if (Constant.VipAuthType.NAMEPLATE.equals(authType)) {
if(Constant.VipAuthType.MEDAL.equals(authType)){
for (String value : inputItemValues) {
int medalId = Integer.valueOf(value);
Medal medal = medalService.getById(medalId);
if (null == medal) {
throw new AdminServiceException(BusiStatus.BUSIERROR, "勋章不存在");
}
VipAuthItem vipAuthItem = buildVipAuthItem(level, authType, value);
vipAuthItemService.saveOrUpdate(vipAuthItem);
}
} else if(Constant.VipAuthType.HEADWEAR.equals(authType)){
for (String value : inputItemValues) {
int headwearId = Integer.valueOf(value);
Headwear headwear = headwearService.getHeadwear(headwearId);
if (null == headwear) {
throw new AdminServiceException(BusiStatus.BUSIERROR, "头饰不存在");
}
VipAuthItem vipAuthItem = buildVipAuthItem(level, authType, value);
vipAuthItemService.saveOrUpdate(vipAuthItem);
}
} else if (Constant.VipAuthType.NAMEPLATE.equals(authType)) {
for (String value : inputItemValues) {
long namePlateId = Long.parseLong(value);
Nameplate nameplate = nameplateMapper.selectById(namePlateId);

View File

@@ -54,6 +54,8 @@ public class UserVipInfoVO extends VipBaseInfoVO {
private Boolean visitListView;
@ApiModelProperty("无痕浏览")
private Boolean visitHide;
@ApiModelProperty("勋章席位")
private Boolean medalSeat;
@ApiModelProperty("进房特效")
private String enterRoomEffects;
@ApiModelProperty("发送房间公屏图片")

View File

@@ -3238,6 +3238,8 @@ public class Constant {
public static final Byte ROOM_SCREEN_PIC = 24;
public static final Byte VISIT_LIST_VIEW = 25;//无痕浏览
public static final Byte VISIT_HIDE = 26;//查看访客
public static final Byte MEDAL_SEAT = 27;//勋章席位
}
/**

View File

@@ -209,6 +209,8 @@ public class VipUtil {
userVipInfoVO.setVisitListView(getAuthItemSwitch(typeMap, Constant.VipAuthType.VISIT_LIST_VIEW.byteValue(), uid));
//无痕浏览
userVipInfoVO.setVisitHide(getAuthItemSwitch(typeMap, Constant.VipAuthType.VISIT_HIDE.byteValue(), uid));
userVipInfoVO.setMedalSeat(getAuthItemSwitch(typeMap, Constant.VipAuthType.MEDAL_SEAT.byteValue(), uid));
}
UserVipInfo userVipInfo = SpringContextHolder.getBean(UserVipInfoService.class).getValidUserVipInfo(uid);
if (null != userVipInfo) {