admin
2021-06-07 fdd50bd7ca375743475f5f799564dffdd92fa491
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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);
    }
 
 
}