板材接口修改

This commit is contained in:
lym
2024-04-19 18:57:27 +08:00
parent af59e4d830
commit 49f9cb9de5
2 changed files with 4 additions and 3 deletions
@@ -107,9 +107,9 @@ public class PlateController {
// 手动创建导出 demo // 手动创建导出 demo
List<PlateImportExcelVO> list = Arrays.asList( List<PlateImportExcelVO> list = Arrays.asList(
PlateImportExcelVO.builder().goodsId("SP1123456").goodsName("xixih").material("颗粒板").width(String.valueOf(1212.3)).height(String.valueOf(12131.6)) PlateImportExcelVO.builder().goodsId("SP1123456").goodsName("xixih").material("颗粒板").width(String.valueOf(1212.3)).height(String.valueOf(12131.6))
.thickness(String.valueOf(0.2)).brand("鹅厂").spec("大厂").remark("测试").price(String.valueOf(33333.2)).build(), .thickness(String.valueOf(0.2)).brand("鹅厂").spec("大厂").remark("测试").price(String.valueOf(33333.2)).color("黑色").build(),
PlateImportExcelVO.builder().goodsId("SP1123457").goodsName("2L").material("yuanma@cf.com").width(String.valueOf(21.6)).height(String.valueOf(12231.6)) PlateImportExcelVO.builder().goodsId("SP1123457").goodsName("2L").material("yuanma@cf.com").width(String.valueOf(21.6)).height(String.valueOf(12231.6))
.thickness(String.valueOf(5.3)).brand("kkkkkk").spec("大厂").remark("测试").price(String.valueOf(333.555)).build() .thickness(String.valueOf(5.3)).brand("kkkkkk").spec("大厂").remark("测试").price(String.valueOf(333.555)).color("黑色").build()
); );
// 输出 // 输出
ExcelUtils.write(response, "板材导入模板.xlsx", "板材列表", PlateImportExcelVO.class, list); ExcelUtils.write(response, "板材导入模板.xlsx", "板材列表", PlateImportExcelVO.class, list);
@@ -12,6 +12,7 @@ import com.alibaba.excel.annotation.*;
public class PlateRespVO { public class PlateRespVO {
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelIgnore
private Long id; private Long id;
@Schema(description = "客户的商品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @Schema(description = "客户的商品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@@ -59,7 +60,7 @@ public class PlateRespVO {
private String remark; private String remark;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间") @ExcelIgnore
private LocalDateTime createTime; private LocalDateTime createTime;
private Long organId; private Long organId;