...
|
...
|
@@ -10,13 +10,11 @@ import com.yohoufo.dal.order.BuyerOrderMetaMapper; |
|
|
import com.yohoufo.dal.order.SellerOrderGoodsMapper;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrder;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrderGoods;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrderMeta;
|
|
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
|
|
import com.yohoufo.order.common.ActionStatusHold;
|
|
|
import com.yohoufo.order.common.DelStatus;
|
|
|
import com.yohoufo.order.common.OrderStatus;
|
|
|
import com.yohoufo.order.common.SkupStatus;
|
|
|
import com.yohoufo.order.constants.MetaKey;
|
|
|
import com.yohoufo.order.model.AddressInfo;
|
|
|
import com.yohoufo.order.model.request.OrderListRequest;
|
|
|
import com.yohoufo.order.model.request.OrderRequest;
|
...
|
...
|
@@ -26,7 +24,6 @@ import com.yohoufo.order.service.IBuyerOrderService; |
|
|
import com.yohoufo.order.service.proxy.InBoxFacade;
|
|
|
import com.yohoufo.order.service.proxy.ProductProxyService;
|
|
|
import com.yohoufo.order.utils.SmsHelper;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
...
|
...
|
@@ -232,42 +229,6 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
|
|
|
|
|
|
@Override
|
|
|
public boolean updateAddress(int uid, long orderCode,String address){
|
|
|
if (uid < 0
|
|
|
|| orderCode < 0|| StringUtils.isBlank(address)){
|
|
|
logger.warn("buyer updateAddress, uid or orderCode empty, uid {}, orderCode {},address {}", uid, orderCode,address);
|
|
|
throw new ServiceException(ServiceError.ORDER_REQUEST_PARM_IS_EMPTY);
|
|
|
}
|
|
|
|
|
|
BuyerOrder buyerOrder = buyerOrderMapper.selectByOrderCodeUid(orderCode, uid);
|
|
|
if (Objects.isNull(buyerOrder)){
|
|
|
logger.warn("buyer updateAddress, order not exist, uid {}, orderCode {},address {}", uid, orderCode,address);
|
|
|
throw new ServiceException(400,"订单不存在");
|
|
|
}
|
|
|
|
|
|
Integer status= buyerOrder.getStatus();
|
|
|
if(OrderStatus.WAITING_PAY.getCode()!=status.intValue()){
|
|
|
logger.warn("buyer updateAddress, uid or orderCode status is not waiting pay, uid {}, orderCode {} address{} ,now status {}", uid, orderCode,address,status);
|
|
|
throw new ServiceException(400,"订单状态已更新,不允许更改地址");
|
|
|
}
|
|
|
|
|
|
//开始更新
|
|
|
BuyerOrderMeta meta=new BuyerOrderMeta();
|
|
|
meta.setUid(uid);
|
|
|
meta.setOrderCode(orderCode);
|
|
|
meta.setMetaKey(MetaKey.BUYER_DELIVERY_ADDRESS);
|
|
|
meta.setMetaValue(address);
|
|
|
logger.info("buyer updateAddress, uid {}, orderCode {} address{} ,meta param {} begin ",uid, orderCode,address,meta);
|
|
|
int result = buyerOrderMetaMapper.updateMetaValueByUidAndOrderCodeAndMetaKey(meta);
|
|
|
logger.info("buyer updateAddress, uid {}, orderCode {} address{} ,meta param {} end ,result {} ",uid, orderCode,address,meta,result);
|
|
|
if(result<=0){
|
|
|
return false;
|
|
|
}else{
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void confirmReceive(long orderCode) {
|
|
|
logger.info("in confirmReceive, orderCode {}", orderCode);
|
|
|
OrderStatus expectStatus = OrderStatus.SELLER_SEND_OUT;
|
...
|
...
|
|