Authored by wujiexiang

Merge branch 'dev_6.8.4_order' into test6.8.4

... ... @@ -7,11 +7,10 @@ import com.yohobuy.ufo.model.promotion.UserCouponsBo;
import com.yohoufo.order.charge.model.*;
import com.yohoufo.order.service.support.DeliveryWayCostSupport;
import com.yohoufo.order.service.proxy.CouponProxyService;
import com.yohoufo.order.utils.LoggerUtils;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.util.List;
... ... @@ -23,7 +22,7 @@ import java.util.stream.Collectors;
@Component
public class ChargeService {
private final Logger logger = LoggerFactory.getLogger(getClass());
private final Logger logger = LoggerUtils.getBuyerOrderLogger();
@Autowired
private CouponProxyService couponProxyService;
... ...
... ... @@ -6,8 +6,8 @@ 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.LoggerUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
... ... @@ -21,7 +21,7 @@ import java.util.List;
@Component
public class CouponRuleMatcher {
private final Logger logger = LoggerFactory.getLogger(getClass());
private final Logger logger = LoggerUtils.getBuyerOrderLogger();
private static List<IRuleMatcher> RULE_MATCHERS = new LinkedList<>();
... ...
... ... @@ -94,8 +94,9 @@ public class ShoppingController {
}
ShoppingRequest request = ShoppingRequest.builder().uid(uid).skup(skup).couponCodes(CouponCodeUtils.asList(couponCode)).channelNo(channelNo).clientType(clientType).addressId(addressId).build();
logger.info("in ufo.order.submit, req {}", request);
OrderSubmitResponse paymentResponse = buyerOrderService.submit(request);
return new ApiResponse.ApiResponseBuilder().code(200).data(paymentResponse).message("提交订单SUCCESS").build();
OrderSubmitResponse submitResponse = buyerOrderService.submit(request);
logger.info("out ufo.order.submit,resp:{}", submitResponse);
return new ApiResponse.ApiResponseBuilder().code(200).data(submitResponse).message("提交订单SUCCESS").build();
}
/**
... ...
... ... @@ -254,6 +254,8 @@ public class ShoppingServiceImpl implements IShoppingService {
// 生成订单号
long orderCode = orderCodeGenerator.generate(OrderCodeType.BUYER_TYPE);
logger.info("generate new orderCode:{}",orderCode);
AddressInfo hiddenAddress = userProxyService.getHiddenAddressInfo(shoppingRequest.getUid(), addressId);
// 减库存,skup更新成不可售,入库
... ...
... ... @@ -14,9 +14,9 @@ import com.yohoufo.common.ApiResponse;
import com.yohoufo.common.caller.UfoServiceCaller;
import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.order.model.bo.CouponBo;
import com.yohoufo.order.utils.LoggerUtils;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
... ... @@ -29,7 +29,7 @@ import java.util.stream.Collectors;
@Service
public class CouponProxyService implements Compensator {
private final static Logger logger = LoggerFactory.getLogger(CouponProxyService.class);
private final static Logger logger = LoggerUtils.getBuyerOrderLogger();
@Autowired
private UfoServiceCaller serviceCaller;
... ...