Commit 4bf00867 by huluobin

update

parent a2aefa4e
......@@ -246,7 +246,7 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
orderServe.setOwnProduceId(null);
}
orderServe.calcPrice();
orderServe.calcPriceAndTimeLength();
orderServeMapper.insert(orderServe);
}
......@@ -360,7 +360,7 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
orderServe.setOwnProduceId(null);
}
orderServe.calcPrice();
orderServe.calcPriceAndTimeLength();
orderServeMapper.updateById(orderServe);
}
});
......
......@@ -1377,7 +1377,7 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
//款式做法
scheduleServe.setExplain(baseServe.getExplain());
//计算价格
scheduleServe.calcPrice();
scheduleServe.calcPriceAndTimeLength();
return scheduleServe;
})
......
......@@ -262,12 +262,13 @@ public class OrderServe implements Serializable {
this.payPrice = this.payPrice.subtract(discountPrice);
}
public void calcPrice() {
public void calcPriceAndTimeLength() {
//自带款式
if (ownProduce != null) {
price = ownProduce.getPrice();
lengthTime = ownProduce.getDuration();
}
//预约款式
else if (produceId != null) {
if (discountRate == null) {
......
......@@ -198,10 +198,11 @@ public class ScheduleServe implements Serializable {
private OwnProduce ownProduce;
public void calcPrice() {
public void calcPriceAndTimeLength() {
//自带款式
if (ownProduce != null) {
price = ownProduce.getPrice();
lengthTime = ownProduce.getDuration();
}
//预约款式
......
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