|
|
@@ -148,6 +148,8 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
|
|
|
private final YhMailService yhMailService;
|
|
|
|
|
|
+ private final UserDistributePosterRecordMapper userDistributePosterRecordMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public SearchResult<RenewalView> getMyTicket(long userId, Boolean isLoginPopularize, String customId, String account) {
|
|
|
User u = userMapper.selectById(userId);
|
|
|
@@ -345,7 +347,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
Long qaId = groupsRelationMapper.selectGoodsDonQaByGoodsId(ticket.getGoodsId());
|
|
|
ticket.setQa(qaId > 0 ? true : false);
|
|
|
//是否存在海报
|
|
|
- ticket.setPosterInfo(setGoodsPoster(ticket, u));
|
|
|
+ ticket.setPosterInfo(setGoodsPoster(ticket, u, userIds));
|
|
|
|
|
|
//续费升级折扣
|
|
|
setRenewDiscount(ticket);
|
|
|
@@ -908,7 +910,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private DistributePosterGoodsDetailView setGoodsPoster(RenewalView ticket, User user) {
|
|
|
+ private DistributePosterGoodsDetailView setGoodsPoster(RenewalView ticket, User user, List<Long> userIds) {
|
|
|
DistributePosterGoodsDetailView distributePosterGoodsDetailView = beanSearcher.searchFirst(DistributePosterGoodsDetailView.class, MapUtils.flatBuilder(request.getParameterMap())
|
|
|
.field(DistributePosterGoodsFrontView::getGoodsId, ticket.getGoodsId()).build());
|
|
|
if (distributePosterGoodsDetailView == null) {
|
|
|
@@ -947,6 +949,11 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //用户推广海报记录id
|
|
|
+ Optional.ofNullable(userDistributePosterRecordMapper.selectOne(Wrappers.lambdaQuery(UserDistributePosterRecord.class)
|
|
|
+ .eq(UserDistributePosterRecord::getPosterId, distributePosterGoodsDetailView.getId())
|
|
|
+ .in(UserDistributePosterRecord::getUserId, userIds)
|
|
|
+ .last("limit 1"))).ifPresent(re -> distributePosterGoodsDetailView.setRid(re.getId()));
|
|
|
return distributePosterGoodsDetailView;
|
|
|
}
|
|
|
|