feat: system module config support i18n message
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user