| | |
| | | super.deleteLogic(ids); |
| | | } |
| | | |
| | | public List<XhProductModel> getAllTree(Boolean showXdy, Integer ztShow) { |
| | | public List<XhProductModel> getAllTree(Boolean showXdy, Integer ztShow, Long productId) { |
| | | List<XhProductModel> productList = null; |
| | | if (showXdy) { |
| | | if (productId != null) { |
| | | productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE, |
| | | Constant.Bool.NO).ne("product_type", 5).and(wrapper -> wrapper.eq("ship_id", productId).or().eq("id", productId)).orderByAsc(Constant.TableColumn.SORT)); |
| | | } else { |
| | | productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE, |
| | | Constant.Bool.NO).ne("product_type", 5).orderByAsc(Constant.TableColumn.SORT)); |
| | | } |
| | | } else { |
| | | if (productId == null) { |
| | | if (ztShow == 1) { |
| | | productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE, |
| | | Constant.Bool.NO).lt("product_type", 5).ne("product_type", 10).orderByAsc(Constant.TableColumn.SORT)); |
| | |
| | | productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE, |
| | | Constant.Bool.NO).gt("product_type", 1).orderByAsc(Constant.TableColumn.SORT)); |
| | | } |
| | | |
| | | } else { |
| | | if (ztShow == 4) { |
| | | productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE, |
| | | Constant.Bool.NO).lt("product_type", 5).ne("product_type", 1).and(wrapper -> wrapper.eq("ship_id", productId).or().eq("id", productId)).orderByAsc(Constant.TableColumn.SORT)); |
| | | } else if (ztShow == 5) { |
| | | productList = baseDao.selectList(new QueryWrapper<XhProductModel>().eq(Constant.TableColumn.IS_DELETE, |
| | | Constant.Bool.NO).gt("product_type", 1).and(wrapper -> wrapper.eq("ship_id", productId).or().eq("id", productId)).orderByAsc(Constant.TableColumn.SORT)); |
| | | } |
| | | } |
| | | } |
| | | return TreeUtils.build(productList); |
| | | } |