refactor(product):优化产品查询并修正Excel字段格式
- 将QueryWrapper替换为LambdaQueryWrapper以提高类型安全性-修正产品类型字段的Excel字典转换表达式 -修正是否启用字段的Excel字典转换表达式 - 移除分类名称字段的Excel导出注解
This commit is contained in:
@@ -61,14 +61,14 @@ public class GearProductVo {
|
||||
* 产品类型(product=产品,semi=半成品,raw=原料)
|
||||
*/
|
||||
@ExcelProperty(value = "产品类型", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "p=roduct=产品,semi=半成品,raw=原料")
|
||||
@ExcelDictFormat(readConverterExp = "product=产品,semi=半成品,raw=原料")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 是否启用(0=否,1=是)
|
||||
*/
|
||||
@ExcelProperty(value = "是否启用", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(readConverterExp = "0==否,1=是")
|
||||
@ExcelDictFormat(readConverterExp = "0=否,1=是")
|
||||
private Integer isEnabled;
|
||||
|
||||
/**
|
||||
@@ -86,7 +86,6 @@ public class GearProductVo {
|
||||
//新增图像字段
|
||||
private String image;
|
||||
// 分类名称
|
||||
@ExcelProperty(value = "分类名称")
|
||||
private String categoryName;
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public class GearProductServiceImpl implements IGearProductService {
|
||||
*/
|
||||
@Override
|
||||
public List<GearProductVo> queryList(GearProductBo bo) {
|
||||
QueryWrapper<GearProduct> lqw = buildQueryWrapperPlus(bo);
|
||||
LambdaQueryWrapper<GearProduct> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user