From 8cf2da63a313ae9ce75bb4bd6d589612367dc4e2 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 22 Jul 2022 22:26:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AEcode=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java | 2 ++ .../opendata/service/impl/GridInfoPingyinServiceImpl.java | 4 ++-- .../src/main/resources/mapper/GridInfoPingyinDao.xml | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java index 0ae3ac01e9..986b8f2ff7 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/dao/GridInfoPingyinDao.java @@ -28,4 +28,6 @@ public interface GridInfoPingyinDao extends BaseDao { @Param("gridLevel")Integer gridLevel, @Param("lng")BigDecimal lng, @Param("lat")BigDecimal lat); + + int deleteByCode(String gridCode); } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java index 21886ce34f..2f54aecee6 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/java/com/epmet/opendata/service/impl/GridInfoPingyinServiceImpl.java @@ -120,7 +120,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl orginList = baseDao.selectByGridCode(entity.getGridCode()); if (CollectionUtils.isNotEmpty(orginList)) { for (GridInfoPingyinEntity oigin : orginList) { - baseDao.deleteById(oigin.getId()); + baseDao.deleteByCode(oigin.getGridCode()); } } } @@ -212,7 +212,7 @@ public class GridInfoPingyinServiceImpl extends BaseServiceImpl orginList = baseDao.selectByGridCode(entity.getGridCode()); if (CollectionUtils.isNotEmpty(orginList)) { for (GridInfoPingyinEntity oigin : orginList) { - baseDao.deleteById(oigin.getId()); + baseDao.deleteByCode(oigin.getGridCode()); } } } diff --git a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml index a6f7c2ef5a..c79ef11f2a 100755 --- a/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml +++ b/epmet-module/open-data-worker/open-data-worker-server/src/main/resources/mapper/GridInfoPingyinDao.xml @@ -44,4 +44,9 @@ lat = #{lat} where grid_code = #{gridCode} and is_del = 'N' + + + update grid_info_pingyin set is_del = 'Y' + where grid_code = #{gridCode} +