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);
|
|
|
}
|