|
@@ -18,6 +18,7 @@ import com.qs.mp.user.mapper.UserCouponMapper;
|
|
|
import com.qs.mp.user.service.IUserCouponService;
|
|
|
import java.util.Iterator;
|
|
|
import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
@@ -60,6 +61,18 @@ public class UserCouponServiceImpl extends ServiceImpl<UserCouponMapper, UserCou
|
|
|
queryWrapper.eq("t1.status", UserCouponStatusEnum.USED);
|
|
|
}
|
|
|
List<UserCouponVO> userCouponVOList = getBaseMapper().listUserCouponVO(queryWrapper);
|
|
|
+ for (UserCouponVO couponVO : userCouponVOList) {
|
|
|
+ // 指定盲票购买的优惠券
|
|
|
+ if (couponVO.getType() == CouponTypeEnum.TICKET_ORDER && couponVO.getUseArea() == CouponUseAreaEnum.POST_SCOPE) {
|
|
|
+ List<CouponTicket> couponTicketList = couponTicketService.list(new LambdaQueryWrapper<CouponTicket>()
|
|
|
+ .eq(CouponTicket::getCouponId, couponVO.getCouponId()));
|
|
|
+ List<String> boxIds = couponTicketList.stream().map(couponTicket -> {
|
|
|
+ return couponTicket.getBoxId();
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ couponVO.setBoxIds(boxIds);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return userCouponVOList;
|
|
|
}
|
|
|
|