Procházet zdrojové kódy

Merge remote-tracking branch 'origin/dev' into dev

lengfaqiang před 2 roky
rodič
revize
9e9daa8fda

+ 6 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/PurchaseOrderDraftParam.java

@@ -67,6 +67,12 @@ public class PurchaseOrderDraftParam {
      * 交易方式(预付款、货到付款)
      */
     private String trading;
+
+    /**
+     * 交付类型
+     */
+    private String deliveryType;
+
     /**
      * 备注
      */

+ 4 - 0
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/PurchaseOrderParam.java

@@ -79,6 +79,10 @@ public class PurchaseOrderParam {
      */
     @NotBlank(message = "交易方式不能为空")
     private String trading;
+
+    @NotBlank(message = "交付类型不能为空")
+    private String deliveryType;
+
     /**
      * 备注
      */

+ 0 - 2
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/ValetOrderDraftParam.java

@@ -14,8 +14,6 @@ import lombok.ToString;
 @ToString
 public class ValetOrderDraftParam extends PurchaseOrderDraftParam {
 
-    private String deliveryType;
-
     private ContractInfo contractInfo;
 
 }

+ 0 - 4
sckw-modules/sckw-order/src/main/java/com/sckw/order/model/vo/req/ValetOrderParam.java

@@ -1,7 +1,6 @@
 package com.sckw.order.model.vo.req;
 
 import jakarta.validation.Valid;
-import jakarta.validation.constraints.NotBlank;
 import jakarta.validation.constraints.NotNull;
 import lombok.Getter;
 import lombok.Setter;
@@ -17,9 +16,6 @@ import lombok.ToString;
 @ToString
 public class ValetOrderParam extends PurchaseOrderParam {
 
-    @NotBlank(message = "交付类型不能为空")
-    private String deliveryType;
-
     @NotNull(message = "合同信息不能为空")
     @Valid
     private ContractInfo contractInfo;

+ 3 - 3
sckw-modules/sckw-order/src/main/java/com/sckw/order/serivce/KwoTradeOrderService.java

@@ -828,11 +828,11 @@ public class KwoTradeOrderService {
         if (Objects.isNull(param.getEndTime())) {
             throw new BusinessException("结束时间不能为空!");
         }
+        if (StringUtils.isBlank(param.getDeliveryType())) {
+            throw new BusinessException("交付类型不能为空!");
+        }
         ContractInfo contractInfo = param.getContractInfo();
         if (Objects.equals(source, OrderSourceEnum.SALE.getType())) {
-            if (StringUtils.isBlank(param.getDeliveryType())) {
-                throw new BusinessException("交付类型不能为空!");
-            }
             if (Objects.isNull(contractInfo)) {
                 throw new BusinessException("代客下单合同信息不能为空");
             }