fix: 保存基本信息时去掉路径最后的 /

This commit is contained in:
Captain.B 2020-12-24 11:21:00 +08:00
parent 74abe9ece5
commit 75ae7adfae
1 changed files with 2 additions and 0 deletions

View File

@ -212,6 +212,8 @@ public class SystemParameterService {
public void saveBaseInfo(List<SystemParameter> parameters) {
SystemParameterExample example = new SystemParameterExample();
parameters.forEach(param -> {
// 去掉路径最后的 /
param.setParamValue(StringUtils.removeEnd(param.getParamValue(), "/"));
example.createCriteria().andParamKeyEqualTo(param.getParamKey());
if (systemParameterMapper.countByExample(example) > 0) {
systemParameterMapper.updateByPrimaryKey(param);