fix:默认新增订单的发起者为操作人之一

This commit is contained in:
chenxiky 2025-07-26 18:29:41 +08:00
parent e63d51c064
commit 1a8eba26a6
2 changed files with 9 additions and 2 deletions

View File

@ -552,6 +552,12 @@ public class OrderBiz {
* @return {@link List<OrderOperator>}
*/
private List<OrderOperator> buildOrderOperatorParam(List<Long> operatorIds, Long orderId) {
// 获取当前登录人ID
Long currentOperatorId = SecurityUtils.getCurrentUserId();
// 如果操作人不包含在 operatorIds则添加当前登录人ID默认添加任务发起者为操作人
if (!operatorIds.contains(currentOperatorId)) {
operatorIds.add(currentOperatorId);
}
List<OrderOperator> orderOperatorList = new ArrayList<>();
for (Long operatorId : operatorIds) {
OrderOperator orderOperator = new OrderOperator();

View File

@ -68,6 +68,7 @@ public class AddOrderDTO {
/**
* 额外费用
*/
@NotNull
@ApiModelProperty(value = "额外费用", required = true)
@DecimalMin(value = "0", message = "额外费用不能小于0")
private BigDecimal surchargeAmount;
@ -75,8 +76,8 @@ public class AddOrderDTO {
/**
* 操作人集合ID
*/
@NotNull(message = "操作人集合ID不能为空")
@NotEmpty
@NotNull
@NotEmpty(message = "操作人集合ID不能为空")
@ApiModelProperty(value = "操作人集合ID", required = true)
private List<Long> operatorIds;