diff --git a/nxhs-service/src/main/java/cc/yunxi/domain/vo/recycleorder/tmorder/TMRecycleOrderCreateVO.java b/nxhs-service/src/main/java/cc/yunxi/domain/vo/recycleorder/tmorder/TMRecycleOrderCreateVO.java index 7a54511..c72c919 100644 --- a/nxhs-service/src/main/java/cc/yunxi/domain/vo/recycleorder/tmorder/TMRecycleOrderCreateVO.java +++ b/nxhs-service/src/main/java/cc/yunxi/domain/vo/recycleorder/tmorder/TMRecycleOrderCreateVO.java @@ -1,18 +1,10 @@ package cc.yunxi.domain.vo.recycleorder.tmorder; -import cc.yunxi.domain.dto.LocationDTO; -import cc.yunxi.domain.vo.recycleorderdetail.RecycleOrderDetailCreateVO; -import cc.yunxi.enums.ProductWeightEnum; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; -import javax.validation.Valid; -import javax.validation.constraints.Future; import javax.validation.constraints.NotBlank; -import javax.validation.constraints.NotNull; -import java.time.LocalDateTime; -import java.util.List; @ApiModel(description = "定点回收订单- 指定小区下单 Request VO") @Data diff --git a/nxhs-service/src/main/java/cc/yunxi/domain/vo/recycleorderdetail/RecycleOrderDetailUpdateVO.java b/nxhs-service/src/main/java/cc/yunxi/domain/vo/recycleorderdetail/RecycleOrderDetailUpdateVO.java index 75eb2cc..c83011f 100644 --- a/nxhs-service/src/main/java/cc/yunxi/domain/vo/recycleorderdetail/RecycleOrderDetailUpdateVO.java +++ b/nxhs-service/src/main/java/cc/yunxi/domain/vo/recycleorderdetail/RecycleOrderDetailUpdateVO.java @@ -16,7 +16,7 @@ import java.time.LocalDateTime; public class RecycleOrderDetailUpdateVO { @ApiModelProperty(value = "主键id", required = true) - @NotBlank(message = "id不能为空") +// @NotBlank(message = "id不能为空") private String id; @ApiModelProperty(value = "废品id", required = true, example = "534658869696135686") diff --git a/nxhs-service/src/main/java/cc/yunxi/service/IRecycleOrderProductService.java b/nxhs-service/src/main/java/cc/yunxi/service/IRecycleOrderProductService.java index 83f4376..d8b95bb 100644 --- a/nxhs-service/src/main/java/cc/yunxi/service/IRecycleOrderProductService.java +++ b/nxhs-service/src/main/java/cc/yunxi/service/IRecycleOrderProductService.java @@ -56,4 +56,12 @@ public interface IRecycleOrderProductService extends IService recycleOrderProducts); + + /** + * 订单废品批量保存 + * @param + * @return List + */ + void saveOrderProducts(Collection recycleOrderProducts); + } diff --git a/nxhs-service/src/main/java/cc/yunxi/service/impl/RecycleOrderProductServiceImpl.java b/nxhs-service/src/main/java/cc/yunxi/service/impl/RecycleOrderProductServiceImpl.java index 43872dc..79d0fda 100644 --- a/nxhs-service/src/main/java/cc/yunxi/service/impl/RecycleOrderProductServiceImpl.java +++ b/nxhs-service/src/main/java/cc/yunxi/service/impl/RecycleOrderProductServiceImpl.java @@ -61,4 +61,10 @@ public class RecycleOrderProductServiceImpl extends ServiceImpl recycleOrderProducts) { this.updateBatchById(recycleOrderProducts); } + + + @Override + public void saveOrderProducts(Collection recycleOrderProducts) { + this.saveOrUpdateBatch(recycleOrderProducts); + } } diff --git a/nxhs-service/src/main/java/cc/yunxi/service/impl/RecycleOrderServiceImpl.java b/nxhs-service/src/main/java/cc/yunxi/service/impl/RecycleOrderServiceImpl.java index e52ebd5..9783dad 100644 --- a/nxhs-service/src/main/java/cc/yunxi/service/impl/RecycleOrderServiceImpl.java +++ b/nxhs-service/src/main/java/cc/yunxi/service/impl/RecycleOrderServiceImpl.java @@ -404,7 +404,7 @@ public class RecycleOrderServiceImpl extends ServiceImpl recycleOrderProducts = BeanUtils.copyList(recycleOrderProductVOList, RecycleOrderProduct.class); - this.recycleOrderProductService.updateOrderProducts(recycleOrderProducts); + this.recycleOrderProductService.saveOrderProducts(recycleOrderProducts); // 记录关键信息 String clientId = recycleOrder.getClientId();