Browse Source

no message

FengChaoYu 5 months ago
parent
commit
81a3f485a8

+ 1 - 1
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/bean/material/stock/WorkerStockDTO.java

@@ -31,7 +31,7 @@ public class WorkerStockDTO {
     private String identity;
 
     @ApiModelProperty("师傅编号")
-    @NotBlank(message = "师傅编号不能空")
+//    @NotBlank(message = "师傅编号不能空")
     private String workerId;
 
     @ApiModelProperty("师傅名称")

+ 3 - 0
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/material/stock/MaterialGoodsStockLogic.java

@@ -305,6 +305,9 @@ public class MaterialGoodsStockLogic {
                 if (workerStockDTO.getChangeQty().compareTo(BigDecimal.ZERO) <= 0) {
                     throw new RuntimeException("变动数量不能少于0");
                 }
+                if (workerStockDTO.getGoodsType().equals(WebsitGoodsTypeEnum.P.toString()) && StringUtils.isBlank(workerStockDTO.getWorkerId())) {
+                    throw new RuntimeException("师傅编号不能空");
+                }
             } catch (ValidationException ve) {
                 throw new RemoteServiceException("第" + (i + 1) + "行" + ve.getMessage());
             }