From c1d5291aad50416af3f4e27539fff6af8f317e42 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Mon, 26 Feb 2024 16:47:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E6=9E=84=E6=96=B0=E5=A2=9E=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zc/business/controller/DcOrganizationController.java | 3 +++ .../business/service/impl/DcOrganizationServiceImpl.java | 1 + .../mapper/business/DcPerceivedEventsWarningMapper.xml | 9 +++------ 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcOrganizationController.java b/zc-business/src/main/java/com/zc/business/controller/DcOrganizationController.java index 0dccee70..448185f0 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcOrganizationController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcOrganizationController.java @@ -89,6 +89,9 @@ public class DcOrganizationController extends BaseController @PostMapping public AjaxResult add(@RequestBody DcOrganization dcOrganization) { + if (dcOrganization.getParentId()==null){ + return AjaxResult.error("参数错误"); + } return toAjax(dcOrganizationService.insertDcOrganization(dcOrganization)); } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcOrganizationServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcOrganizationServiceImpl.java index 5b972b8d..f887018a 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcOrganizationServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcOrganizationServiceImpl.java @@ -84,6 +84,7 @@ public class DcOrganizationServiceImpl implements IDcOrganizationService public int insertDcOrganization(DcOrganization dcOrganization) { dcOrganization.setCreateTime(DateUtils.getNowDate()); + dcOrganization.setOrganizationType(2);//注入类型为驻点 return dcOrganizationMapper.insertDcOrganization(dcOrganization); } diff --git a/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml b/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml index ee7587ba..fcde4c70 100644 --- a/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml @@ -46,14 +46,11 @@ order by warning.warning_time desc