Commit bcfa08f8ef1042bb0a6db31166839b356440cbd9
1 parent
846d0605
fix: 类更名CustomTitleSetting->TitleSetting
Showing
3 changed files
with
6 additions
and
7 deletions
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/definition/vo/model/BpmModelMetaInfoVO.java
| ... | ... | @@ -75,7 +75,7 @@ public class BpmModelMetaInfoVO { |
| 75 | 75 | private Integer autoApprovalType; |
| 76 | 76 | |
| 77 | 77 | @Schema(description = "标题设置", example = "{}") |
| 78 | - private CustomTitleSetting customTitleSetting; | |
| 78 | + private TitleSetting titleSetting; | |
| 79 | 79 | |
| 80 | 80 | @Schema(description = "流程 ID 规则") |
| 81 | 81 | @Data |
| ... | ... | @@ -101,11 +101,10 @@ public class BpmModelMetaInfoVO { |
| 101 | 101 | |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - // TODO @lesan:TitleSetting 会不会更好。因为 Custom 和 Setting 有点重叠 | |
| 105 | 104 | @Schema(description = "标题设置") |
| 106 | 105 | @Data |
| 107 | 106 | @Valid |
| 108 | - public static class CustomTitleSetting { | |
| 107 | + public static class TitleSetting { | |
| 109 | 108 | |
| 110 | 109 | @Schema(description = "是否自定义", example = "false") |
| 111 | 110 | @NotNull(message = "是否自定义不能为空") | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/dal/dataobject/definition/BpmProcessDefinitionInfoDO.java
| ... | ... | @@ -174,6 +174,6 @@ public class BpmProcessDefinitionInfoDO extends BaseDO { |
| 174 | 174 | * 标题设置 |
| 175 | 175 | */ |
| 176 | 176 | @TableField(typeHandler = JacksonTypeHandler.class) |
| 177 | - private BpmModelMetaInfoVO.CustomTitleSetting customTitleSetting; | |
| 177 | + private BpmModelMetaInfoVO.TitleSetting titleSetting; | |
| 178 | 178 | |
| 179 | 179 | } | ... | ... |
yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/task/BpmProcessInstanceServiceImpl.java
| ... | ... | @@ -618,15 +618,15 @@ public class BpmProcessInstanceServiceImpl implements BpmProcessInstanceService |
| 618 | 618 | processInstanceBuilder.predefineProcessInstanceId(processIdRedisDAO.generate(processIdRule)); |
| 619 | 619 | } |
| 620 | 620 | // 3.2 流程名称 |
| 621 | - BpmModelMetaInfoVO.CustomTitleSetting customTitleSetting = processDefinitionInfo.getCustomTitleSetting(); | |
| 622 | - if (customTitleSetting != null && Boolean.TRUE.equals(customTitleSetting.getEnable())) { | |
| 621 | + BpmModelMetaInfoVO.TitleSetting titleSetting = processDefinitionInfo.getTitleSetting(); | |
| 622 | + if (titleSetting != null && Boolean.TRUE.equals(titleSetting.getEnable())) { | |
| 623 | 623 | AdminUserRespDTO user = adminUserApi.getUser(userId); |
| 624 | 624 | // TODO @lesan:new HashMap 会更好哈。clone 感觉反射,不一定合适。 |
| 625 | 625 | Map<String, Object> cloneVariables = ObjectUtil.clone(variables); |
| 626 | 626 | cloneVariables.put(BpmnVariableConstants.PROCESS_INSTANCE_VARIABLE_START_USER_ID, user.getNickname()); |
| 627 | 627 | cloneVariables.put(BpmnVariableConstants.PROCESS_START_TIME, DateUtil.now()); |
| 628 | 628 | cloneVariables.put(BpmnVariableConstants.PROCESS_DEFINITION_NAME, definition.getName().trim()); |
| 629 | - processInstanceBuilder.name(StrUtil.format(customTitleSetting.getTitle(), cloneVariables)); | |
| 629 | + processInstanceBuilder.name(StrUtil.format(titleSetting.getTitle(), cloneVariables)); | |
| 630 | 630 | } else { |
| 631 | 631 | processInstanceBuilder.name(definition.getName().trim()); |
| 632 | 632 | } | ... | ... |