Authored by LUOXC

add 闲鱼合作伙伴

package com.yohoufo.common.helper;
import com.yohoufo.common.config.UfoOrderPayConfigReader;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Objects;
import static org.apache.commons.lang3.StringUtils.prependIfMissing;
import static org.apache.commons.lang3.StringUtils.remove;
@Component
public class NoticeMessageFormatter {
... ... @@ -16,15 +18,17 @@ public class NoticeMessageFormatter {
public String formatWithWallet(String message) {
if (!ufoOrderPayConfigReader.transferWithWalletSwitch()) {
message = StringUtils.remove(message, ",请至UFO余额查看[我的-我的钱包-UFO余额]");
message = StringUtils.remove(message, ",请至UFO余额查看");
message = remove(message, ",请至UFO余额查看[我的-我的钱包-UFO余额]");
message = remove(message, ",请至UFO余额查看");
}
return message;
}
public String formatWithBusinessClient(String message, Integer businessClient) {
if (Objects.nonNull(businessClient)) {
message = StringUtils.remove(message, "更多信息请查看Yoho!Buy有货APP。");
// 闲鱼
if (Objects.equals(businessClient, Integer.valueOf(1))) {
message = remove(message, "更多信息请查看Yoho!Buy有货APP。");
message = prependIfMissing(message, "闲鱼合作伙伴,");
}
return message;
}
... ...