diff --git a/boot-service/src/main/java/com/xwbing/service/sys/SysConfigService.java b/boot-service/src/main/java/com/xwbing/service/sys/SysConfigService.java index 45a1816..e5c89e3 100644 --- a/boot-service/src/main/java/com/xwbing/service/sys/SysConfigService.java +++ b/boot-service/src/main/java/com/xwbing/service/sys/SysConfigService.java @@ -73,6 +73,16 @@ public class SysConfigService { return result; } + /** + * 根据code查找配置 + * + * @param code + * @return + */ + public SysConfig getByCode(String code) { + return sysConfigRepository.getByCode(code); + } + /** * 修改 * @@ -86,6 +96,7 @@ public class SysConfigService { throw new BusinessException("该配置项不存在"); } old.setValue(sysConfig.getValue()); + old.setName(sysConfig.getName()); old.setEnable(sysConfig.getEnable()); old.setModifiedTime(new Date()); SysConfig save = sysConfigRepository.save(old); @@ -98,16 +109,6 @@ public class SysConfigService { return result; } - /** - * 根据code查找配置 - * - * @param code - * @return - */ - public SysConfig getByCode(String code) { - return sysConfigRepository.getByCode(code); - } - /** * 根据状态获取配置列表 * diff --git a/boot-web/src/main/java/com/xwbing/controller/sys/SysConfigControl.java b/boot-web/src/main/java/com/xwbing/controller/sys/SysConfigControl.java index 4f3b951..58f36b5 100644 --- a/boot-web/src/main/java/com/xwbing/controller/sys/SysConfigControl.java +++ b/boot-web/src/main/java/com/xwbing/controller/sys/SysConfigControl.java @@ -10,8 +10,6 @@ import com.xwbing.service.sys.SysConfigService; import com.xwbing.util.JsonResult; import com.xwbing.util.RestMessage; import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -61,11 +59,6 @@ public class SysConfigControl { @LogInfo("修改系统配置信息") @ApiOperation(value = "修改", notes = "修改系统配置信息", response = RestMessageVo.class) - @ApiImplicitParams({ - @ApiImplicitParam(name = "code", value = "配置项的key,长度为1-50", paramType = "query", required = true, dataType = "string"), - @ApiImplicitParam(name = "value", value = "配置项的值", paramType = "query", required = true, dataType = "string"), - @ApiImplicitParam(name = "enable", value = "是否启用,格式为Y|N", paramType = "query", required = true, dataType = "string"), - }) @PostMapping("update") public JSONObject update(SysConfig sysConfig) { String logMsg = "修改系统配置信息";