Authored by chenchao

fix 5763

... ... @@ -1251,7 +1251,8 @@ public class AppraiseService {
throw new ServiceException(ServiceError.ORDER_NULL);
}
final OrderStatus expectOrderStatus = OrderStatus.PLATFORM_RECEIVE;
final OrderStatus targetOrderStatus = BuyerOrderUtils.isDeposit(buyerOrder) ? OrderStatus.JUDGE_PASS_WAIT_WAREHOUSE : OrderStatus.JUDGE_PASS;
boolean isDepositOfInStockGoods = BuyerOrderUtils.isDeposit(buyerOrder);
final OrderStatus targetOrderStatus = isDepositOfInStockGoods ? OrderStatus.JUDGE_PASS_WAIT_WAREHOUSE : OrderStatus.JUDGE_PASS;
if (buyerOrder.getStatus() != expectOrderStatus.getCode()) {
LOGGER.warn("in judgeCenterPass, buyer Order orderCode {} status {}, expect Order Status is {} ", expectOrderStatus,
... ... @@ -1287,8 +1288,12 @@ public class AppraiseService {
LOGGER.info("in judgeCenterPass record status change, orderCode {},uid {} ,sellerUid {}", orderCode, buyerUid, sellerUid);
orderStatusFlowService.addAsy(buyerOrder.getOrderCode(), targetOrderStatus.getCode());
//TODO 鉴定通过,
Product product = Optional.ofNullable(sellerOrderGoods).map(SellerOrderGoods::getProductId).map(productMapper::selectByPrimaryKey).orElse(null);
sellerNoticeFacade.appraisePass(buyerUid, orderCode, sellerOrderGoods);
if(isDepositOfInStockGoods){
Product product = Optional.ofNullable(sellerOrderGoods).map(SellerOrderGoods::getProductId).map(productMapper::selectByPrimaryKey).orElse(null);
buyerNoticeFacade.noticeBuyerWhenDepositOrderOfInstockPass(buyerUid, orderCode, sellerOrderGoods, product);
}
} catch (Exception ex) {
LOGGER.warn("in judgeCenterPass,refund fail, refundReqOfSeller {}", refundReqOfSeller, ex);
String content = "后台鉴定通过商品,订单" + orderCode + "退还保证金失败";
... ...
package com.yohoufo.order.service.proxy;
import com.alibaba.fastjson.JSON;
import com.yoho.message.sdk.service.ufo.IUFOSendService;
import com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum;
import com.yohobuy.ufo.model.order.constants.SkupType;
... ... @@ -369,4 +368,22 @@ public class BuyerNoticeFacade extends BaseNoticeFacade {
}
}
public void noticeBuyerWhenDepositOrderOfInstockPass(int buyerUid, long orderCode, SellerOrderGoods psog, Product product){
try {
log.info("noticeBuyerWhenDepositOrderOfInstockPass, buyerUid {}, orderCode {}", buyerUid, orderCode);
String prdName = psog.getProductName();
String sizeName = psog.getSizeName();
String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
newNotice(buyerUid)
.withLogPrefix("notice Buyer When Deposit Order Of Instock Pass")
.withInBox(InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_DEPOSIT_ORDER_OF_INSTOCK_PASS, orderCode)
.withSms(InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_DEPOSIT_ORDER_OF_INSTOCK_PASS, prdName, sizeName, productCode, orderCode)
.send();
} catch (Exception e) {
log.warn("noticeBuyerWhenDepositOrderOfInstockPass fail, buyerUid {}, orderCode {}", buyerUid, orderCode, e);
}
}
}
... ...