diff --git a/src/main/java/com/xkrs/straw/controller/FirePointController.java b/src/main/java/com/xkrs/straw/controller/FirePointController.java index 080da37..eef3166 100644 --- a/src/main/java/com/xkrs/straw/controller/FirePointController.java +++ b/src/main/java/com/xkrs/straw/controller/FirePointController.java @@ -8,11 +8,8 @@ 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.straw.utils.FirePointQueryManager; 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; import org.springframework.context.i18n.LocaleContextHolder; @@ -126,7 +123,7 @@ public class FirePointController { @PostMapping("/selectFirePoint") public String selectFirePoint(@RequestHeader(value = "Authorization") String token, @RequestBody Map map) { // 区县编码 - String cityCode = (String) map.get("cityCode"); + String code = (String) map.get("cityCode"); // 开始时间 String startTime = (String) map.get("startTime"); // 结束时间 @@ -135,16 +132,7 @@ public class FirePointController { String satelliteType = (String) map.get("satelliteType"); // 植被类型 String landType = (String) map.get("landType"); - // 验证token - String tokenUserName = TokenUtil.obtainUserNameByToken(token); - SysUserEntity sysUserEntity = sysUserDao.selectByUserName(tokenUserName); - // 用于查询的区划编码,可能是省市区县街道任意级别 - String queryCode = TextUtils.isEmpty(cityCode) ? sysUserEntity.getCountyCode() : cityCode; - List firePointList = firePointQueryHelper.queryFirePoint(queryCode, startTime, endTime, satelliteType, landType); - if (firePointList == null || firePointList.size() == 0) { - return outputEncapsulationObject(PromptMessageEnum.DATA_NONE, "暂时还没有火点数据", locale); - } - return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointList, locale); + return firePointService.queryFirePoint(token, code, startTime, endTime, satelliteType, landType); } /**