2
0

feat: system module config support i18n message

This commit is contained in:
zhangsz
2025-01-21 19:59:27 +08:00
parent 40bc0b612b
commit eb2c409100
3 changed files with 8 additions and 2 deletions

View File

@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.wfc.common.core.utils.MessageUtils;
import org.wfc.common.core.utils.poi.ExcelUtil;
import org.wfc.common.core.web.controller.BaseController;
import org.wfc.common.core.web.domain.AjaxResult;
@@ -85,7 +86,7 @@ public class SysConfigController extends BaseController
{
if (!configService.checkConfigKeyUnique(config))
{
return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
return error(MessageUtils.message("system.config.add.failed.config.exist", config.getConfigName()));
}
config.setCreateBy(SecurityUtils.getUsername());
return toAjax(configService.insertConfig(config));
@@ -101,7 +102,7 @@ public class SysConfigController extends BaseController
{
if (!configService.checkConfigKeyUnique(config))
{
return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
return error(MessageUtils.message("system.config.modify.failed.config.exist", config.getConfigName()));
}
config.setUpdateBy(SecurityUtils.getUsername());
return toAjax(configService.updateConfig(config));