admin
2020-12-31 74196bcc835d9b76cdd1bc3d85b0dfbe0191fc00
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
package com.ks.daylucky.service;
 
import com.beust.jcommander.ParameterException;
import com.ks.daylucky.exception.AppConfigException;
import com.ks.daylucky.pojo.DO.AppConfig;
import com.ks.daylucky.pojo.DTO.ConfigKeyEnum;
import com.ks.daylucky.query.AppConfigQuery;
 
import javax.validation.Valid;
import java.util.List;
 
/**
 * 应用配置服务
 */
public interface AppConfigService {
 
 
    /**
     * 添加应用配置信息
     *
     * @param config
     * @throws ParameterException
     * @throws AppConfigException
     */
    public void addAppConfig(@Valid AppConfig config) throws ParameterException, AppConfigException;
 
 
    /**
     * 获取配置列表
     *
     * @param query
     * @param page
     * @param pageSize
     * @return
     */
    public List<AppConfig> getConfigList(AppConfigQuery query, int page, int pageSize);
 
 
    public long countConfig(AppConfigQuery query);
 
    /**
     * 主键查询
     *
     * @param id
     * @return
     */
    public AppConfig selectByPrimaryKey(Long id);
 
 
    /**
     * 获取应用配置信息
     *
     * @param appId
     * @param key
     * @param version
     * @return
     */
    public AppConfig getConfig(Long appId, ConfigKeyEnum key, Integer version);
 
 
    /**
     * 获取应用配置信息(有缓存)
     *
     * @param appId
     * @param key
     * @param version
     * @return
     */
    public AppConfig getConfigCache(Long appId, ConfigKeyEnum key, Integer version);
 
 
    /**
     * 修改应用配置
     *
     * @param config
     */
    public void update(AppConfig config);
 
    /**
     * 删除
     *
     * @param id
     */
    public void delete(Long id);
 
 
}