fix: 企标计划删除报错
This commit is contained in:
+4
-3
@@ -80,11 +80,12 @@ public class EnterpriseStandardPlanController extends JeroController<EnterpriseS
|
|||||||
@RequiresPermissions("enterpriseStandardLibrary:plan:delete")
|
@RequiresPermissions("enterpriseStandardLibrary:plan:delete")
|
||||||
@AutoLog(value = "企标计划-通过id删除")
|
@AutoLog(value = "企标计划-通过id删除")
|
||||||
@ApiOperation(value = "企标计划-通过id删除", notes = "企标计划-通过id删除")
|
@ApiOperation(value = "企标计划-通过id删除", notes = "企标计划-通过id删除")
|
||||||
@GetMapping(value = "/delete/{id}")
|
@PostMapping(value = "/delete")
|
||||||
public Result<T> deleteEN(@PathVariable String id) {
|
public Result<T> deleteEN(@RequestBody Map<String, String> map) {
|
||||||
if (StringUtils.isBlank(id)) {
|
if(!map.containsKey("id") || org.apache.commons.lang.StringUtils.isEmpty(map.get("id"))){
|
||||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.PARAMETERS_CANNOT_BE_NULL));
|
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.PARAMETERS_CANNOT_BE_NULL));
|
||||||
}
|
}
|
||||||
|
String id = map.get("id");
|
||||||
EnterpriseStandardPlan esPlan = esPlanService.getById(id);
|
EnterpriseStandardPlan esPlan = esPlanService.getById(id);
|
||||||
if (esPlan == null) {
|
if (esPlan == null) {
|
||||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.NO_CORRESPONDING_RECORD_FOUND));
|
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.NO_CORRESPONDING_RECORD_FOUND));
|
||||||
|
|||||||
Reference in New Issue
Block a user