yujian
2019-09-03 2ddf5b8a1290123e2d1c05bcc851ec35cd217afc
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
package com.yeshi.fanli.service.inter.customerservice;
 
import java.util.List;
 
import com.yeshi.fanli.entity.customerservice.CustomerServiceCommonQuestion;
import com.yeshi.fanli.exception.user.CustomerServiceCommonQuestionException;
 
public interface CustomerServiceCommonQuestionService {
    /**
     * 通过关键字检索
     * 
     * @param key
     * @return
     */
    public CustomerServiceCommonQuestion searchByKey(String key);
 
    /**
     * 通过关键字检索(带有缓存)
     * 
     * @param key
     * @return
     */
    public CustomerServiceCommonQuestion searchByKeyCache(String key);
 
    /**
     * 添加问题
     * 
     * @param question
     */
    public void addCustomerServiceCommonQuestion(CustomerServiceCommonQuestion question)
            throws CustomerServiceCommonQuestionException;
 
    /**
     * 更新某个常见问题(主键更新)
     * 
     * @param question
     * @throws CustomerServiceCommonQuestionException
     */
    public void updateCustomerServiceCommonQuestion(CustomerServiceCommonQuestion question)
            throws CustomerServiceCommonQuestionException;
 
    /**
     * 删除问题
     * 
     * @param id-主键ID
     */
    public void deleteCustomerServiceCommonQuestion(Long id);
 
    /**
     * 查询所有的KEY值(按权重大小排序)
     * 
     * @return
     */
    public List<String> listKeysCache();
 
    /**
     * 获取常见问题列表(按更新时间排序-倒序)
     * 
     * @param page
     * @param pageSize
     * @return
     */
    public List<CustomerServiceCommonQuestion> listCustomerServiceCommonQuestion(int page, int pageSize);
 
    /**
     * 查询总共有多少条信息
     * 
     * @return
     */
    public Long countCustomerServiceCommonQuestion();
 
    CustomerServiceCommonQuestion selectByPrimaryKey(Long id);
    
    int deleteBatchByPrimaryKey(List<Long> list);
    
    int insert(CustomerServiceCommonQuestion record);
 
    int insertSelective(CustomerServiceCommonQuestion record);
 
    int updateByPrimaryKeySelective(CustomerServiceCommonQuestion record);
 
    int updateByPrimaryKey(CustomerServiceCommonQuestion record);
    
    /**
     * 后台查询列表
     * @param start
     * @param count
     * @param key 关键词 、内容搜索
     * @param type 类型
     * @param state 状态
     * @param sort 排序: 1权重低到高  2权重高到低
     * @return
     */
    public List<CustomerServiceCommonQuestion> listQuery(long start, int count, String key, String type,
            Integer state, Integer sort);
 
    public long countQuery(String key, String type, Integer state);
    
    /**
     * 保存
     * @param record
     * @throws CustomerServiceCommonQuestionException
     */
    public void save(CustomerServiceCommonQuestion record) throws Exception, CustomerServiceCommonQuestionException;
 
}