单位-分类导出
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.czg.product.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author yjjie
|
||||
* @date 2026/1/30 18:15
|
||||
*/
|
||||
@Data
|
||||
public class ProductCategoryExportDTO {
|
||||
|
||||
@ExcelProperty("分类名称")
|
||||
private String name;
|
||||
|
||||
|
||||
@ExcelProperty("简称")
|
||||
private String shortName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package com.czg.product.dto;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 商品单位导出
|
||||
* @author yjjie
|
||||
* @date 2026/1/30 17:51
|
||||
*/
|
||||
@Data
|
||||
public class ProductUnitExportDTO {
|
||||
|
||||
@ExcelProperty("单位名称")
|
||||
private String name;
|
||||
/**
|
||||
* 单位类型 number-计数 weight-记重
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private String unitType;
|
||||
@ExcelProperty("单位类型")
|
||||
private String unitTypeRemark;
|
||||
|
||||
/**
|
||||
* 单位来源 1-系统预设 0-商家创建
|
||||
*/
|
||||
@ExcelIgnore
|
||||
private Integer isSystem;
|
||||
@ExcelProperty("单位来源")
|
||||
private String isSystemRemark;
|
||||
|
||||
public String getUnitTypeRemark() {
|
||||
return "number".equals(unitType) ? "计数" : "记重";
|
||||
}
|
||||
|
||||
public String getIsSystemRemark() {
|
||||
return isSystem == 1 ? "系统预设" : "商家创建";
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import com.czg.product.dto.ShopProdCategoryDTO;
|
||||
import com.czg.product.entity.ShopProdCategory;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -30,6 +31,8 @@ public interface ShopProdCategoryService extends IService<ShopProdCategory> {
|
||||
*/
|
||||
List<ShopProdCategoryDTO> getShopProdCategoryList(ShopProdCategoryDTO param);
|
||||
|
||||
void exportShopProdCategory(ShopProdCategoryDTO param, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 获取店铺商品分类详情
|
||||
* @param id id
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.czg.product.dto.ShopProdUnitDTO;
|
||||
import com.czg.product.entity.ShopProdUnit;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -31,6 +32,8 @@ public interface ShopProdUnitService extends IService<ShopProdUnit> {
|
||||
*/
|
||||
List<ShopProdUnitDTO> getShopProdUnitList(ShopProdUnitDTO param);
|
||||
|
||||
void exportShopProdUnit(ShopProdUnitDTO param, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 获取商品单位详情
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user