Authored by mali

Merge branch 'test6.9.8' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.8

... ... @@ -4,6 +4,7 @@ import lombok.*;
import java.math.BigDecimal;
@ToString
@Builder
@NoArgsConstructor
... ... @@ -18,7 +19,7 @@ public class DepositOrder {
private String depositCode;
private BigDecimal amount; // 总费用
private BigDecimal amount;
private Integer payment;
... ... @@ -32,9 +33,9 @@ public class DepositOrder {
private Integer updateTime;
private BigDecimal contractFee; //违约费用
private BigDecimal contractFee;
private BigDecimal shipFee; //运费
private BigDecimal shipFee;
private Integer initStatus; // 修改状态之前应该的状态
private Integer initStatus;
}
\ No newline at end of file
... ...
... ... @@ -2,13 +2,11 @@ package com.yohoufo.order.charge;
import com.google.common.collect.Lists;
import com.yohobuy.ufo.model.order.constants.RegionEnum;
import com.yohobuy.ufo.model.order.constants.SkupType;
import com.yohobuy.ufo.model.promotion.UserCouponsBo;
import com.yohobuy.ufo.model.promotion.constant.CouponProductLimitTypeEnum;
import com.yohobuy.ufo.model.promotion.constant.CouponUseLimitTypeEnum;
import com.yohoufo.order.charge.model.ChargeGoods;
import com.yohoufo.order.charge.model.CouponMatchResult;
import com.yohoufo.order.utils.BuyerOrderUtils;
import com.yohoufo.order.utils.LoggerUtils;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
... ... @@ -157,23 +155,14 @@ public class CouponRuleMatcher {
@Override
public boolean match(ChargeGoods chargeGoods, UserCouponsBo couponsBo) {
// 闪购寄存不可以用券 TODO 后台可控制
if (chargeGoods.getSkupType() == SkupType.QUICK_DELIVER && chargeGoods.isDepositRequirement()) {
return false;
}
if (couponsBo.getSkupForbidType() == null){
return true;
}
if (Arrays.asList(couponsBo.getSkupForbidType().split(",")).contains(String.valueOf(chargeGoods.getAttributes()))){
return false;
}
return true;
}
}
... ...
... ... @@ -4,8 +4,6 @@ import com.google.common.collect.Lists;
import com.yoho.error.ServiceError;
import com.yoho.error.exception.ServiceException;
import com.yohobuy.ufo.model.order.bo.GoodsInfo;
import com.yohobuy.ufo.model.order.common.EntrySellerDepositType;
import com.yohobuy.ufo.model.order.common.EntrySellerType;
import com.yohobuy.ufo.model.order.common.OrderCodeType;
import com.yohobuy.ufo.model.order.constants.DepositEventTypeEnum;
import com.yohobuy.ufo.model.order.constants.OrderConstant;
... ... @@ -13,28 +11,23 @@ import com.yohobuy.ufo.model.order.req.DepositOrderComputeReq;
import com.yohobuy.ufo.model.order.resp.DepositOrderComputeResp;
import com.yohobuy.ufo.model.order.vo.AddressInfo;
import com.yohoufo.common.exception.UfoServiceException;
import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.common.utils.StringUtil;
import com.yohoufo.dal.order.BuyerOrderGoodsMapper;
import com.yohoufo.dal.order.DepositOrderMapper;
import com.yohoufo.dal.order.SellerOrderGoodsMapper;
import com.yohoufo.dal.order.SellerOrderMapper;
import com.yohoufo.dal.order.model.*;
import com.yohoufo.dal.order.StorageDepositMapper;
import com.yohoufo.dal.order.model.BuyerOrderGoods;
import com.yohoufo.dal.order.model.DepositOrder;
import com.yohoufo.dal.order.model.SellerOrderGoods;
import com.yohoufo.dal.order.model.StorageDeposit;
import com.yohoufo.dal.order.StorageDepositMapper;
import com.yohoufo.order.convert.GoodsInfoConvertor;
import com.yohoufo.order.model.response.OrderSubmitResponse;
import com.yohoufo.order.service.DepositService;
import com.yohoufo.order.service.IBuyerOrderMetaService;
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.helpers.MessageFormatter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
... ... @@ -113,7 +106,9 @@ public class DepositOrderService {
DepositOrderComputeResp.PriceInfo priceInfo = getFeeInfo(orderCode);
DepositOrder depositOrder = DepositOrder.builder().uid(uid).amount(priceInfo.getAmount())
.contractFee(priceInfo.getContractFee()).shipFee(priceInfo.getShipFee()).createTime(now).depositCode(req.getDepositCode())
.contractFee(priceInfo.getContractFee())
.shipFee(priceInfo.getShipFee())
.createTime(now).depositCode(req.getDepositCode())
.eventType(DepositEventTypeEnum.DEPOSIT_RECALL_FEE.getCode()).orderCode(orderCode).payment(0).status(0).updateTime(now).build();
LOG.info("enter publishDepositOrder begin save depositOrder {} ",depositOrder);
... ...
... ... @@ -21,7 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class DeposiOrderPaymentService extends AbstractOrderPaymentService {
public class DepositOrderPaymentService extends AbstractOrderPaymentService {
private final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
... ...
... ... @@ -103,7 +103,7 @@ public class PaymentServiceImpl implements IPaymentService {
MerchantOrderPaymentService merchantOrderPaymentService;
@Autowired
private DeposiOrderPaymentService deposiOrderPaymentService;
private DepositOrderPaymentService deposiOrderPaymentService;
@Autowired
OrderCodeGenerator orderCodeGenerator;
... ...