...
|
...
|
@@ -2,22 +2,20 @@ package com.yohoufo.order.service.proxy; |
|
|
|
|
|
import com.yoho.message.sdk.service.ufo.IUFOSendService;
|
|
|
import com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum;
|
|
|
import com.yohobuy.ufo.model.order.constants.SkupType;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrder;
|
|
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
|
|
import com.yohoufo.dal.product.ProductMapper;
|
|
|
import com.yohoufo.dal.product.model.Product;
|
|
|
import com.yohoufo.inboxclient.model.InBoxResponse;
|
|
|
import com.yohoufo.inboxclient.model.InboxReqVO;
|
|
|
import lombok.NonNull;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
import java.util.Optional;
|
|
|
import java.util.function.Supplier;
|
|
|
|
|
|
@Service
|
|
|
@Slf4j(topic = "SellerNoticeFacade")
|
...
|
...
|
@@ -64,7 +62,7 @@ public class SellerNoticeFacade extends BaseNoticeFacade { |
|
|
*
|
|
|
* @param orderCode
|
|
|
*/
|
|
|
public void appraisePass(int buyerUid, long orderCode, SellerOrderGoods psog) {
|
|
|
public void appraisePass(int buyerUid, long orderCode, SellerOrderGoods psog, boolean withEarnMoney) {
|
|
|
try {
|
|
|
Integer sellerUid = psog.getUid();
|
|
|
newNotice(sellerUid)
|
...
|
...
|
@@ -75,7 +73,11 @@ public class SellerNoticeFacade extends BaseNoticeFacade { |
|
|
String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
|
|
|
String sizeName = psog.getSizeName();
|
|
|
String goodsTypeType = buildGoodsTypeTagForSeller(psog);
|
|
|
return buildInboxContent(InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_APPRAISE_PASS, goodsTypeType, prdName, sizeName, productCode);
|
|
|
String earnMoneyPlacehold = "";
|
|
|
if (withEarnMoney){
|
|
|
earnMoneyPlacehold = "保证金已退还,";
|
|
|
}
|
|
|
return buildInboxContent(InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_APPRAISE_PASS, goodsTypeType, prdName, sizeName, productCode,earnMoneyPlacehold);
|
|
|
})
|
|
|
.withSms(() -> {
|
|
|
String goodsTypeType = buildGoodsTypeTagForSeller(psog);
|
...
|
...
|
@@ -237,8 +239,26 @@ public class SellerNoticeFacade extends BaseNoticeFacade { |
|
|
}
|
|
|
}
|
|
|
|
|
|
public void noticeSellerWhenPlatformOffShelve(SellerOrderGoods psog) {
|
|
|
|
|
|
public void noticeSellerWhenPlatformOffShelve(SellerOrderGoods psog){
|
|
|
//SALE_NOTIFIED_UNSHELF_4_QUICK_DELIVER
|
|
|
// SMS_SMS_NOTIFIED_UNSHELF
|
|
|
Integer sellerUid = psog.getUid();
|
|
|
String prdName = psog.getProductName();
|
|
|
String sizeName = psog.getSizeName();
|
|
|
try {
|
|
|
Product product = productMapper.selectByPrimaryKey(psog.getProductId());
|
|
|
String skupTypeText=SkupType.getSkupType(psog.getAttributes()).attrName();
|
|
|
String productCode = product.getProductCode();
|
|
|
Supplier<InboxReqVO> inboxSupplier = ()->buildInboxContent(InboxBusinessTypeEnum.SALE_NOTIFIED_UNSHELF_4_QUICK_DELIVER, skupTypeText, prdName, sizeName, productCode);
|
|
|
Supplier<String> smsSupplier = ()->buildSmsContent(InboxBusinessTypeEnum.SMS_SMS_NOTIFIED_UNSHELF, skupTypeText,prdName,sizeName,productCode);
|
|
|
newNotice(psog.getUid())
|
|
|
.withLogPrefix("notice Seller When Platform Off-Shelve")
|
|
|
.withInBox(inboxSupplier)
|
|
|
.withSms(smsSupplier)
|
|
|
.send();
|
|
|
} catch (Exception e) {
|
|
|
log.warn("noticeSellerWhenPlatformOffShelve fail, sellerUid {}, prdName {} ,sizeName {} ", sellerUid, prdName, sizeName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
|