| | |
| | | import org.springframework.web.bind.annotation.RequestBody;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.constant.UserConstants;
|
| | | import com.ruoyi.common.utils.poi.ExcelUtil;
|
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
| | |
| | | @PostMapping
|
| | | public AjaxResult add(@Validated @RequestBody SysConfig config)
|
| | | {
|
| | | if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
|
| | | if (!configService.checkConfigKeyUnique(config))
|
| | | {
|
| | | return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
| | | }
|
| | |
| | | @PutMapping
|
| | | public AjaxResult edit(@Validated @RequestBody SysConfig config)
|
| | | {
|
| | | if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
|
| | | if (!configService.checkConfigKeyUnique(config))
|
| | | {
|
| | | return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
| | | }
|