Commit 5e44b7f2 authored by jiaorz's avatar jiaorz

Merge remote-tracking branch 'origin/master-modify-cutAmount' into base-modify

# Conflicts:
#	xx-im/xx-im-server/src/main/java/com/xxfc/platform/im/biz/MsgBiz.java
parents 24e47174 2e1b9aaf
...@@ -24,6 +24,8 @@ import java.util.List; ...@@ -24,6 +24,8 @@ import java.util.List;
@FeignClient(value = "xx-activity") @FeignClient(value = "xx-activity")
public interface ActivityFeign { public interface ActivityFeign {
public static final Integer TYPE_CHECK = 2;
public static final Integer TYPE_USE = 1; public static final Integer TYPE_USE = 1;
public static final Integer TYPE_NO_USE = 0; public static final Integer TYPE_NO_USE = 0;
......
...@@ -16,6 +16,7 @@ import com.xxfc.platform.activity.dto.UserCouponSendDTO; ...@@ -16,6 +16,7 @@ import com.xxfc.platform.activity.dto.UserCouponSendDTO;
import com.xxfc.platform.activity.entity.Coupon; import com.xxfc.platform.activity.entity.Coupon;
import com.xxfc.platform.activity.entity.IntegralUserTotal; import com.xxfc.platform.activity.entity.IntegralUserTotal;
import com.xxfc.platform.activity.entity.UserCoupon; import com.xxfc.platform.activity.entity.UserCoupon;
import com.xxfc.platform.activity.feign.ActivityFeign;
import com.xxfc.platform.activity.vo.CouponVo; import com.xxfc.platform.activity.vo.CouponVo;
import com.xxfc.platform.activity.vo.UserCouponPageVo; import com.xxfc.platform.activity.vo.UserCouponPageVo;
import com.xxfc.platform.activity.vo.UserCouponVo; import com.xxfc.platform.activity.vo.UserCouponVo;
...@@ -289,7 +290,7 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> { ...@@ -289,7 +290,7 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
return mapper.getUserCoupon(tickerNo); return mapper.getUserCoupon(tickerNo);
} }
//支付后更新优惠卷状态:type.1- //支付后更新优惠卷状态:type.1-触发使用优惠券;0-不触发优惠券使用(在优惠券未使用时);2--不触发优惠券使用(不管优惠券是否已使用)
public BigDecimal useTickerNo(Integer userId, List<String> tickerNos, String orderNo,Integer channel,BigDecimal amout,Integer type){ public BigDecimal useTickerNo(Integer userId, List<String> tickerNos, String orderNo,Integer channel,BigDecimal amout,Integer type){
BigDecimal couponAmout=new BigDecimal("0.00"); BigDecimal couponAmout=new BigDecimal("0.00");
if(couponAmout.compareTo(amout) >= 0) { if(couponAmout.compareTo(amout) >= 0) {
...@@ -307,7 +308,8 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> { ...@@ -307,7 +308,8 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
return couponAmout; return couponAmout;
} }
for (UserCoupon userCoupon:list) { for (UserCoupon userCoupon:list) {
if(userCoupon!=null&&userCoupon.getIsUse()==1){ //zjw_0907 当type 为 check(即2)不判断 优惠券是否已使用
if(userCoupon!=null && userCoupon.getIsUse()==1 && !ActivityFeign.TYPE_CHECK.equals(type)){
log.error(userId+"----该优惠卷已使用--tickerNo=="); log.error(userId+"----该优惠卷已使用--tickerNo==");
continue; continue;
} }
......
...@@ -123,7 +123,7 @@ public class MsgBiz { ...@@ -123,7 +123,7 @@ public class MsgBiz {
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
} }
public ObjectRestResponse getMsgListByUserId(Integer page, Integer limit) { public ObjectRestResponse getMsgListByUserId(Integer page, Integer limit, Integer type) {
//获取所有朋友圈 //获取所有朋友圈
page = page == null ? 1 : page; page = page == null ? 1 : page;
limit = limit == null ? 10 : limit; limit = limit == null ? 10 : limit;
...@@ -136,8 +136,9 @@ public class MsgBiz { ...@@ -136,8 +136,9 @@ public class MsgBiz {
} }
Pageable pageable = PageRequest.of(--page, limit); Pageable pageable = PageRequest.of(--page, limit);
List<Integer> ids = new ArrayList<>(); List<Integer> ids = new ArrayList<>();
ids.add(2); if(type != null) {
ids.add(4); ids.add(type);
}
Query query = new Query(Criteria.where("body.type").in(ids)); Query query = new Query(Criteria.where("body.type").in(ids));
query.addCriteria(Criteria.where("userId").is(userId)); query.addCriteria(Criteria.where("userId").is(userId));
int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size(); int totalSize = mongoTemplate.find(query, Msg.class, "s_msg").size();
...@@ -246,7 +247,7 @@ public class MsgBiz { ...@@ -246,7 +247,7 @@ public class MsgBiz {
return praiseVoArrayList; return praiseVoArrayList;
} }
public List<CommentVo> replaceCommentResult(List<Comment> list) { public List<CommentVo> replaceCommentResult(List<Comment> list) {
List<CommentVo> commentVoList = new ArrayList<>(); List<CommentVo> commentVoList = new ArrayList<>();
for(Comment comment : list) { for(Comment comment : list) {
CommentVo commentVo = new CommentVo(); CommentVo commentVo = new CommentVo();
......
...@@ -32,7 +32,7 @@ public class MsgController { ...@@ -32,7 +32,7 @@ public class MsgController {
} }
@GetMapping(value = "/getByUserId") @GetMapping(value = "/getByUserId")
public ObjectRestResponse getByUserId(Integer page, Integer limit) { public ObjectRestResponse getByUserId(Integer page, Integer limit, Integer type) {
return msgBiz.getMsgListByUserId(page, limit); return msgBiz.getMsgListByUserId(page, limit, type);
} }
} }
...@@ -3,9 +3,11 @@ package com.xxfc.platform.order.entity; ...@@ -3,9 +3,11 @@ package com.xxfc.platform.order.entity;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List;
import javax.persistence.*; import javax.persistence.*;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.assertj.core.util.Lists;
import tk.mybatis.mapper.annotation.Version; import tk.mybatis.mapper.annotation.Version;
...@@ -249,4 +251,32 @@ public class BaseOrder implements Serializable { ...@@ -249,4 +251,32 @@ public class BaseOrder implements Serializable {
@ApiModelProperty(value = "下单时的会员等级") @ApiModelProperty(value = "下单时的会员等级")
@Column(name = "member_level") @Column(name = "member_level")
private Integer memberLevel; private Integer memberLevel;
/**
* 违约金
*/
@ApiModelProperty(value = "违约金")
@Column(name = "violate_amount")
BigDecimal ViolateAmount;
/**
* 赔偿金
*/
@ApiModelProperty(value = "赔偿金")
@Column(name = "damages_amount")
BigDecimal damagesAmount;
/**
* 额外费用
*/
@ApiModelProperty(value = "额外费用")
@Column(name = "extra_amount")
BigDecimal extraAmount;
/**
* 返还的优惠券
*/
@ApiModelProperty(value = "返回的优惠券")
@Column(name = "back_coupon")
String backCoupon;
} }
...@@ -308,4 +308,11 @@ public class OrderRentVehicleDetail implements Serializable { ...@@ -308,4 +308,11 @@ public class OrderRentVehicleDetail implements Serializable {
@Column(name = "fixed_loss_status") @Column(name = "fixed_loss_status")
private Integer fixedLossStatus; private Integer fixedLossStatus;
/**
* 返还的免费天数
*/
@ApiModelProperty(value = "返回的免费天数")
@Column(name = "back_free_days")
Integer backFreeDays;
} }
...@@ -8,7 +8,7 @@ import java.util.List; ...@@ -8,7 +8,7 @@ import java.util.List;
@Data @Data
public class DedDetailDTO { public class DedDetailDTO {
/** /**
* : 扣除项 * : 扣除项名称
*/ */
String deductions; String deductions;
...@@ -34,4 +34,6 @@ public class DedDetailDTO { ...@@ -34,4 +34,6 @@ public class DedDetailDTO {
//type对应的中文 //type对应的中文
String statusName; String statusName;
} }
package com.xxfc.platform.order.pojo.calculate;
import lombok.Data;
import org.assertj.core.util.Lists;
import java.math.BigDecimal;
import java.util.List;
@Data
public class InProgressVO {
/**
* 违约金
*/
BigDecimal ViolateAmount = BigDecimal.ZERO;
/**
* 赔偿金
*/
BigDecimal damagesAmount = BigDecimal.ZERO;
/**
* 额外费用
*/
BigDecimal extraAmount = BigDecimal.ZERO;
/**
* 返还的优惠券
*/
List<String> backCoupons = Lists.newArrayList();
/**
* 返还的免费天数
*/
Integer backFreeDays = 0;
}
...@@ -145,7 +145,7 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> { ...@@ -145,7 +145,7 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
* @param timeLag 与开始时间的时间差 * @param timeLag 与开始时间的时间差
* @param dicParentKey * @param dicParentKey
*/ */
public void rentRefundProcess(BaseOrder baseOrder, Long timeLag, String dicParentKey) { public BigDecimal rentRefundProcess(BaseOrder baseOrder, Long timeLag, String dicParentKey) {
//计算退款金额 //计算退款金额
//商品价格 - 优惠券减免的价格 //商品价格 - 优惠券减免的价格
BigDecimal originalRefundAmount = BigDecimal.ZERO.add(baseOrder.getGoodsAmount().subtract(baseOrder.getCouponAmount())); BigDecimal originalRefundAmount = BigDecimal.ZERO.add(baseOrder.getGoodsAmount().subtract(baseOrder.getCouponAmount()));
...@@ -158,6 +158,7 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> { ...@@ -158,6 +158,7 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
//退款子流程: 订单基础,退款描述,退款金额 //退款子流程: 订单基础,退款描述,退款金额
refundSubProcess(baseOrder, refundDescBuilder.toString(), originalRefundAmount, refundAmount, RefundTypeEnum.ORDER_FUND.getCode(), RefundStatusEnum.ALL.getCode()); refundSubProcess(baseOrder, refundDescBuilder.toString(), originalRefundAmount, refundAmount, RefundTypeEnum.ORDER_FUND.getCode(), RefundStatusEnum.ALL.getCode());
return refundAmount;
} }
/** /**
...@@ -168,7 +169,7 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> { ...@@ -168,7 +169,7 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
* @param dicParentKey * @param dicParentKey
* @param originalDeductAmount * @param originalDeductAmount
*/ */
public void rentRefundDepositProcess(BaseOrder baseOrder, BigDecimal depositAmount, Long timeLag, String dicParentKey, BigDecimal originalDeductAmount) { public BigDecimal rentRefundDepositProcess(BaseOrder baseOrder, BigDecimal depositAmount, Long timeLag, String dicParentKey, BigDecimal originalDeductAmount) {
// 1、押金 + 租金(规则扣除) // 1、押金 + 租金(规则扣除)
BigDecimal originalRefundAmount = BigDecimal.ZERO.add(depositAmount); BigDecimal originalRefundAmount = BigDecimal.ZERO.add(depositAmount);
BigDecimal refundAmount = BigDecimal.ZERO.add(depositAmount); BigDecimal refundAmount = BigDecimal.ZERO.add(depositAmount);
...@@ -178,12 +179,13 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> { ...@@ -178,12 +179,13 @@ public class OrderRefundBiz extends BaseBiz<OrderRefundMapper,OrderRefund> {
BigDecimal residueAmount = calculateRefund(originalDeductAmount, timeLag, dicParentKey, refundDescBuilder); BigDecimal residueAmount = calculateRefund(originalDeductAmount, timeLag, dicParentKey, refundDescBuilder);
residueAmount = residueAmount.setScale(2, RoundingMode.HALF_UP); residueAmount = residueAmount.setScale(2, RoundingMode.HALF_UP);
//退款金额 :押金 - (原扣除款 - 剩余款) //退款金额 :押金 - (原扣除款 - 剩余款) 即: 押金 - (免费天数对应的钱 - 剩余款)
refundAmount = originalRefundAmount.subtract(originalDeductAmount.subtract(residueAmount)); refundAmount = originalRefundAmount.subtract(originalDeductAmount.subtract(residueAmount));
} }
//触发押金退款 //触发押金退款
refundSubProcess(baseOrder, refundDescBuilder.toString(), originalRefundAmount, refundAmount, RefundTypeEnum.DEPOSIT.getCode(), RefundStatusEnum.ALL.getCode()); refundSubProcess(baseOrder, refundDescBuilder.toString(), originalRefundAmount, refundAmount, RefundTypeEnum.DEPOSIT.getCode(), RefundStatusEnum.ALL.getCode());
return refundAmount;
} }
public BigDecimal calculateRefund(BigDecimal goodsAmount, Long timeLag, String dicParentKey, StringBuilder refundDescBuilder) { public BigDecimal calculateRefund(BigDecimal goodsAmount, Long timeLag, String dicParentKey, StringBuilder refundDescBuilder) {
......
package com.xxfc.platform.order.biz.inner;
import cn.hutool.core.date.DateUtil;
import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO;
import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.activity.entity.Coupon;
import com.xxfc.platform.activity.feign.ActivityFeign;
import com.xxfc.platform.app.entity.Cofig;
import com.xxfc.platform.app.feign.ConfigFeign;
import com.xxfc.platform.order.biz.OrderItemBiz;
import com.xxfc.platform.order.biz.OrderRefundBiz;
import com.xxfc.platform.order.contant.enumerate.ItemTypeEnum;
import com.xxfc.platform.order.contant.enumerate.OrderTypeEnum;
import com.xxfc.platform.order.contant.enumerate.RefundStatusEnum;
import com.xxfc.platform.order.contant.enumerate.RefundTypeEnum;
import com.xxfc.platform.order.entity.*;
import com.xxfc.platform.order.pojo.calculate.InProgressVO;
import com.xxfc.platform.universal.constant.DictionaryKey;
import com.xxfc.platform.universal.dto.SmsTemplateDTO;
import com.xxfc.platform.universal.entity.Dictionary;
import com.xxfc.platform.universal.feign.ThirdFeign;
import com.xxfc.platform.vehicle.entity.BranchCompany;
import com.xxfc.platform.vehicle.feign.VehicleFeign;
import com.xxfc.platform.vehicle.pojo.CompanyDetail;
import lombok.extern.slf4j.Slf4j;
import org.assertj.core.util.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.HOUR_MINUTE_FORMATTE_HUTOOL;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_FALSE;
import static com.xxfc.platform.universal.constant.DictionaryKey.APP_ORDER;
/**
* 订单退款记录表
*
* @author zjw
* @email nishijjo@qq.com
* @date 2019-06-18 11:08:09
*/
@Slf4j
@Service
public class OrderCalculateBiz {
@Autowired
UserFeign userFeign;
@Autowired
ThirdFeign thirdFeign;
@Autowired
VehicleFeign vehicleFeign;
@Autowired
ConfigFeign configFeign;
@Autowired
ActivityFeign activityFeign;
@Autowired
OrderRefundBiz orderRefundBiz;
@Autowired
OrderItemBiz orderItemBiz;
public InProgressVO inProgressCalculate(BaseOrder baseOrder, OrderItem orderItem, Integer freeDays, Integer useDays) {
//计算:剩余免费天数
Integer backFreeDays = freeDays - useDays;
//过了出发时间取消订单 ,优先使用免费天数
if(backFreeDays <= 0) {
//大于总天数 只返回押金
if(useDays >= orderItem.getTotalNum()) {
//退押金
//orderRefundBiz.rentRefundDepositProcess(hasUpdateOrder, orvd.getDeposit(), timeLag, APP_ORDER+ "_"+ RENT_REFUND, freeDayAmount);
}else {
//需要扣除订单费用
//判断是否达到优惠券条件 不符合则返还优惠券
Integer consumeDays = 0 - backFreeDays;
//计算使用天数的费用
BigDecimal consumeAmount = orderItem.getUnitPrice().multiply(new BigDecimal(consumeDays+""));
List<String> backCouponNos = Lists.newArrayList();
List<BigDecimal> couponAmounts = Lists.newArrayList();
for(String tickerNo : baseOrder.getCouponTickerNos().split(",")) {
BigDecimal couponAmount = activityFeign.use(baseOrder.getUserId(), Lists.newArrayList(tickerNo), baseOrder.getNo(), Coupon.CHANNEL_RENT, consumeAmount, ActivityFeign.TYPE_CHECK);
if(couponAmount.compareTo(BigDecimal.ZERO) > 0) {
//能够使用优惠券,则不返还
couponAmounts.add(couponAmount);
} else {
backCouponNos.add(tickerNo);
}
}
}
}else {
//返回剩余免费天数,返回优惠券,订单款
}
return new InProgressVO();
}
public InProgressVO inProgressCalculate(BaseOrder baseOrder, Integer useDays) {
OrderItem orderItem = orderItemBiz.selectOne(new OrderItem(){{
setType(ItemTypeEnum.VEHICLE_MODEL.getCode());
setOrderId(baseOrder.getId());
}});
Integer freeDays = (null == orderItem.getCutNum())?0 :orderItem.getCutNum();
return inProgressCalculate(baseOrder, orderItem, freeDays, useDays);
}
}
\ No newline at end of file
...@@ -4,15 +4,19 @@ import com.github.wxiaoqi.security.admin.feign.UserFeign; ...@@ -4,15 +4,19 @@ import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO; import com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO;
import com.github.wxiaoqi.security.common.exception.BaseException; import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.activity.entity.Coupon;
import com.xxfc.platform.activity.feign.ActivityFeign;
import com.xxfc.platform.order.biz.*; import com.xxfc.platform.order.biz.*;
import com.xxfc.platform.order.contant.enumerate.*; import com.xxfc.platform.order.contant.enumerate.*;
import com.xxfc.platform.order.entity.*; import com.xxfc.platform.order.entity.*;
import com.xxfc.platform.order.pojo.calculate.InProgressVO;
import com.xxfc.platform.order.pojo.mq.OrderMQDTO; import com.xxfc.platform.order.pojo.mq.OrderMQDTO;
import com.xxfc.platform.tour.feign.TourFeign; import com.xxfc.platform.tour.feign.TourFeign;
import com.xxfc.platform.universal.feign.ThirdFeign; import com.xxfc.platform.universal.feign.ThirdFeign;
import com.xxfc.platform.vehicle.common.RestResponse; import com.xxfc.platform.vehicle.common.RestResponse;
import com.xxfc.platform.vehicle.feign.VehicleFeign; import com.xxfc.platform.vehicle.feign.VehicleFeign;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.assertj.core.util.Lists;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -55,6 +59,9 @@ public class OrderCancelBiz { ...@@ -55,6 +59,9 @@ public class OrderCancelBiz {
@Autowired @Autowired
OrderMsgBiz orderMsgBiz; OrderMsgBiz orderMsgBiz;
@Autowired
OrderCalculateBiz orderCalculateBiz;
@Autowired @Autowired
UserFeign userFeign; UserFeign userFeign;
...@@ -67,6 +74,9 @@ public class OrderCancelBiz { ...@@ -67,6 +74,9 @@ public class OrderCancelBiz {
@Autowired @Autowired
ThirdFeign thirdFeign; ThirdFeign thirdFeign;
@Autowired
ActivityFeign activityFeign;
private static Map<Integer, List<Integer>> cancelAble; private static Map<Integer, List<Integer>> cancelAble;
static { static {
cancelAble = new HashMap<Integer, List<Integer>>(); cancelAble = new HashMap<Integer, List<Integer>>();
...@@ -110,35 +120,49 @@ public class OrderCancelBiz { ...@@ -110,35 +120,49 @@ public class OrderCancelBiz {
setOrderId(baseOrder.getId()); setOrderId(baseOrder.getId());
}}); }});
OrderItem orderItem = orderItemBiz.selectOne(new OrderItem(){{
setType(ItemTypeEnum.VEHICLE_MODEL.getCode());
setOrderId(baseOrder.getId());
}});
//原退还押金 //原退还押金
Integer freeDays = (null == orderItem.getCutNum())?0 :orderItem.getCutNum();
BigDecimal freeDayAmount = BigDecimal.ZERO; BigDecimal freeDayAmount = BigDecimal.ZERO;
//判断是否使用免费天数,并且进行扣款
if(null != orvd.getFreeDays() && orvd.getFreeDays() > 0) {
OrderItem orderItem = orderItemBiz.selectOne(new OrderItem(){{
setType(ItemTypeEnum.VEHICLE_MODEL.getCode());
setOrderId(baseOrder.getId());
}});
freeDayAmount = orderItem.getUnitPrice().multiply(new BigDecimal(orvd.getFreeDays()+ ""));
}
//如果超过出发时间,不能取消订单 //如果超过出发时间,不能取消订单
//根据时间处理goodsAmount //根据时间处理goodsAmount
//获取出发时间 到现在 距离时间 //获取出发时间 到现在 距离时间
Long timeLag = orvd.getStartTime() - System.currentTimeMillis(); Long timeLag = orvd.getStartTime() - System.currentTimeMillis();
//后面允许开始时间过后可以取消订单 if(timeLag < 0 ) {
// if(timeLag < 0) { //计算:使用天数 当前时间 - 开始时间的0时0分0秒
// throw new BaseException(ResultCode.FAILED_CODE, new HashSet<String>(){{ Long useTimeLag = System.currentTimeMillis() - orvd.getStartTime();
// add("已超过出发时间,不能取消订单"); Integer useDays = new BigDecimal(useTimeLag + "").divide(new BigDecimal((24 * 60 * 60 * 1000)+ "")).setScale(0, BigDecimal.ROUND_UP).intValue();
// }}); orderCalculateBiz.inProgressCalculate(baseOrder, orderItem, freeDays, useDays);
// }
}else {
//没到出车时间
//判断是否使用免费天数,并且进行扣款
if(freeDays > 0) {
freeDayAmount = orderItem.getUnitPrice().multiply(new BigDecimal(orvd.getFreeDays()+ ""));
//违约金封顶 租车身份价 * 2天
BigDecimal topAmount = orderItem.getUnitPrice().multiply(new BigDecimal("2"));
if(freeDayAmount.compareTo(topAmount) > 0) {
freeDayAmount = freeDayAmount;
}
}
}
//退款流程 //退款流程
//退押金
orderRefundBiz.rentRefundDepositProcess(hasUpdateOrder, orvd.getDeposit(), timeLag, APP_ORDER+ "_"+ RENT_REFUND, freeDayAmount);
//退订单款 //退订单款
orderRefundBiz.rentRefundProcess(hasUpdateOrder, timeLag, APP_ORDER+ "_"+ RENT_REFUND); orderRefundBiz.rentRefundProcess(hasUpdateOrder, timeLag, APP_ORDER+ "_"+ RENT_REFUND);
//退押金
orderRefundBiz.rentRefundDepositProcess(hasUpdateOrder, orvd.getDeposit(), timeLag, APP_ORDER+ "_"+ RENT_REFUND, freeDayAmount);
//已付款的取消订单发送消息 //已付款的取消订单发送消息
try { try {
AppUserDTO appUserDTO = userFeign.userDetailById(baseOrder.getUserId()).getData(); AppUserDTO appUserDTO = userFeign.userDetailById(baseOrder.getUserId()).getData();
......
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