From cffbff8eb7af88fb4d8f9d3f6ce77f46e97ddf39 Mon Sep 17 00:00:00 2001
From: jinlin <jinlin>
Date: 星期五, 28 六月 2024 15:39:37 +0800
Subject: [PATCH] 修改

---
 modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java |   39 ++++++++++++++++++++-------------------
 1 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java
index cee7108..5bb44b6 100644
--- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java
+++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/basicInfo/service/XhProductModelService.java
@@ -6,14 +6,10 @@
 import com.zt.common.utils.TreeUtils;
 import com.zt.life.modules.mainPart.basicInfo.dao.XhProductModelDao;
 import com.zt.life.modules.mainPart.basicInfo.model.ProductImg;
-import com.zt.life.modules.mainPart.basicInfo.model.TyProductModel;
 import com.zt.life.modules.mainPart.basicInfo.model.XhProductModel;
-import com.zt.life.modules.sysPictureBase.model.SysPictureBase;
-import com.zt.modules.sys.model.SysMenu;
 import org.springframework.stereotype.Service;
 import com.zt.common.db.query.QueryFilter;
 
-import javax.annotation.Resource;
 import java.util.List;
 
 
@@ -34,14 +30,6 @@
      */
     public List<XhProductModel> page(QueryFilter queryFilter) {
         List<XhProductModel> list = baseDao.getList(queryFilter.getQueryParams());
-        for (XhProductModel productModel : list) {
-            if (productModel.getProductType().equals("1")) {
-                productModel.setDefaultImg(baseDao.getDefaultImg());
-                if (productModel.getId() != null) {
-                    this.update(productModel);
-                }
-            }
-        }
         return list;
     }
 
@@ -54,17 +42,24 @@
         super.deleteLogic(ids);
     }
 
-    public List<XhProductModel> getAllTree() {
-        List<XhProductModel> productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE,
-                Constant.Bool.NO).gt("product_type", 1).orderByAsc(Constant.TableColumn.SORT));
+    public List<XhProductModel> getAllTree(Boolean showXdy) {
+        List<XhProductModel> productList;
+        if (showXdy) {
+            productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE,
+                    Constant.Bool.NO).gt("product_type", 1).orderByAsc(Constant.TableColumn.SORT));
+        } else {
+            productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE,
+                    Constant.Bool.NO).gt("product_type", 1).ne("product_type", 10).orderByAsc(Constant.TableColumn.SORT));
+
+        }
         return TreeUtils.build(productList);
     }
 
-    public Integer getNo(Long pid) {
-        if (baseDao.getNo(pid) == null) {
+    public Integer getNo(Long pid, String productType) {
+        if (baseDao.getNo(pid, productType) == null) {
             return 0;
         }
-        return baseDao.getNo(pid);
+        return baseDao.getNo(pid,productType);
     }
 
     public List<XhProductModel> getProductList() {
@@ -73,6 +68,12 @@
     }
 
     public List<ProductImg> getProduct(Long productId) {
-        return baseDao.getProduct(productId);
+        XhProductModel model =this.get(productId);
+        Long parentId = model.getPid();
+        return baseDao.getProduct(productId,parentId);
+    }
+
+    public List<XhProductModel> getTaskProductList() {
+        return baseDao.getTaskProductList();
     }
 }

--
Gitblit v1.9.1