From 42f795894094c4d9541381da31357d4bbf93fea0 Mon Sep 17 00:00:00 2001
From: rentaiming <806181062@qq.com>
Date: 星期一, 03 六月 2024 09:36:44 +0800
Subject: [PATCH] 修改循环注入

---
 ruoyi-modules/ruoyi-promotion/src/main/java/com/ruoyi/promotion/service/impl/PromotionWishListServiceImpl.java |   27 +++++++++++----------------
 1 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/ruoyi-modules/ruoyi-promotion/src/main/java/com/ruoyi/promotion/service/impl/PromotionWishListServiceImpl.java b/ruoyi-modules/ruoyi-promotion/src/main/java/com/ruoyi/promotion/service/impl/PromotionWishListServiceImpl.java
index 005b2d3..57c439b 100644
--- a/ruoyi-modules/ruoyi-promotion/src/main/java/com/ruoyi/promotion/service/impl/PromotionWishListServiceImpl.java
+++ b/ruoyi-modules/ruoyi-promotion/src/main/java/com/ruoyi/promotion/service/impl/PromotionWishListServiceImpl.java
@@ -3,22 +3,18 @@
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.core.utils.page.PageDTO;
-import com.ruoyi.promotion.controller.dto.PromotionWishListDTO;
-import com.ruoyi.promotion.domain.pojo.CouponMember;
-import com.ruoyi.promotion.domain.pojo.PromotionBanner;
-import com.ruoyi.promotion.domain.pojo.PromotionWishList;
+import com.ruoyi.promotion.controller.forepart.dto.PromotionWishListDTO;
+import com.ruoyi.promotion.domain.PromotionWishList;
 import com.ruoyi.promotion.mapper.PromotionWishListMapper;
 import com.ruoyi.promotion.service.IPromotionWishListService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-import org.springframework.web.multipart.MultipartFile;
-import util.HuaWeiOBSUtil;
-
-import javax.annotation.Resource;
+import com.ruoyi.system.api.util.HuaWeiOBSUtil;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * <p>
@@ -31,15 +27,14 @@
 @Service
 public class PromotionWishListServiceImpl extends ServiceImpl<PromotionWishListMapper, PromotionWishList> implements IPromotionWishListService {
 
-    @Resource
-    private  IPromotionWishListService iPromotionWishListService;
+
     @Override
     public PageDTO<PromotionWishList> getPromotionWishList(PromotionWishListDTO promotionWishListDTO) {
 
         Page<PromotionWishList> page = new Page<>(promotionWishListDTO.getPageCurr(), promotionWishListDTO.getPageSize());
         LambdaQueryWrapper<PromotionWishList> wrapper= Wrappers.lambdaQuery();
         wrapper.eq(PromotionWishList::getMemberId,promotionWishListDTO.getMemberId());
-        Page<PromotionWishList> page1 = iPromotionWishListService.page(page, wrapper);
+        Page<PromotionWishList> page1 = this.page(page, wrapper);
         return PageDTO.of(page1);
     }
 
@@ -61,12 +56,12 @@
             }
             promotionWishList.setGoodsImageUrl(urlList.toString());
         }
-        iPromotionWishListService.save(promotionWishList);
+        this.save(promotionWishList);
     }
 
     @Override
     public void delPromotionWishOne(PromotionWishListDTO promotionWishListDTO) {
-        iPromotionWishListService.removeById(promotionWishListDTO.getRomotionWishId());
+        this.removeById(promotionWishListDTO.getRomotionWishId());
     }
 
     @Override
@@ -74,7 +69,7 @@
         LambdaQueryWrapper<PromotionWishList> wrapper= Wrappers.lambdaQuery();
         wrapper.eq(PromotionWishList::getId,promotionWishListDTO.getRomotionWishId());
         wrapper.eq(PromotionWishList::getDelFlag,0);
-        return iPromotionWishListService.getOne(wrapper);
+        return this.getOne(wrapper);
     }
 
 }

--
Gitblit v1.7.1