Authored by chenchao

fix clean order list

... ... @@ -3,10 +3,11 @@ package com.yohoufo.order.service;
import com.yohobuy.ufo.model.order.bo.CustomsClearanceResult;
import com.yohobuy.ufo.model.order.req.BuyerOrderMetaUpdateReq;
import com.yohobuy.ufo.model.order.vo.AddressInfo;
import com.yohoufo.dal.order.model.BuyerOrder;
public interface IBuyerOrderMetaService {
String updateDeliveryAddress(BuyerOrderMetaUpdateReq req);
String updateDeliveryAddress(BuyerOrderMetaUpdateReq req, BuyerOrder pbo);
String updateDeliveryAddressByErp(BuyerOrderMetaUpdateReq req);
... ...
... ... @@ -43,7 +43,7 @@ public class BuyerOrderMetaServiceImpl implements IBuyerOrderMetaService {
private BuyerOrderMapper buyerOrderMapper;
@Override
public String updateDeliveryAddress(BuyerOrderMetaUpdateReq req){
public String updateDeliveryAddress(BuyerOrderMetaUpdateReq req,BuyerOrder pbo){
String noHiddenAddressStr = req.getAddress();
logger.info("BuyerOrderMetaServiceImpl updateDeliveryAddress parse address {} ", noHiddenAddressStr);
JSONObject jsonObject = JSON.parseObject(noHiddenAddressStr);
... ... @@ -96,6 +96,8 @@ public class BuyerOrderMetaServiceImpl implements IBuyerOrderMetaService {
rtn += (" address update:" + updateRowNum);
//clean cache of seller and buyer order detail
cacheCleaner.cleanDetail(buyerUid, req.getOrderCode(), TabType.BUY);
Integer sellerUid = pbo.getSellerUid();
cacheCleaner.cleanSellerAndBuyerOrderDetailAndList(sellerUid, buyerUid, req.getOrderCode());
return rtn;
}
... ... @@ -117,7 +119,7 @@ public class BuyerOrderMetaServiceImpl implements IBuyerOrderMetaService {
logger.warn("BuyerOrderMeta4PlatformController updateDeliveryAddress not allow status {} param req is {}",buyerOrder.getStatus(), req);
throw new UfoServiceException(400, "订单状态不允许变更地址");
}
return updateDeliveryAddress(req);
return updateDeliveryAddress(req, buyerOrder);
}
BuyerOrderMeta getBuyerOrderMeta(int uid, long orderCode, String metaKey) {
... ...
... ... @@ -247,7 +247,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
updateInfo.setSelfModifyTimes(selfModifyTimes);
logger.info("buyerModifyAddress begin update address , uid is {}, orderCode is {},update address info {}",
uid, orderCode ,jo_address_string);
buyerOrderMetaService.updateDeliveryAddress(updateInfo);
buyerOrderMetaService.updateDeliveryAddress(updateInfo, preparedNode.buyerOrder);
//clean cache of seller and buyer order detail
cacheCleaner.cleanDetail(uid, orderCode, TabType.BUY);
return true;
... ...
... ... @@ -190,6 +190,7 @@ public class SellerAddressService {
//TODO async process
if (rows>0){
cacheCleaner.cleanDetail(uid, orderCode, TabType.SELL);
cacheCleaner.cleanList(uid, TabType.SELL.getValue());
}
return rows;
}
... ...