update - 调整"黑白名单"更新模型入参

This commit is contained in:
wangli 2024-01-08 17:25:31 +08:00
parent fa8149ce2e
commit 35c2295f63
8 changed files with 23 additions and 15 deletions

View File

@ -108,7 +108,7 @@ public interface ProcessCategoryApi {
* @return
*/
@PostMapping("/api/process/category/config/create")
CommonResponse<CategoryConfigItemVO> createConfig(@RequestBody CategoryConfigCreateDTO dto);
CommonResponse<Boolean> createConfig(@RequestBody CategoryConfigCreateDTO dto);
/**
* 删除指定分类的配置项数据

View File

@ -8,6 +8,7 @@ public enum BpmnFlowNodeMode {
AUTO_PASSED("AUTO_PASSED", "自动通过"),
AUTO_REJECTED("AUTO_REJECTED", "自动拒绝"),
BUSINESS_BIZ_SPECIFY("BUSINESS_BIZ_SPECIFY", "业务指定审批人"),
NO_BODY("NO_BODY", "不设置审批人"),
EXCEPTIONAL("EXCEPTIONAL", "异常"),
;

View File

@ -4,6 +4,9 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
* 业务分类黑白名单创建入参模型
*
@ -30,7 +33,8 @@ public class CategoryConfigCreateDTO {
* 工作台 ID
*/
@ApiModelProperty("工作台 ID")
private Long workspaceId;
@NotEmpty(message = "工作台 ID 不能为空")
private List<Long> workspaceIds;
/**
* 操作人姓名

View File

@ -16,9 +16,8 @@ public interface CategoryConfigService {
* 业务分类创建黑白名单配置项
*
* @param dto
* @return
*/
CategoryConfigItemVO create(CategoryConfigCreateDTO dto);
void create(CategoryConfigCreateDTO dto);
/**
* 业务分类黑白名单配置项搜索

View File

@ -81,6 +81,7 @@ import static cn.axzo.workflow.common.enums.BpmnFlowNodeMode.AUTO_REJECTED;
import static cn.axzo.workflow.common.enums.BpmnFlowNodeMode.BUSINESS_BIZ_SPECIFY;
import static cn.axzo.workflow.common.enums.BpmnFlowNodeMode.EXCEPTIONAL;
import static cn.axzo.workflow.common.enums.BpmnFlowNodeMode.GENERAL;
import static cn.axzo.workflow.common.enums.BpmnFlowNodeMode.NO_BODY;
import static cn.axzo.workflow.common.enums.BpmnFlowNodeMode.OR;
import static cn.axzo.workflow.common.enums.BpmnFlowNodeType.NODE_BUSINESS;
import static cn.axzo.workflow.common.enums.BpmnFlowNodeType.NODE_CARBON_COPY;
@ -588,7 +589,7 @@ public class BpmnProcessInstanceServiceImpl implements BpmnProcessInstanceServic
node.setNodeMode(BUSINESS_BIZ_SPECIFY);
break;
case nobody:
node.setNodeMode(GENERAL);
node.setNodeMode(NO_BODY);
break;
default:
if (userTask.getBehavior() instanceof MultiInstanceActivityBehavior) {

View File

@ -376,8 +376,8 @@ public class BpmnProcessTaskServiceImpl implements BpmnProcessTaskService {
(BpmnTaskDelegateAssigner) assginerSnapshot.getValue() : null;
if (StringUtils.hasLength(vo.getAssignee()) && !vo.getAssignee().contains(TASK_ASSIGNEE_SKIP_FLAT)) {
vo.setAssignee(Objects.isNull(assigner) ? "" : assigner.getAssignee());
vo.setAssigneeSnapshot(assigner);
}
vo.setAssigneeSnapshot(assigner);
}
return vos;
}

View File

@ -37,13 +37,15 @@ public class CategoryConfigServiceImpl extends ServiceImpl<ExtAxDictConfMapper,
private final CategoryConfigConverter categoryConfigConverter;
@Override
public CategoryConfigItemVO create(CategoryConfigCreateDTO dto) {
ExtAxDictConf config = new ExtAxDictConf();
config.setDictId(dto.getDictId());
config.setConfigType(dto.getConfigType());
config.setWorkspaceId(dto.getWorkspaceId());
config.setOperationName(dto.getOperationName());
dictConfMapper.insert(config);
public void create(CategoryConfigCreateDTO dto) {
dto.getWorkspaceIds().forEach(workspaceId -> {
ExtAxDictConf config = new ExtAxDictConf();
config.setDictId(dto.getDictId());
config.setConfigType(dto.getConfigType());
config.setWorkspaceId(workspaceId);
config.setOperationName(dto.getOperationName());
dictConfMapper.insert(config);
});
return categoryConfigConverter.toVo(config);
}

View File

@ -141,8 +141,9 @@ public class ProcessCategoryController implements ProcessCategoryApi {
@PostMapping("/config/create")
@Override
public CommonResponse<CategoryConfigItemVO> createConfig(CategoryConfigCreateDTO dto) {
return success(categoryConfigService.create(dto));
public CommonResponse<Boolean> createConfig(CategoryConfigCreateDTO dto) {
categoryConfigService.create(dto);
return success(true);
}
@DeleteMapping("/config/delete/{id}")