feat: 新增初始化材料
This commit is contained in:
@@ -154,7 +154,6 @@ public class BudgetController {
|
||||
return FuHttpResponse.Builder().dataResponse(budgetItemList).build();
|
||||
}
|
||||
|
||||
// todo-1 新增材料 编码替换
|
||||
// todo-1 发布编码替换
|
||||
// todo-1 公众网站数据
|
||||
// todo-1 公众网站历史数据
|
||||
|
||||
@@ -170,3 +170,4 @@ public class MaterialController {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -68,4 +68,12 @@ public class MaterialCreateRequest {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String buildParentId() {
|
||||
if (ObjectUtil.isNotEmpty(category4)) {
|
||||
return category1 + category2 + category3;
|
||||
} else {
|
||||
return category1 + category2;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user