package com.yeshi.fanli.util.taobao;
|
|
import com.yeshi.fanli.util.StringUtil;
|
import com.yeshi.fanli.util.goods.GoodsTextUtil;
|
import com.yeshi.goods.facade.dto.taobao.dataoke.DaTaoKeListTopOffDTO;
|
|
/**
|
* 大淘客线报帮助类
|
*/
|
public class DaTaoKeTipOffUtil {
|
|
/**
|
* 获取APP内的推荐语
|
*
|
* @param dto
|
* @return
|
*/
|
public static String getRecoomendDesc(DaTaoKeListTopOffDTO dto) {
|
String text = dto.getOriginContent();
|
if (StringUtil.isNullOrEmpty(text)) {
|
text = dto.getTitle();
|
if (dto.getUrlList() != null && dto.getUrlList().size() > 0) {
|
text += "\n" + dto.getUrlList().get(0);
|
}
|
}
|
return text;
|
}
|
|
|
public static void main(String[] args) {
|
String st = "好价-14点 商品页准点抢20元劵\n" +
|
"【39.9元】蒙牛 纯甄 酸牛奶 200g*24盒\n" +
|
"https://u.jd.com/8K2aSJ1";
|
st = GoodsTextUtil.encodeAppHtmlText(st, "test", "查看详情");
|
System.out.println(st);
|
st = GoodsTextUtil.decodeAppHtmlText(st);
|
System.out.println(st);
|
}
|
|
|
}
|