| | |
| | | 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; |
| | | |
| | | |
| | | /** |
| | | * product_model |
| | | * |
| | | * @author zt generator |
| | | * @author zt generator |
| | | * @since 1.0.0 2024-02-29 |
| | | */ |
| | | @Service |
| | | public class XhProductModelService extends BaseService<XhProductModelDao, XhProductModel> { |
| | | public class XhProductModelService extends BaseService<XhProductModelDao, XhProductModel> { |
| | | |
| | | /** |
| | | * 分页查询 |
| | |
| | | * @return |
| | | */ |
| | | public List<XhProductModel> page(QueryFilter queryFilter) { |
| | | return baseDao.getList(queryFilter.getQueryParams()); |
| | | List<XhProductModel> list = baseDao.getList(queryFilter.getQueryParams()); |
| | | return list; |
| | | } |
| | | |
| | | /** |
| | |
| | | super.deleteLogic(ids); |
| | | } |
| | | |
| | | public List<XhProductModel> getAllTree() { |
| | | List<XhProductModel> productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE, |
| | | Constant.Bool.NO) .gt("node_type", 1).orderByAsc(Constant.TableColumn.SORT)); |
| | | return TreeUtils.build(productList); |
| | | 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() { |
| | | List<XhProductModel> ProductList = baseDao.getProductList(); |
| | | return TreeUtils.build(ProductList); |
| | | } |
| | | |
| | | 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(); |
| | | } |
| | | } |