feat: 新增初始化材料

This commit is contained in:
han0
2024-09-09 11:12:38 +08:00
parent 886a1c0018
commit acc366e029
5 changed files with 85 additions and 1 deletions

View File

@@ -154,7 +154,6 @@ public class BudgetController {
return FuHttpResponse.Builder().dataResponse(budgetItemList).build();
}
// todo-1 新增材料 编码替换
// todo-1 发布编码替换
// todo-1 公众网站数据
// todo-1 公众网站历史数据

View File

@@ -170,3 +170,4 @@ public class MaterialController {
}

View File

@@ -139,6 +139,7 @@ public class Material extends Model<Material> {
public Material(MaterialCreateRequest params, SaBaseLoginUser user) {
this.id = params.buildId();
this.parentId = params.buildParentId();
this.category1 = params.getCategory1();
this.category2 = params.getCategory2();
this.category3 = params.getCategory3();

View File

@@ -68,4 +68,12 @@ public class MaterialCreateRequest {
return id;
}
public String buildParentId() {
if (ObjectUtil.isNotEmpty(category4)) {
return category1 + category2 + category3;
} else {
return category1 + category2;
}
}
}