系统参数设置,添加类型字段;

This commit is contained in:
yu 2025-01-15 14:50:57 +08:00
parent 04683ccf4a
commit 827e3e954b
4 changed files with 10 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import com.das.modules.page.domian.dto.SysHomeParamSetDto;
import com.das.modules.page.domian.vo.SysHomeParamSetVo; import com.das.modules.page.domian.vo.SysHomeParamSetVo;
import com.das.modules.page.service.HomeParamSetService; import com.das.modules.page.service.HomeParamSetService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@ -29,6 +30,9 @@ public class HomeParamSetController {
/** 新增系统参数设置页面 */ /** 新增系统参数设置页面 */
@PostMapping("/add") @PostMapping("/add")
public R<SysHomeParamSetVo> add(@RequestBody SysHomeParamSetDto sysHomeParamSetDto) { public R<SysHomeParamSetVo> add(@RequestBody SysHomeParamSetDto sysHomeParamSetDto) {
if (StringUtils.isBlank(sysHomeParamSetDto.getParamType())) {
throw new ServiceException("参数类型不能为空");
}
SysHomeParamSetVo sysHomeParamSetVo = homeParamSetService.add(sysHomeParamSetDto); SysHomeParamSetVo sysHomeParamSetVo = homeParamSetService.add(sysHomeParamSetDto);
return R.success(sysHomeParamSetVo); return R.success(sysHomeParamSetVo);
} }

View File

@ -15,4 +15,6 @@ public class SysHomeParamSetDto {
private JSONArray paramValueJson; private JSONArray paramValueJson;
private String paramDesc; private String paramDesc;
private String paramType;
} }

View File

@ -15,4 +15,6 @@ public class SysHomeParamSetVo {
private JSONArray paramValueJson; private JSONArray paramValueJson;
private String paramDesc; private String paramDesc;
private String paramType;
} }

View File

@ -29,4 +29,6 @@ public class SysHomeParamSet extends BaseEntity {
private String paramValue; private String paramValue;
private String paramDesc; private String paramDesc;
private String paramType;
} }