This commit is contained in:
liuchengqian 2023-03-07 10:14:14 +08:00
parent e07ed9ecc1
commit 52bf40ac8c
5 changed files with 40 additions and 4 deletions

View File

@ -39,6 +39,7 @@ class WebSecurityConfig extends WebSecurityConfigurerAdapter {
.antMatchers("/queryFirePoint").permitAll()
.antMatchers(HttpMethod.POST, "/insertFirePoint").permitAll()
.antMatchers(HttpMethod.POST, "/insertFirePointChannelPrecise").permitAll()
.antMatchers(HttpMethod.GET, "/queryFirePointBroadcast").permitAll()
.antMatchers(HttpMethod.POST, "/api/user/updateSysUser").permitAll()
.antMatchers(HttpMethod.GET, "/selectGlobalConfigDict").permitAll()
.antMatchers(HttpMethod.GET, "/selectGlobalConfigValue").permitAll()

View File

@ -7,10 +7,7 @@ import com.xkrs.straw.service.DispatchFirePointService;
import com.xkrs.straw.utils.FirePointSubscribeManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@ -73,4 +70,15 @@ public class DispatchFirePointController {
return firePointService.insertFirePointChannelPrecise(firePointQo);
}
/**
* 查询火点播报无token
*
* @param limit 最大数量
*/
@GetMapping("/queryFirePointBroadcast")
public String queryFirePointBroadcast(@RequestParam("limit") Integer limit) {
return firePointService.queryFirePointBroadcast(limit);
}
}

View File

@ -14,4 +14,10 @@ public interface DispatchFirePointService {
*/
String insertFirePointChannelPrecise(AllFirePointQo firePointQo);
/**
* 查询火点播报无token
*
* @param limit 最大数量
*/
String queryFirePointBroadcast(Integer limit);
}

View File

@ -9,6 +9,7 @@ import com.xkrs.straw.dao.FirePointPreciseDao;
import com.xkrs.straw.dao.SysUserDao;
import com.xkrs.straw.helper.GeoCodeHelper;
import com.xkrs.straw.model.bean.DataWrapper2;
import com.xkrs.straw.model.bean.FirePointQueryResultBean;
import com.xkrs.straw.model.entity.FirePointChannelConfigEntity;
import com.xkrs.straw.model.entity.FirePointOrdinaryEntity;
import com.xkrs.straw.model.entity.FirePointPreciseEntity;
@ -301,4 +302,19 @@ public class DispatchFirePointServiceImpl implements DispatchFirePointService {
}
}
/**
* 查询火点播报无token
*
* @param limit 最大数量
*/
@Override
public String queryFirePointBroadcast(Integer limit) {
FirePointQueryResultBean firePointQueryResult = firePointQueryManager.queryFirePointBroadcast(limit);
if (firePointQueryResult.isSuccess()) {
return outputEncapsulationObject(PromptMessageEnum.SUCCESS, firePointQueryResult.getList(), locale);
} else {
return outputEncapsulationObject(PromptMessageEnum.PROCESS_FAIL, firePointQueryResult.getErrorMessage(), locale);
}
}
}

View File

@ -38,6 +38,11 @@ public class FirePointQueryManager {
@Resource
private FirePointPreciseDao firePointPreciseDao;
/**
* 查询火点播报无token
*
* @param limit 最大数量
*/
public FirePointQueryResultBean queryFirePointBroadcast(Integer limit) {
int size = (limit != null && limit > 0) ? limit : 10;
PageRequest pageRequest = PageRequest.of(1, size, Sort.by(Sort.Direction.DESC, "satelliteTime"));