Commit 3ad9aa82 by huluobin

long 序列化

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