| | |
| | | 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; |
| | | |
| | | |
| | |
| | | */ |
| | | 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; |
| | | } |
| | | |
| | |
| | | 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() { |
| | |
| | | public List<ProductImg> getProduct(Long productId) { |
| | | return baseDao.getProduct(productId); |
| | | } |
| | | |
| | | public List<XhProductModel> getTaskProductList() { |
| | | return baseDao.getTaskProductList(); |
| | | } |
| | | } |