Browse Source

优惠券改造

xuhaifeng 9 months ago
parent
commit
a0220b4c83

+ 2 - 3
yiqi-api/src/main/java/com/yiqi/api/controller/WeAppCouponItemController.java

@@ -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) {

+ 0 - 1
yiqi-api/src/main/java/com/yiqi/api/controller/activity/WeAppActivityDiscountController.java

@@ -70,7 +70,6 @@ public class WeAppActivityDiscountController extends BaseController {
     /**
      * 获取全场折扣活动详细信息
      */
-    @PreAuthorize("@ss.hasPermi('activity:discountInfo:query')")
     @GetMapping(value = "getInfo")
     @ApiOperation(value = "获取全场折扣活动详细信息")
     public AjaxResult getInfo(@RequestParam(value = "id", required = false) Long id) {