|
@@ -150,10 +150,9 @@ public class WeAppCouponItemController extends BaseController {
|
|
|
|
|
|
@ApiOperation("查询优惠券适用衣服")
|
|
|
@GetMapping(value = "clothListByCouponId")
|
|
|
- public R<List<ClothItem>> clothListByCouponId(@RequestParam @ApiParam("优惠券ID") Long couponItemId) {
|
|
|
- AppCouponItem appCouponItem = appCouponItemService.getOne(new QueryWrapper<AppCouponItem>().lambda().eq(AppCouponItem::getId, couponItemId));
|
|
|
+ public R<List<ClothItem>> clothListByCouponId(@RequestParam @ApiParam("优惠券ID") Long couponTypeId) {
|
|
|
List<Long> clothIds = appCouponTypeApplyClothService.list(new QueryWrapper<AppCouponTypeApplyCloth>().lambda()
|
|
|
- .eq(AppCouponTypeApplyCloth::getCouponTypeId, appCouponItem.getCouponTypeId())
|
|
|
+ .eq(AppCouponTypeApplyCloth::getCouponTypeId, couponTypeId)
|
|
|
.eq(AppCouponTypeApplyCloth::getDelFlag, DeleteStatus.OK.getCode())).stream()
|
|
|
.map(AppCouponTypeApplyCloth::getClothItemId).collect(Collectors.toList());
|
|
|
if (clothIds.size() == 0) {
|