fix:交易投诉,交易售后,兼容设置中描述的内容:设置为0则表示不限制
This commit is contained in:
parent
a502420c5f
commit
c0a370ad47
@ -183,6 +183,10 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
|
|||||||
* @param orderSetting 订单设置
|
* @param orderSetting 订单设置
|
||||||
*/
|
*/
|
||||||
private void closeAfterSale(OrderSetting orderSetting) {
|
private void closeAfterSale(OrderSetting orderSetting) {
|
||||||
|
//为0则不限制
|
||||||
|
if (orderSetting.getCloseAfterSale() == null || orderSetting.getCloseAfterSale() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
//订单关闭售后申请时间 = 当前时间 - 自动关闭售后申请天数
|
//订单关闭售后申请时间 = 当前时间 - 自动关闭售后申请天数
|
||||||
DateTime receiveTime = DateUtil.offsetDay(DateUtil.date(), -orderSetting.getCloseAfterSale());
|
DateTime receiveTime = DateUtil.offsetDay(DateUtil.date(), -orderSetting.getCloseAfterSale());
|
||||||
|
|
||||||
@ -223,6 +227,10 @@ public class OrderEveryDayTaskExecute implements EveryDayExecute {
|
|||||||
*/
|
*/
|
||||||
private void closeComplaint(OrderSetting orderSetting) {
|
private void closeComplaint(OrderSetting orderSetting) {
|
||||||
|
|
||||||
|
//为0则不限制
|
||||||
|
if (orderSetting.getCloseComplaint() == null || orderSetting.getCloseComplaint() == 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
//订单关闭交易投诉申请时间 = 当前时间 - 自动关闭交易投诉申请天数
|
//订单关闭交易投诉申请时间 = 当前时间 - 自动关闭交易投诉申请天数
|
||||||
DateTime receiveTime = DateUtil.offsetDay(DateUtil.date(), -orderSetting.getCloseComplaint());
|
DateTime receiveTime = DateUtil.offsetDay(DateUtil.date(), -orderSetting.getCloseComplaint());
|
||||||
|
|
||||||
|
@ -29,7 +29,8 @@ public class PromotionPriceUtil {
|
|||||||
* @param discountPrice 需要分发的优惠金额
|
* @param discountPrice 需要分发的优惠金额
|
||||||
* @param promotionTypeEnum 促销类型
|
* @param promotionTypeEnum 促销类型
|
||||||
*/
|
*/
|
||||||
public static void recountPrice(TradeDTO tradeDTO, Map<String, Double> skuPromotionDetail, Double discountPrice, PromotionTypeEnum promotionTypeEnum, String activityId) {
|
public static void recountPrice(TradeDTO tradeDTO, Map<String, Double> skuPromotionDetail, Double discountPrice,
|
||||||
|
PromotionTypeEnum promotionTypeEnum, String activityId) {
|
||||||
|
|
||||||
// sku 促销信息非空判定
|
// sku 促销信息非空判定
|
||||||
if (skuPromotionDetail == null || skuPromotionDetail.size() == 0) {
|
if (skuPromotionDetail == null || skuPromotionDetail.size() == 0) {
|
||||||
@ -116,7 +117,8 @@ public class PromotionPriceUtil {
|
|||||||
* @param promotionTypeEnum 优惠类型
|
* @param promotionTypeEnum 优惠类型
|
||||||
* @param activityId 优惠活动id
|
* @param activityId 优惠活动id
|
||||||
*/
|
*/
|
||||||
private static void calculateCartSkuPromotionsPrice(CartSkuVO cartSkuVO, Double skuDiscountPrice, PromotionTypeEnum promotionTypeEnum, String activityId) {
|
private static void calculateCartSkuPromotionsPrice(CartSkuVO cartSkuVO, Double skuDiscountPrice, PromotionTypeEnum promotionTypeEnum,
|
||||||
|
String activityId) {
|
||||||
//优惠券金额,则计入优惠券 ,其他则计入总的discount price
|
//优惠券金额,则计入优惠券 ,其他则计入总的discount price
|
||||||
if (promotionTypeEnum == PromotionTypeEnum.COUPON) {
|
if (promotionTypeEnum == PromotionTypeEnum.COUPON) {
|
||||||
|
|
||||||
@ -179,14 +181,16 @@ public class PromotionPriceUtil {
|
|||||||
* @param promotionTypeEnum 优惠类型
|
* @param promotionTypeEnum 优惠类型
|
||||||
* @param activityId 优惠活动id
|
* @param activityId 优惠活动id
|
||||||
*/
|
*/
|
||||||
private static void calculateNotEnoughPromotionsPrice(List<CartSkuVO> skuVOList, Map<String, Double> skuPromotionDetail, Double discountPrice, Double totalPrice, PromotionTypeEnum promotionTypeEnum, String activityId) {
|
private static void calculateNotEnoughPromotionsPrice(List<CartSkuVO> skuVOList, Map<String, Double> skuPromotionDetail, Double discountPrice,
|
||||||
|
Double totalPrice, PromotionTypeEnum promotionTypeEnum, String activityId) {
|
||||||
// 特殊情况处理,如参与多个促销活动,部分商品在其他促销计算后的金额不足以满足与当前参与的促销活动的优惠金额
|
// 特殊情况处理,如参与多个促销活动,部分商品在其他促销计算后的金额不足以满足与当前参与的促销活动的优惠金额
|
||||||
// 但当前购物车内存在当前当前促销活动的其他商品且剩余金额也满足分摊不足商品的不足金额,则分摊到其他商品上
|
// 但当前购物车内存在当前当前促销活动的其他商品且剩余金额也满足分摊不足商品的不足金额,则分摊到其他商品上
|
||||||
// 满足当前促销的总优惠金额
|
// 满足当前促销的总优惠金额
|
||||||
if (skuPromotionDetail == null || skuPromotionDetail.isEmpty()) {
|
if (skuPromotionDetail == null || skuPromotionDetail.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
long matchPromotionsZeroCount = skuVOList.stream().filter(l -> l.getPriceDetailDTO().getFlowPrice() == 0 && skuPromotionDetail.containsKey(l.getGoodsSku().getId())).count();
|
long matchPromotionsZeroCount =
|
||||||
|
skuVOList.stream().filter(l -> l.getPriceDetailDTO().getFlowPrice() == 0 && skuPromotionDetail.containsKey(l.getGoodsSku().getId())).count();
|
||||||
long matchPromotionsCount = skuVOList.stream().filter(l -> skuPromotionDetail.containsKey(l.getGoodsSku().getId())).count();
|
long matchPromotionsCount = skuVOList.stream().filter(l -> skuPromotionDetail.containsKey(l.getGoodsSku().getId())).count();
|
||||||
if (matchPromotionsZeroCount == matchPromotionsCount) {
|
if (matchPromotionsZeroCount == matchPromotionsCount) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user