use of com.whoiszxl.entity.CouponCategory in project shopzz by whoiszxl.
the class PromotionFeignClientImpl method getCoupon.
@Override
public ResponseResult<CouponFeignDTO> getCoupon(Long couponId) {
Coupon coupon = couponService.getById(couponId);
CouponFeignDTO couponFeignDTO = dozerUtils.map(coupon, CouponFeignDTO.class);
List<CouponCategory> couponCategoryList = couponCategoryService.list(Wrappers.<CouponCategory>lambdaQuery().eq(CouponCategory::getCouponId, couponId));
List<Long> categoryIdList = couponCategoryList.stream().map(CouponCategory::getCategoryId).collect(Collectors.toList());
couponFeignDTO.setCategoryIdList(categoryIdList);
return ResponseResult.buildSuccess(couponFeignDTO);
}
Aggregations