Authored by chenchao

fix null error

... ... @@ -67,7 +67,6 @@
from buyer_order
where order_code = #{orderCode,jdbcType=BIGINT}
and uid = #{uid,jdbcType=INTEGER}
and buyer_order_status = 1
limit 1
</select>
... ...
... ... @@ -50,6 +50,10 @@ public class NotPaidNoticeDelayMsgConsumer implements YhConsumer {
case BUY:
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCodeUid(event.getOrderCode(), event.getUid());
if (Objects.isNull(buyerOrder)){
logger.info("in {}, msg {}, buyerOrder is delete", topic, event);
return;
}
if(OrderStatus.WAITING_PAY.getCode() == buyerOrder.getStatus()){
logger.info("in {}, msg {}, status {}", topic, event, buyerOrder.getStatus());
inBoxFacade.buyerOrderNotPayed(event.getUid(), event.getOrderCode());
... ...
... ... @@ -2,6 +2,8 @@ package com.yohoufo.order.service.impl;
import com.yoho.error.ServiceError;
import com.yoho.error.exception.ServiceException;
import com.yohobuy.ufo.model.order.common.OrderStatus;
import com.yohobuy.ufo.model.order.common.SkupStatus;
import com.yohobuy.ufo.model.order.common.TabType;
import com.yohobuy.ufo.model.order.resp.OrderListInfo;
import com.yohobuy.ufo.model.order.resp.PageResp;
... ... @@ -16,9 +18,6 @@ import com.yohoufo.dal.order.model.BuyerOrderGoods;
import com.yohoufo.dal.order.model.SellerOrderGoods;
import com.yohoufo.order.common.ActionStatusHold;
import com.yohoufo.order.common.DelStatus;
import com.yohobuy.ufo.model.order.common.OrderStatus;
import com.yohobuy.ufo.model.order.common.SkupStatus;
import com.yohoufo.order.model.AddressInfo;
import com.yohoufo.order.model.request.OrderListRequest;
import com.yohoufo.order.model.request.OrderRequest;
import com.yohoufo.order.model.response.OrderDetailInfo;
... ... @@ -29,7 +28,6 @@ import com.yohoufo.order.service.cache.CacheKeyBuilder;
import com.yohoufo.order.service.cache.OrderCacheService;
import com.yohoufo.order.service.proxy.InBoxFacade;
import com.yohoufo.order.service.proxy.ProductProxyService;
import com.yohoufo.order.utils.SmsHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -69,8 +67,6 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
@Autowired
private InBoxFacade inBoxFacade;
@Autowired
private SellerAddressService sellerAddressService;
@Autowired
private OrderCacheService orderCacheService;
... ... @@ -285,7 +281,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
throw new ServiceException(ServiceError.ORDER_REQUEST_PARM_IS_EMPTY);
}
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCodeUid(orderCode, uid);
if (Objects.isNull(buyerOrder)){
if (Objects.isNull(buyerOrder) || buyerOrder.getBuyerOrderStatus() == DelStatus.IS_DEL.getCode()){
logger.warn("buyer delete, order not exist, uid {}, orderCode {}", uid, orderCode);
return false;
}
... ...