Commit 047595c0 by huluobin

自带款式

parent 3698c7af
......@@ -239,6 +239,7 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
if (orderServe.getOwnProduceId() == null) {
throw new RRException("请补全自带款式");
}
orderServe.setOwnProduce(ownProduceMapper.selectById(orderServe.getOwnProduceId()));
} else {
orderServe.setIsOwnProduce(2);
orderServe.setOwnProduceId(null);
......@@ -348,10 +349,11 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
//更新订单详情时校验自带款式是否设置
if (orderServe.getServeName().trim().equals(ScheduleServe.OWN_PRODUCE_KEY)) {
orderServe.setIsOwnProduce(1);
if (orderServe.getOwnProduceId() == null) {
throw new RRException("请补全自带款式");
}
orderServe.setIsOwnProduce(1);
orderServe.setOwnProduce(ownProduceMapper.selectById(orderServe.getOwnProduceId()));
} else {
orderServe.setIsOwnProduce(2);
orderServe.setOwnProduceId(null);
......
......@@ -26,6 +26,7 @@ import java.util.List;
@Setter
public class OrderServe implements Serializable {
@Builder.Default
public final static Integer COMMENT_STATUS_NO = 1;
@Builder.Default
......@@ -37,6 +38,14 @@ public class OrderServe implements Serializable {
@TableId(type = IdType.AUTO)
private Integer id;
public Integer getOwnProduceId() {
return ownProduceId;
}
public void setOwnProduceId(Integer ownProduceId) {
this.ownProduceId = ownProduceId;
}
@ApiModelProperty("订单id")
private Integer orderId;
......@@ -247,6 +256,7 @@ public class OrderServe implements Serializable {
@TableField(exist = false)
private OwnProduce ownProduce;
public void addDiscountPrice(BigDecimal discountPrice) {
this.discountPrice = this.discountPrice.add(discountPrice);
this.payPrice = this.payPrice.subtract(discountPrice);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment