Commit 3cc96765 by 王志超

feat: 终止变更无需填写取消原因

parent 18d27000
Pipeline #86944 passed with stages
in 1 minute 35 seconds
......@@ -841,6 +841,11 @@ public class ChangeFlowBiz {
String operationType = req.getType();
boolean isTermination = "TERMINATION".equalsIgnoreCase(operationType);
// 取消必须填写原因,终止可以不填
if (!isTermination && StringUtils.isBlank(req.getCancelReason())) {
throw ExceptionFactory.createBiz(ResponseCode.BAD_REQUEST, "取消原因不能为空");
}
// 取消和终止都需要检查:节点不是9999(结束节点)且状态不是完结
Integer currentState = changeRecord.getState();
if (ChangeFlowEnum.NEW_END.getNodeId().equals(currentNodeId)
......
......@@ -6,7 +6,6 @@
*/
package com.netease.mail.yanxuan.change.dal.meta.model.req;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
......@@ -25,7 +24,6 @@ public class ChangeFlowCancelReq {
@NotNull(message = "工单id不能为空")
private Long flowId;
@NotBlank(message = "取消原因不能为空")
@Size(max = 200, message = "取消原因限制200字")
private String cancelReason;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment