From debab6db6e5d3bddb41910c302a854c3a58b7e02 Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Thu, 2 Mar 2023 11:01:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/xkrs/dao/FirePointDao.java | 8 ------- .../straw/controller/FirePointController.java | 24 +++---------------- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/xkrs/dao/FirePointDao.java b/src/main/java/com/xkrs/dao/FirePointDao.java index 84d13b0..7abc9c3 100644 --- a/src/main/java/com/xkrs/dao/FirePointDao.java +++ b/src/main/java/com/xkrs/dao/FirePointDao.java @@ -3,7 +3,6 @@ package com.xkrs.dao; import com.xkrs.model.entity.FirePointEntity; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; -import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Component; @@ -21,13 +20,6 @@ public interface FirePointDao extends JpaRepository, JpaS @Query(value = "SELECT * FROM fire_point WHERE longitude = ?1 AND latitude = ?2 AND street_code = ?3 AND satellite_time = ?4 AND satellite_type = ?5 AND land_type = ?6", nativeQuery = true) List findDuplicatedData(double longitude, double latitude, String streetCode, String satelliteTime, String satelliteType, String landType); - /** - * 根据火点编码修改审核火点状态 - */ - @Modifying(clearAutomatically = true) - @Query(value = "UPDATE fire_point SET audit_fire_type = ?2 WHERE fire_code = ?1", nativeQuery = true) - void updateAuditFireTypeByFireCode(String fireCode, String auditFireType); - /** * 查询时间段内各植被类型的火点数量 */ diff --git a/src/main/java/com/xkrs/straw/controller/FirePointController.java b/src/main/java/com/xkrs/straw/controller/FirePointController.java index aeb89ba..da7ac92 100644 --- a/src/main/java/com/xkrs/straw/controller/FirePointController.java +++ b/src/main/java/com/xkrs/straw/controller/FirePointController.java @@ -1,17 +1,16 @@ package com.xkrs.straw.controller; import com.xkrs.common.encapsulation.PromptMessageEnum; -import com.xkrs.utils.TokenUtil; import com.xkrs.dao.FirePointDao; -import com.xkrs.straw.dao.SysUserDao; import com.xkrs.model.entity.FirePointEntity; -import com.xkrs.straw.model.entity.SysUserEntity; -import com.xkrs.model.qo.AuditFireTypeQo; import com.xkrs.model.qo.FirePointQo; import com.xkrs.service.FirePointService; import com.xkrs.service.StreetService; import com.xkrs.service.impl.FirePointServiceImpl; +import com.xkrs.straw.dao.SysUserDao; +import com.xkrs.straw.model.entity.SysUserEntity; import com.xkrs.utils.FirePointQueryHelper; +import com.xkrs.utils.TokenUtil; import org.apache.hc.core5.util.TextUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -21,7 +20,6 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.transaction.Transactional; import java.util.ArrayList; import java.util.List; import java.util.Locale; @@ -89,22 +87,6 @@ public class FirePointController { } } - /** - * 在全国火点表中根据火点编码修改审核火点状态 - */ - @Transactional(rollbackOn = Exception.class) - @PostMapping("/updateauditfiretype") - public String updateAuditFireType(@RequestBody AuditFireTypeQo auditFireTypeQo) { - String fireCode = auditFireTypeQo.getFireCode(); - String auditFireType = auditFireTypeQo.getAuditFireType(); - FirePointEntity firePointByFireCode = firePointDao.findByFireCode(fireCode); - if (firePointByFireCode == null) { - return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, "修改失败,没有指定的火点编号", locale); - } - firePointDao.updateAuditFireTypeByFireCode(fireCode, auditFireType); - return outputEncapsulationObject(PromptMessageEnum.SUCCESS, "修改成功", locale); - } - @RequestMapping(value = "/download/vipuserfirepoint", method = RequestMethod.GET) public String downloadVipUserFirePoint(HttpServletResponse response, HttpServletRequest request) { return firePointService.downloadVipUserFilePoint(request, response);