jinlin
2024-06-06 8c834663344b1cc9c2ca569e6911900edd407f73
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;
@@ -46,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() {
@@ -65,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();
    }
}