From a093b470d5f9ce57c05ad610312d4af69688a18b Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期六, 07 十月 2023 15:01:32 +0800
Subject: [PATCH] 添加地块实体类、Mapper映射类

---
 src/main/java/com/smartearth/poiexcel/controller/EntController.java |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/main/java/com/smartearth/poiexcel/controller/EntController.java b/src/main/java/com/smartearth/poiexcel/controller/EntController.java
index cd1bd57..3d71423 100644
--- a/src/main/java/com/smartearth/poiexcel/controller/EntController.java
+++ b/src/main/java/com/smartearth/poiexcel/controller/EntController.java
@@ -6,7 +6,6 @@
 import com.smartearth.poiexcel.entity.ResponseMsg;
 import com.smartearth.poiexcel.entity.StaticData;
 import com.smartearth.poiexcel.mapper.EntMapper;
-import com.smartearth.poiexcel.mapper.QiYeMapper;
 import com.smartearth.poiexcel.service.EntService;
 import com.smartearth.poiexcel.utils.HttpUtils;
 import com.smartearth.poiexcel.utils.StringHelper;
@@ -41,9 +40,6 @@
     @Resource
     EntMapper entMapper;
 
-    @Resource
-    QiYeMapper qiYeMapper;
-
     @Value("${address.code.url}")
     private String addressCodeUrl;
 
@@ -54,7 +50,7 @@
     @GetMapping({"/selectByName"})
     public ResponseMsg<Object> selectByName(String name) {
         try {
-            List<EntEntity> list = qiYeMapper.selectByName(StringHelper.getLikeStr(name));
+            List<EntEntity> list = entMapper.selectByName(StringHelper.getLikeStr(name));
 
             return success(null == list ? 0 : list.size(), list);
         } catch (Exception ex) {
@@ -159,8 +155,8 @@
             if (null == pageIndex || pageIndex < 1) {
                 pageIndex = 1;
             }
-            int count = qiYeMapper.selectCount();
-            List<EntEntity> list = qiYeMapper.selectByPage(pageSize, StaticData.I100 * (pageIndex - 1));
+            int count = entMapper.selectCount();
+            List<EntEntity> list = entMapper.selectByPage(pageSize, StaticData.I100 * (pageIndex - 1));
 
             return success(count, list);
         } catch (Exception ex) {
@@ -173,14 +169,14 @@
     public ResponseMsg<Object> updateCoords() {
         try {
             int rows = 0;
-            int count = qiYeMapper.selectCount();
+            int count = entMapper.selectCount();
             if (0 == count) {
                 return success("娌℃湁鏁版嵁闇�瑕佹洿鏂�", count);
             }
 
             int pages = (count - 1) / StaticData.I100 + 1;
             for (int i = 1; i <= pages; i++) {
-                List<EntEntity> list = qiYeMapper.selectByPage(StaticData.I100, StaticData.I100 * (i - 1));
+                List<EntEntity> list = entMapper.selectByPage(StaticData.I100, StaticData.I100 * (i - 1));
                 if (null == list || list.isEmpty()) {
                     continue;
                 }
@@ -191,7 +187,7 @@
                     }
                 }
 
-                rows += qiYeMapper.updates(list);
+                rows += entMapper.updates(list);
             }
 
             return success(rows);

--
Gitblit v1.9.3