fix:默认新增订单的发起者为操作人之一
This commit is contained in:
parent
e63d51c064
commit
1a8eba26a6
@ -552,6 +552,12 @@ public class OrderBiz {
|
|||||||
* @return {@link List<OrderOperator>}
|
* @return {@link List<OrderOperator>}
|
||||||
*/
|
*/
|
||||||
private List<OrderOperator> buildOrderOperatorParam(List<Long> operatorIds, Long orderId) {
|
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<>();
|
List<OrderOperator> orderOperatorList = new ArrayList<>();
|
||||||
for (Long operatorId : operatorIds) {
|
for (Long operatorId : operatorIds) {
|
||||||
OrderOperator orderOperator = new OrderOperator();
|
OrderOperator orderOperator = new OrderOperator();
|
||||||
|
@ -68,6 +68,7 @@ public class AddOrderDTO {
|
|||||||
/**
|
/**
|
||||||
* 额外费用
|
* 额外费用
|
||||||
*/
|
*/
|
||||||
|
@NotNull
|
||||||
@ApiModelProperty(value = "额外费用", required = true)
|
@ApiModelProperty(value = "额外费用", required = true)
|
||||||
@DecimalMin(value = "0", message = "额外费用不能小于0")
|
@DecimalMin(value = "0", message = "额外费用不能小于0")
|
||||||
private BigDecimal surchargeAmount;
|
private BigDecimal surchargeAmount;
|
||||||
@ -75,8 +76,8 @@ public class AddOrderDTO {
|
|||||||
/**
|
/**
|
||||||
* 操作人集合ID
|
* 操作人集合ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "操作人集合ID不能为空")
|
@NotNull
|
||||||
@NotEmpty
|
@NotEmpty(message = "操作人集合ID不能为空")
|
||||||
@ApiModelProperty(value = "操作人集合ID", required = true)
|
@ApiModelProperty(value = "操作人集合ID", required = true)
|
||||||
private List<Long> operatorIds;
|
private List<Long> operatorIds;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user