Переглянути джерело

修改地图纠错列表接口

吴瑞豪 2 роки тому
батько
коміт
5f6a808aa6

+ 0 - 16
nngkxxdp/src/main/java/com/example/nngkxxdp/controller/MapDataController.java

@@ -189,22 +189,6 @@ public class MapDataController {
     }
 
     /**
-     * 根据ID查询地图纠错详细
-     */
-    @GetMapping("/getMapErrorDetail")
-    public Map<String, Object> getMapErrorDetail(Integer id) {
-        try {
-            if (Blank.notBlank(id)) {
-                return mapDataService.getMapErrorDetail(id);
-            }
-            return SendUtil.send(false, "", "id为空");
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return SendUtil.send(false, ConstStr.DATA_NOT_FOUND);
-    }
-
-    /**
      * 根据地址或类型模糊查询地图
      */
     @GetMapping("/queryMap")

+ 0 - 2
nngkxxdp/src/main/java/com/example/nngkxxdp/dao/MapDataDao.java

@@ -74,8 +74,6 @@ public interface MapDataDao {
 
 	List<Map<String, Object>> getMapErrorPage(int startRows, int rows);
 
-	List<Map<String, Object>> getMapErrorDetail(Integer id);
-
 	Integer updateErrorLog(Map<String, Object> mapErrorLog);
 
 	Integer deleteErrorLog(Integer id);

+ 0 - 2
nngkxxdp/src/main/java/com/example/nngkxxdp/service/MapDataService.java

@@ -56,8 +56,6 @@ public interface MapDataService {
 
 	Map<String, Object> getMapErrorPage(int page, int limit);
 
-	Map<String, Object> getMapErrorDetail(Integer id);
-
 	Map<String, Object> updateErrorLog(Map<String, Object> mapErrorLog);
 
 	Map<String, Object> deleteErrorLog(Integer id);

+ 0 - 5
nngkxxdp/src/main/java/com/example/nngkxxdp/service/impl/MapDataServiceImpl.java

@@ -146,11 +146,6 @@ public class MapDataServiceImpl implements MapDataService {
     }
 
     @Override
-    public Map<String, Object> getMapErrorDetail(Integer id) {
-        return SendUtil.send(true, null, mapDataDao.getMapErrorDetail(id));
-    }
-
-    @Override
     public Map<String, Object> updateErrorLog(Map<String, Object> mapErrorLog) {
         if (Blank.isEmpty(mapErrorLog.get("id"))) {
             return SendUtil.send(false, ConstStr.UPDATEUSER_FAILED, "id为空");

+ 4 - 36
nngkxxdp/src/main/resources/mapper/MapDataDao.xml

@@ -101,27 +101,7 @@
     </select>
 
     <select id="getMapErrorPage" resultType="java.util.Map">
-        SELECT id,
-               s_map_id,
-               address_name,
-               original_address,
-               original_longitude,
-               original_latitude,
-               new_address,
-               new_longitude,
-               new_latitude,
-               error_state,
-               create_time,
-               update_time
-        FROM s_map_errorlog
-        order by id DESC
-        limit #{startRows},#{rows}
-    </select>
-
-    <select id="getMapErrorDetail" resultType="java.util.Map">
         SELECT sme.id,
-               sme.s_map_id,
-               sme.address_name,
                sme.original_address,
                sme.original_longitude,
                sme.original_latitude,
@@ -131,26 +111,14 @@
                sme.error_state,
                sme.create_time,
                sme.update_time,
+               sm.dep name,
                sm.dict_type,
-               sm.address,
-               sm.content,
-               sm.dep,
-               sm.img,
-               sm.gzh,
-               sm.sptype,
                sm.tel,
-               sm.time,
-               sm.url,
-               sm.type,
-               sm.tag,
-               sm.tag2,
-               sm.tag3,
-               sm.specialtype,
-               sm.create_time mapCreateTime,
-               sm.update_time mapUpdateTime
+               sm.content
         FROM s_map_errorlog sme
                  left join s_map sm on sm.id = sme.s_map_id
-        where sme.id = #{id}
+        order by id DESC
+        limit #{startRows},#{rows}
     </select>
 
     <select id="queryMap" resultType="java.util.Map">