This commit is contained in:
why 2023-04-08 15:11:47 +08:00
parent c9c43b1a93
commit d8846d4826
5 changed files with 13 additions and 0 deletions

View File

@ -98,6 +98,7 @@ public class DisasterInfoController {
*/ */
@GetMapping("/disasterStatistics") @GetMapping("/disasterStatistics")
public R<List<GroupByUse>> getDisasterStatistics(String name){ public R<List<GroupByUse>> getDisasterStatistics(String name){
//List<GroupByUse> groupByUseList = disasterInfoService.getLeftData();
return R.data(disasterInfoService.getDisasterStatistics(name)); return R.data(disasterInfoService.getDisasterStatistics(name));
} }

View File

@ -34,4 +34,5 @@ public interface DisasterInfoMapper extends BaseMapper<DisasterInfo> {
List<GroupByUse> getDisasterStatistics(@Param("name" ) String name ); List<GroupByUse> getDisasterStatistics(@Param("name" ) String name );
List<GroupByUse> getLeftData();
} }

View File

@ -75,5 +75,8 @@
where d.respond_status=#{respondStatus} where d.respond_status=#{respondStatus}
order by d.disaster_time desc order by d.disaster_time desc
</select> </select>
<select id="getLeftData" resultType="com.kening.vordm.vo.GroupByUse">
select t.sponsor_organization as `name`, count(*) as cnt from disaster_info t GROUP BY t.sponsor_organization ORDER BY cnt desc LIMIT 3
</select>
</mapper> </mapper>

View File

@ -37,4 +37,6 @@ public interface DisasterInfoService extends IService<DisasterInfo> {
IPage<DisasterMangerInfo> getHomeDisaster(IPage<DisasterMangerInfo> page, Integer respondStatus); IPage<DisasterMangerInfo> getHomeDisaster(IPage<DisasterMangerInfo> page, Integer respondStatus);
List<GroupByUse> getLeftData();
} }

View File

@ -88,4 +88,10 @@ implements DisasterInfoService {
return page.setRecords(disasterMangerInfos); return page.setRecords(disasterMangerInfos);
} }
@Override
public List<GroupByUse> getLeftData() {
return this.baseMapper.getLeftData();
}
} }