fix(server): 补齐服务承诺字段的管理端保存与回显
build / build-push (push) Failing after 2m7s

上一批只落了实体与 oapi 出参,管理端 save 入参与编辑回显没接上,
导致 front 录入的 6 个字段被 Jackson 静默丢弃。

- SvcModels.SvcItemSaveRequest 补 7 字段(含 @Size 校验,与实体列长一致)
- SvcModels.SvcItemEditVo 补 7 字段 + of() 映射
- ServiceItemService.adminSave 补 7 行赋值(空串归一 null)
- 新增 SvcItemPromiseFieldsTest:反序列化字段名对齐 + EditVo 映射(3 例)
- .gitignore 排除 local-debug/(本地探针,不入库)
This commit is contained in:
chenxing
2026-10-20 18:13:00 +08:00
parent c1bcbf2f88
commit af760913fa
4 changed files with 134 additions and 0 deletions
@@ -199,6 +199,14 @@ public class ServiceItemService {
item.setFormCode(emptyToNull(req.getFormCode()));
item.setFlowGuid(emptyToNull(req.getFlowGuid()));
item.setApplyUrl(applyUrl);
// 服务承诺(P1-1):空串归一为 null,避免库里出现 "" 与 null 两种空值
item.setCoopDepts(emptyToNull(req.getCoopDepts()));
item.setHandlerName(emptyToNull(req.getHandlerName()));
item.setHandleTimeDesc(emptyToNull(req.getHandleTimeDesc()));
item.setRunCount(req.getRunCount());
item.setExpressFlag(req.getExpressFlag());
item.setFeeDesc(emptyToNull(req.getFeeDesc()));
item.setFeeBasis(emptyToNull(req.getFeeBasis()));
item.setSortNo(req.getSortNo() == null ? 0 : req.getSortNo());
item = itemRepository.save(item);