xiangpei
9 天以前 c13e4a322e3d58183882478703fe919a88759cb4
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package cn.lili.modules.search.service;
 
import cn.lili.common.vo.PageVO;
import cn.lili.modules.search.entity.dos.CustomWords;
import cn.lili.modules.search.entity.vo.CustomWordsVO;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
 
import java.util.List;
 
/**
 * 自定义分词业务层
 *
 * @author paulG
 * @since 2020/10/15
 **/
public interface CustomWordsService extends IService<CustomWords> {
 
    /**
     * 自定义分词部署替换
     * @return 替换的内容
     */
    String deploy();
 
    /**
     * 是否存在分词
     * @param words 分词
     * @return 是否存在
     */
    boolean existWords(String words);
 
    /**
     * 添加自定义分词
     *
     * @param customWordsVO 自定义分词信息
     * @return 是否添加成功
     */
    boolean addCustomWords(CustomWordsVO customWordsVO);
 
 
    /**
     * 修改自定义分词
     *
     * @param customWordsVO 自定义分词信息
     * @return 是否修改成功
     */
    boolean updateCustomWords(CustomWordsVO customWordsVO);
 
    /**
     * 删除自定义分词
     *
     * @param id 自定义分词id
     * @return 是否删除成功
     */
    boolean deleteCustomWords(String id);
 
    /**
     * 根据名字批量删除
     *
     * @param names 名称列表
     * @return 是否删除成功
     */
    boolean deleteBathByName(List<String> names);
 
    /**
     * 批量插入自定义分词
     *
     * @param customWordsList 自定义分词列表
     * @return 受影响行数
     */
    long insertBatchCustomWords(List<CustomWords> customWordsList);
 
    /**
     * 分页查询自定义分词
     *
     * @param words 分词
     * @param pageVo 分页信息
     * @return 自定义分词分页信息
     */
    IPage<CustomWords> getCustomWordsByPage(String words, PageVO pageVo);
 
}