| | |
| | | public SysConfig selectConfig(SysConfig config);
|
| | |
|
| | | /**
|
| | | * 通过ID查询配置
|
| | | * |
| | | * @param configId 参数ID
|
| | | * @return 参数配置信息
|
| | | */
|
| | | public SysConfig selectConfigById(Long configId);
|
| | |
|
| | | /**
|
| | | * 查询参数配置列表
|
| | | *
|
| | | * @param config 参数配置信息
|
| | |
| | | @Override
|
| | | public int updateConfig(SysConfig config)
|
| | | {
|
| | | SysConfig temp = configMapper.selectConfigById(config.getConfigId());
|
| | | if (!StringUtils.equals(temp.getConfigKey(), config.getConfigKey()))
|
| | | {
|
| | | redisCache.deleteObject(getCacheKey(config.getConfigKey()));
|
| | | }
|
| | |
|
| | | int row = configMapper.updateConfig(config);
|
| | | if (row > 0)
|
| | | {
|
| | |
| | | </where>
|
| | | </select>
|
| | |
|
| | | <select id="selectConfigById" parameterType="Long" resultMap="SysConfigResult">
|
| | | <include refid="selectConfigVo"/>
|
| | | where config_id = #{configId}
|
| | | </select>
|
| | | |
| | | <select id="checkConfigKeyUnique" parameterType="String" resultMap="SysConfigResult">
|
| | | <include refid="selectConfigVo"/>
|
| | | where config_key = #{configKey} limit 1
|