Commit 3ad9aa82 by huluobin

long 序列化

parent cf80dded
......@@ -39,6 +39,7 @@ import com.gogirl.infrastructure.mapper.product.purchase.PurchaseSkuMapper;
import com.gogirl.infrastructure.mapper.product.serve.BaseProduceMapper;
import com.gogirl.infrastructure.mapper.product.serve.BaseServeMapper;
import com.gogirl.infrastructure.mapper.product.serve.BaseTypeMapper;
import com.gogirl.infrastructure.mapper.product.serve.ProducePromotionTimeMapper;
import com.gogirl.infrastructure.mapper.store.store.StoreTechnicianMapper;
import com.gogirl.infrastructure.mapper.user.customer.CustomerBalanceMapper;
import com.gogirl.infrastructure.mapper.user.customer.CustomerMessageMapper;
......@@ -113,7 +114,8 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
private GogirlTokenService gogirlTokenService;
@Resource
private MarketService marketService;
@Resource
private ProducePromotionTimeMapper producePromotionTimeMapper;
@Override
public BigDecimal countSumPay(Integer customerId, Integer departmentId) {
......@@ -178,6 +180,16 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
.payPrice(baseProduce.getCurrentPrice())
.achievement(baseProduce.getCurrentPrice())
.serveDuration(baseProduce.getServiceDuration());
ProducePromotionTime producePromotionTime = producePromotionTimeMapper.selectOne(new LambdaQueryWrapper<ProducePromotionTime>().eq(ProducePromotionTime::getProduceId, orderServeParam.getProduceId()));
//如果款式有活动价格
if (producePromotionTime != null && producePromotionTime.isPromotion()) {
builder.producePromotionTimeId(producePromotionTime.getId());
//活动价格
builder.promotionPrice(producePromotionTime.getPrice());
//价格活动价格
builder.price(producePromotionTime.getPrice());
}
}
//
else {
......@@ -264,6 +276,16 @@ public class OrderManageServiceImpl extends ServiceImpl<OrderManageMapper, Order
orderServe.setAchievement(baseProduce.getCurrentPrice());
//服务时长=款式时长
orderServe.setServeDuration(baseProduce.getServiceDuration());
ProducePromotionTime producePromotionTime = producePromotionTimeMapper.selectOne(new LambdaQueryWrapper<ProducePromotionTime>().eq(ProducePromotionTime::getProduceId, orderServeParam.getProduceId()));
//如果款式有活动价格
if (producePromotionTime != null && producePromotionTime.isPromotion()) {
orderServe.setProducePromotionTimeId(producePromotionTime.getId());
//活动价格
orderServe.setPromotionPrice(producePromotionTime.getPrice());
//价格活动价格
orderServe.setPrice(producePromotionTime.getPrice());
}
}
//
else {
......
......@@ -1314,15 +1314,16 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
for (ScheduleServe scheduleServeVar : scheduleServeSet) {
BigDecimal orderServePrice;
//如果是预约服务使用服务特价
if (scheduleServeVar.getProduceId() != null && scheduleServeVar.getProduceBargainPrice() != null) {
orderServePrice = scheduleServeVar.getProduceCurrentPrice();
}
//预约款式使用款式价格
else {
orderServePrice = scheduleServeVar.getServePrice();
}
BigDecimal orderServePrice = scheduleServeVar.getPrice();
// //如果是预约服务使用服务特价
// if (scheduleServeVar.getProduceId() != null && scheduleServeVar.getProduceBargainPrice() != null) {
// orderServePrice = scheduleServeVar.getProduceCurrentPrice();
// }
// //预约款式使用款式价格
// else {
// orderServePrice = scheduleServeVar.getServePrice();
// }
//
BaseServe baseServe = baseServeMapper.selectById(scheduleServeVar.getServeId());
OrderServe orderServe = OrderServe.builder()
//服务参数
......@@ -1362,12 +1363,15 @@ public class ScheduleManageServiceImpl extends ServiceImpl<ScheduleManageMapper,
.endTime(scheduleServeVar.getActualEndTime())
//价格
.price(orderServePrice)
.producePromotionTimeId(scheduleServeVar.getProducePromotionTimeId())
.promotionPrice(scheduleServeVar.getPromotionPrice())
//业绩
.achievement(orderServePrice)
//支付金额
.payPrice(orderServePrice)
//预约时间
.scheduledTime(scheduleManage.getScheduledTime())
.build();
if (StringUtils.isNotEmpty(scheduleServeVar.getTechnicianIds())) {
......
......@@ -109,9 +109,11 @@ public class ScheduleServeDTO implements Serializable {
private Integer status;
@ApiModelProperty("实际开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date actualStartTime;
@ApiModelProperty("实际结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date actualEndTime;
private Integer leisureDiscountConfigId;
......
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