|
@@ -527,7 +527,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
if (!giftCardUserRecord.getIsPay()) {
|
|
if (!giftCardUserRecord.getIsPay()) {
|
|
|
throw BusinessRuntimeException.getInstance("无效礼品卡,好友未购买");
|
|
throw BusinessRuntimeException.getInstance("无效礼品卡,好友未购买");
|
|
|
}
|
|
}
|
|
|
- if (giftCardUserRecord.getUserId().equals(userId)) {
|
|
|
|
|
|
|
+ List<Long> relationUserIdList = userBindRelationService.getRelationUserIdList(userId, null);
|
|
|
|
|
+ if (relationUserIdList.contains(userId)) {
|
|
|
throw BusinessRuntimeException.getInstance("无法领取自己购买的礼品卡");
|
|
throw BusinessRuntimeException.getInstance("无法领取自己购买的礼品卡");
|
|
|
}
|
|
}
|
|
|
if (giftCardUserRecord.getToUserId() != 0 && !giftCardUserRecord.getToUserId().equals(userId)) {
|
|
if (giftCardUserRecord.getToUserId() != 0 && !giftCardUserRecord.getToUserId().equals(userId)) {
|
|
@@ -556,7 +557,6 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|
|
log.info("礼品卡id:{}虚拟车票skuId:{}不存在", giftCardUserRecord.getId(), gcSkuId);
|
|
log.info("礼品卡id:{}虚拟车票skuId:{}不存在", giftCardUserRecord.getId(), gcSkuId);
|
|
|
throw BusinessRuntimeException.getInstance("该礼品卡对应的虚拟卡不存在,请联系客服");
|
|
throw BusinessRuntimeException.getInstance("该礼品卡对应的虚拟卡不存在,请联系客服");
|
|
|
}
|
|
}
|
|
|
- List<Long> relationUserIdList = userBindRelationService.getRelationUserIdList(userId, null);
|
|
|
|
|
if (relationId != null) {
|
|
if (relationId != null) {
|
|
|
GroupsRelation groupsRelation = groupsRelationMapper.selectOne(Wrappers.lambdaQuery(GroupsRelation.class)
|
|
GroupsRelation groupsRelation = groupsRelationMapper.selectOne(Wrappers.lambdaQuery(GroupsRelation.class)
|
|
|
.in(GroupsRelation::getUserId, relationUserIdList)
|
|
.in(GroupsRelation::getUserId, relationUserIdList)
|