Browse Source

修改注入方式

yujia 7 years ago
parent
commit
d2634dc65f

+ 12 - 11
src/main/java/com/uas/platform/b2c/prod/commodity/service/impl/ProductAttachServiceImpl.java

@@ -31,14 +31,6 @@ import com.uas.platform.core.persistence.criteria.CriterionExpression.Operator;
 import com.uas.platform.core.persistence.criteria.LogicalExpression;
 import com.uas.platform.core.persistence.criteria.PredicateUtils;
 import com.uas.platform.core.persistence.criteria.SimpleExpression;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
 import org.apache.commons.collections.CollectionUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
@@ -48,6 +40,15 @@ import org.springframework.data.jpa.domain.Specification;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
+import javax.persistence.criteria.CriteriaBuilder;
+import javax.persistence.criteria.CriteriaQuery;
+import javax.persistence.criteria.Predicate;
+import javax.persistence.criteria.Root;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 /**
  * Created by wangyc on 2018/6/26.
  *
@@ -74,11 +75,12 @@ public class ProductAttachServiceImpl implements ProductAttachService {
 
     private final UserBaseInfoDao userBaseInfoDao;
 
-    private final ProductService productService;
+    @Autowired
+    private ProductService productService;
 
     @Autowired
     public ProductAttachServiceImpl(ProductDao productDao, ProductAttachSubmitDao productAttachSubmitDao,
-        ComponentDao componentDao, BrandInfoDao brandInfoDao, KindInfoDao kindInfoDao, ComponentService componentService, KindDao kindDao, EnterpriseBaseInfoDao enterpriseBaseInfoDao, UserBaseInfoDao userBaseInfoDao, ProductService productService) {
+        ComponentDao componentDao, BrandInfoDao brandInfoDao, KindInfoDao kindInfoDao, ComponentService componentService, KindDao kindDao, EnterpriseBaseInfoDao enterpriseBaseInfoDao, UserBaseInfoDao userBaseInfoDao) {
         this.productDao = productDao;
         this.productAttachSubmitDao = productAttachSubmitDao;
         this.componentDao = componentDao;
@@ -88,7 +90,6 @@ public class ProductAttachServiceImpl implements ProductAttachService {
         this.kindDao = kindDao;
         this.enterpriseBaseInfoDao = enterpriseBaseInfoDao;
         this.userBaseInfoDao = userBaseInfoDao;
-        this.productService = productService;
     }
 
     @Override