This commit is contained in:
parent
c9c43b1a93
commit
d8846d4826
|
@ -98,6 +98,7 @@ public class DisasterInfoController {
|
|||
*/
|
||||
@GetMapping("/disasterStatistics")
|
||||
public R<List<GroupByUse>> getDisasterStatistics(String name){
|
||||
//List<GroupByUse> groupByUseList = disasterInfoService.getLeftData();
|
||||
return R.data(disasterInfoService.getDisasterStatistics(name));
|
||||
}
|
||||
|
||||
|
|
|
@ -34,4 +34,5 @@ public interface DisasterInfoMapper extends BaseMapper<DisasterInfo> {
|
|||
|
||||
List<GroupByUse> getDisasterStatistics(@Param("name" ) String name );
|
||||
|
||||
List<GroupByUse> getLeftData();
|
||||
}
|
||||
|
|
|
@ -75,5 +75,8 @@
|
|||
where d.respond_status=#{respondStatus}
|
||||
order by d.disaster_time desc
|
||||
</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>
|
||||
|
|
|
@ -37,4 +37,6 @@ public interface DisasterInfoService extends IService<DisasterInfo> {
|
|||
|
||||
|
||||
IPage<DisasterMangerInfo> getHomeDisaster(IPage<DisasterMangerInfo> page, Integer respondStatus);
|
||||
|
||||
List<GroupByUse> getLeftData();
|
||||
}
|
||||
|
|
|
@ -88,4 +88,10 @@ implements DisasterInfoService {
|
|||
return page.setRecords(disasterMangerInfos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GroupByUse> getLeftData() {
|
||||
|
||||
return this.baseMapper.getLeftData();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue