From 3d75712b9cc5ff70abc45808594ffd303e35ef64 Mon Sep 17 00:00:00 2001
From: zepengdev <lzpsmith@outlook.com>
Date: Wed, 04 Jun 2025 08:26:38 +0800
Subject: [PATCH] 删除ProductCategory
---
/dev/null | 79 ---------------------------------------
1 files changed, 0 insertions(+), 79 deletions(-)
diff --git a/oying-system/src/main/java/com/oying/modules/pc/product/domain/ProductCategory.java b/oying-system/src/main/java/com/oying/modules/pc/product/domain/ProductCategory.java
deleted file mode 100644
index b677fdc..0000000
--- a/oying-system/src/main/java/com/oying/modules/pc/product/domain/ProductCategory.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package com.oying.modules.pc.product.domain;
-
-import lombok.Data;
-import cn.hutool.core.bean.BeanUtil;
-import io.swagger.annotations.ApiModelProperty;
-import cn.hutool.core.bean.copier.CopyOptions;
-import java.sql.Timestamp;
-import javax.validation.constraints.NotNull;
-import java.io.Serializable;
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-
-/**
-* @description /
-* @author lzp
-* @date 2025-05-13
-**/
-@Data
-@TableName("pc_product_category")
-public class ProductCategory implements Serializable {
-
- @TableId(value = "id", type = IdType.AUTO)
- @ApiModelProperty(value = "商品类目唯一标识")
- private Long id;
-
- @NotNull
- @ApiModelProperty(value = "商品ID")
- private Long productId;
-
- @ApiModelProperty(value = "所属一级店铺类目ID")
- private Long storeCategoryId;
-
- @ApiModelProperty(value = "所属二级店铺类目ID")
- private Long storeCategorySecondId;
-
- @ApiModelProperty(value = "创建者")
- private Long createBy;
-
- @ApiModelProperty(value = "创建时间")
- private Timestamp createTime;
-
- @ApiModelProperty(value = "修改者")
- private Long updateBy;
-
- @ApiModelProperty(value = "修改时间")
- private Timestamp updateTime;
-
- public void copy(ProductCategory source){
- BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
- }
-}
diff --git a/oying-system/src/main/java/com/oying/modules/pc/product/mapper/ProductCategoryMapper.java b/oying-system/src/main/java/com/oying/modules/pc/product/mapper/ProductCategoryMapper.java
deleted file mode 100644
index 8fe2ade..0000000
--- a/oying-system/src/main/java/com/oying/modules/pc/product/mapper/ProductCategoryMapper.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.oying.modules.pc.product.mapper;
-
-import com.oying.modules.pc.product.domain.ProductCategory;
-import com.oying.modules.pc.product.domain.dto.ProductCategoryQueryCriteria;
-import java.util.List;
-import org.apache.ibatis.annotations.Param;
-import org.apache.ibatis.annotations.Mapper;
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-
-/**
-* @author lzp
-* @date 2025-05-13
-**/
-@Mapper
-public interface ProductCategoryMapper extends BaseMapper<ProductCategory> {
-
- IPage<ProductCategory> findAll(@Param("criteria") ProductCategoryQueryCriteria criteria, Page<Object> page);
-
- List<ProductCategory> findAll(@Param("criteria") ProductCategoryQueryCriteria criteria);
-}
diff --git a/oying-system/src/main/java/com/oying/modules/pc/product/service/ProductCategoryService.java b/oying-system/src/main/java/com/oying/modules/pc/product/service/ProductCategoryService.java
deleted file mode 100644
index 8e3aa61..0000000
--- a/oying-system/src/main/java/com/oying/modules/pc/product/service/ProductCategoryService.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.oying.modules.pc.product.service;
-
-import com.oying.modules.pc.product.domain.ProductCategory;
-import com.oying.modules.pc.product.domain.dto.ProductCategoryQueryCriteria;
-import java.util.Map;
-import java.util.List;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.oying.utils.PageResult;
-
-/**
-* @description 服务接口
-* @author lzp
-* @date 2025-05-13
-**/
-public interface ProductCategoryService extends IService<ProductCategory> {
-
- /**
- * 查询数据分页
- * @param criteria 条件
- * @param page 分页参数
- * @return PageResult
- */
- PageResult<ProductCategory> queryAll(ProductCategoryQueryCriteria criteria, Page<Object> page);
-
- /**
- * 查询所有数据不分页
- * @param criteria 条件参数
- * @return List<ProductCategoryDto>
- */
- List<ProductCategory> queryAll(ProductCategoryQueryCriteria criteria);
-
- /**
- * 创建
- * @param resources /
- */
- void create(ProductCategory resources);
-
- /**
- * 编辑
- * @param resources /
- */
- void update(ProductCategory resources);
-
- /**
- * 多选删除
- * @param ids /
- */
- void deleteAll(List<Long> ids);
-
- /**
- * 导出数据
- * @param all 待导出的数据
- * @param response /
- * @throws IOException /
- */
- void download(List<ProductCategory> all, HttpServletResponse response) throws IOException;
-}
diff --git a/oying-system/src/main/java/com/oying/modules/pc/product/service/impl/ProductCategoryServiceImpl.java b/oying-system/src/main/java/com/oying/modules/pc/product/service/impl/ProductCategoryServiceImpl.java
deleted file mode 100644
index 844836f..0000000
--- a/oying-system/src/main/java/com/oying/modules/pc/product/service/impl/ProductCategoryServiceImpl.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.oying.modules.pc.product.service.impl;
-
-import com.oying.modules.pc.product.domain.ProductCategory;
-import com.oying.utils.FileUtil;
-import lombok.RequiredArgsConstructor;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.oying.modules.pc.product.service.ProductCategoryService;
-import com.oying.modules.pc.product.domain.dto.ProductCategoryQueryCriteria;
-import com.oying.modules.pc.product.mapper.ProductCategoryMapper;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-import com.oying.utils.PageUtil;
-import java.util.List;
-import java.util.Map;
-import java.io.IOException;
-import javax.servlet.http.HttpServletResponse;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import com.oying.utils.PageResult;
-
-/**
-* @description 服务实现
-* @author lzp
-* @date 2025-05-13
-**/
-@Service
-@RequiredArgsConstructor
-public class ProductCategoryServiceImpl extends ServiceImpl<ProductCategoryMapper, ProductCategory> implements ProductCategoryService {
-
- private final ProductCategoryMapper productCategoryMapper;
-
- @Override
- public PageResult<ProductCategory> queryAll(ProductCategoryQueryCriteria criteria, Page<Object> page){
- return PageUtil.toPage(productCategoryMapper.findAll(criteria, page));
- }
-
- @Override
- public List<ProductCategory> queryAll(ProductCategoryQueryCriteria criteria){
- return productCategoryMapper.findAll(criteria);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void create(ProductCategory resources) {
- productCategoryMapper.insert(resources);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void update(ProductCategory resources) {
- ProductCategory productCategory = getById(resources.getId());
- productCategory.copy(resources);
- productCategoryMapper.updateById(productCategory);
- }
-
- @Override
- @Transactional(rollbackFor = Exception.class)
- public void deleteAll(List<Long> ids) {
- productCategoryMapper.deleteBatchIds(ids);
- }
-
- @Override
- public void download(List<ProductCategory> all, HttpServletResponse response) throws IOException {
- List<Map<String, Object>> list = new ArrayList<>();
- for (ProductCategory productCategory : all) {
- Map<String, Object> map = new LinkedHashMap<>();
- map.put("商品ID", productCategory.getProductId());
- map.put("所属一级店铺类目ID", productCategory.getStoreCategoryId());
- map.put("所属二级店铺类目ID", productCategory.getStoreCategorySecondId());
- map.put("创建者", productCategory.getCreateBy());
- map.put("创建时间", productCategory.getCreateTime());
- map.put("修改者", productCategory.getUpdateBy());
- map.put("修改时间", productCategory.getUpdateTime());
- list.add(map);
- }
- FileUtil.downloadExcel(list, response);
- }
-}
--
Gitblit v1.9.3