Authored by mali

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

... ... @@ -24,6 +24,7 @@ import com.yohoufo.dal.order.model.StorageDepositCount;
import com.yohoufo.order.controller.DepositController;
import com.yohoufo.order.model.response.AppraiseAddressResp;
import com.yohoufo.order.service.DepositService;
import com.yohoufo.order.service.proxy.InBoxFacade;
import com.yohoufo.order.service.proxy.ProductProxyService;
import com.yohoufo.order.service.proxy.SellerNoticeFacade;
import com.yohoufo.order.service.seller.SkupService;
... ... @@ -73,6 +74,9 @@ public class DepositServiceImpl implements DepositService {
@Autowired
private SellerNoticeFacade sellerNoticeFacade;
@Autowired
private InBoxFacade inBoxFacade;
private static final int DEPOSIT_MAX_TIME = 45 * 24 * 60 * 60;
... ... @@ -318,7 +322,7 @@ public class DepositServiceImpl implements DepositService {
clearCache(uid, sd.getProductId(), sd.getStorageId());
SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(sd.getNewSkup());
sellerNoticeFacade.depositGoodsSaleUnShelf(uid, psog.getProductName(), psog.getSizeName(), psog.getProductId());
inBoxFacade.sellerPlaySelf(uid, psog);
}
/**
... ...
... ... @@ -100,7 +100,13 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
private static final List<Long> SELLER_TYPES = Arrays.asList(OrderCodeType.SELLER_TYPE.getType());
private static final List<Integer> quickDeliverFinishStatus ;
static {
quickDeliverFinishStatus = new ArrayList<>(8);
quickDeliverFinishStatus.add(OrderStatus.JUDGE_PASS.getCode());
quickDeliverFinishStatus.add(OrderStatus.WAITING_RECEIVE.getCode());
quickDeliverFinishStatus.add(OrderStatus.DONE.getCode());
}
@Override
public OrderDetailInfo getOrderDetail(OrderRequest orderRequest) {
int uid;
... ... @@ -493,12 +499,16 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
buyerOrder.getOrderCode(), detailDesc, orderOverTime);
}
}
if (BuyerOrderUtils.isQuickDeliverDeposit(skupType, buyerOrder)) {
detailDesc = OrderDetailDesc.Seller.TRADE_DONE_QUICK_DELIVER;
//急速发货商品,且已完成(区分寄存 发货)
if (SellerGoodsHelper.isQuickDeliver(skupType)) {
if (quickDeliverFinishStatus.contains(orderStatus.getCode())){
detailDesc = OrderDetailDesc.Seller.TRADE_DONE_QUICK_DELIVER;
}
}
return detailDesc;
}
@Override
protected void resetDynamicProporties(OrderDetailInfo orderDetailInfo,String appVersion) {
Long orderCode = orderDetailInfo.getOrderCode();
... ...
... ... @@ -126,47 +126,8 @@ public class SellerNoticeFacade extends BaseNoticeFacade {
}
}
/**
* 寄存商品上架出售
*
* @param sellerUid
* @param prdName
*/
public void depositGoodsSaleShelf(int sellerUid, String prdName, String sizeName, Integer productId) {
try {
newNotice(sellerUid)
.withLogPrefix("notice seller deposit goods sale shelf")
.withInBox(() -> {
Product product = productMapper.selectByPrimaryKey(productId);
String productCode = product.getProductCode();
return buildInboxContent(InboxBusinessTypeEnum.DEPOSIT_GOODS_SALE_SHELF, prdName, sizeName, productCode);
})
.send();
} catch (Exception e) {
log.warn("notice seller deposit goods sale shelf fail, sellerUid {}, prdName {} ,sizeName {} ", sellerUid, prdName, sizeName, e);
}
}
/**
* 寄存商品下架
*
* @param sellerUid
* @param prdName
*/
public void depositGoodsSaleUnShelf(int sellerUid, String prdName, String sizeName, Integer productId) {
try {
newNotice(sellerUid)
.withLogPrefix("notice seller deposit goods sale shelf")
.withInBox(() -> {
Product product = productMapper.selectByPrimaryKey(productId);
String productCode = product.getProductCode();
return buildInboxContent(InboxBusinessTypeEnum.DEPOSIT_GOODS_SALE_UN_SHELF, prdName, sizeName, productCode);
})
.send();
} catch (Exception e) {
log.warn("notice seller deposit goods sale shelf fail, sellerUid {}, prdName {} ,sizeName {} ", sellerUid, prdName, sizeName, e);
}
}
public void buyerCancelBeforeDepotReceive(@NonNull BuyerOrder buyerOrder, SellerOrderGoods sog) {
Integer buyerUid = buyerOrder.getUid();
... ...
... ... @@ -8,6 +8,7 @@ import com.yohobuy.ufo.model.order.common.OrderCodeType;
import com.yohobuy.ufo.model.order.common.SellerOrderListType;
import com.yohobuy.ufo.model.order.common.SkupListType;
import com.yohobuy.ufo.model.order.common.SkupStatus;
import com.yohobuy.ufo.model.order.constants.SkupType;
import com.yohobuy.ufo.model.order.req.QuickDeliverOrderSubmitReq;
import com.yohobuy.ufo.model.order.resp.OrderListInfo;
import com.yohobuy.ufo.model.order.resp.PageResp;
... ... @@ -127,7 +128,8 @@ public class QuickDeliverGoodsService {
}
//在for循环中被用作值传递,部分数据会有变化,使用时需要注意动态变化的属性
GoodsInfo goodsInfo = context.getSoldProduct();
sellerNoticeFacade.depositGoodsSaleShelf(uid, goodsInfo.getProductName(), goodsInfo.getSizeName(), goodsInfo.getProductId());
SkupType skupType = goodsInfo.getSkupType();
sellerNoticeFacade.saleShelf(uid, goodsInfo.getProductName(), goodsInfo.getSizeName(), goodsInfo.getProductId(), skupType.getCode());
DepositPublishResp resp = DepositPublishResp.builder().successNum(successNum)
.build();
return resp;
... ...