认证-参数项-标题类型校验修改
This commit is contained in:
+5
-2
@@ -10,6 +10,7 @@ import com.jero.common.aspect.annotation.AutoLog;
|
|||||||
import com.jero.common.constant.enums.CutEnum;
|
import com.jero.common.constant.enums.CutEnum;
|
||||||
import com.jero.common.system.base.controller.JeroController;
|
import com.jero.common.system.base.controller.JeroController;
|
||||||
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
import com.jero.modules.cert.template.entity.ParamsInfoEO;
|
||||||
|
import com.jero.modules.cert.template.enums.ControlTypeEnum;
|
||||||
import com.jero.modules.cert.template.service.IParamsInfoEOService;
|
import com.jero.modules.cert.template.service.IParamsInfoEOService;
|
||||||
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
import com.jero.modules.cert.template.service.IParamsInfoPublishEOService;
|
||||||
import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
import com.jero.modules.cert.template.vo.ParamsInfoVO;
|
||||||
@@ -136,7 +137,8 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
// @RequiresPermissions("params:paramsInfo:add")
|
// @RequiresPermissions("params:paramsInfo:add")
|
||||||
public Result<?> add(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
public Result<?> add(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
||||||
if (StringUtils.isEmpty(paramsInfoEO.getCertCategory())) {
|
if (StringUtils.isEmpty(paramsInfoEO.getCertCategory())
|
||||||
|
&& !ControlTypeEnum.Title.getValue().equals(paramsInfoEO.getControlType())) {
|
||||||
return Result.error("认证类别不能为空!");
|
return Result.error("认证类别不能为空!");
|
||||||
}
|
}
|
||||||
boolean isSuccess = paramsInfoEOService.add(paramsInfoEO);
|
boolean isSuccess = paramsInfoEOService.add(paramsInfoEO);
|
||||||
@@ -158,7 +160,8 @@ public class ParamsInfoEOController extends JeroController<ParamsInfoEO, IParams
|
|||||||
@PostMapping(value = "/edit")
|
@PostMapping(value = "/edit")
|
||||||
@RequiresPermissions("params:paramsInfo:edit")
|
@RequiresPermissions("params:paramsInfo:edit")
|
||||||
public Result<?> edit(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
public Result<?> edit(@Validated @RequestBody ParamsInfoEO paramsInfoEO) {
|
||||||
if (StringUtils.isEmpty(paramsInfoEO.getCertCategory())) {
|
if (StringUtils.isEmpty(paramsInfoEO.getCertCategory())
|
||||||
|
&& !ControlTypeEnum.Title.getValue().equals(paramsInfoEO.getControlType())) {
|
||||||
return Result.error("认证类别不能为空!");
|
return Result.error("认证类别不能为空!");
|
||||||
}
|
}
|
||||||
boolean isSuccess = paramsInfoEOService.editById(paramsInfoEO);
|
boolean isSuccess = paramsInfoEOService.editById(paramsInfoEO);
|
||||||
|
|||||||
Reference in New Issue
Block a user