提交代码
This commit is contained in:
parent
529caef00d
commit
1393e2b840
|
@ -855,4 +855,10 @@ public class DisasterInfoController {
|
|||
return R.data(disasterInfoService.getUserDisasterInfoListNew(Condition.getPage(query), params.get("userId"),params.get("roleId")));
|
||||
}
|
||||
|
||||
//home页面 受影响国家统计
|
||||
@GetMapping("/getAffectedCountryCount")
|
||||
public R<Integer> getAffectedCountryCount() {
|
||||
return R.data(disasterInfoService.getAffectedCountryCount());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -117,4 +117,6 @@ public interface DisasterInfoMapper extends BaseMapper<DisasterInfo> {
|
|||
IPage<DisasterInfo> getUserDisasterInfoListNew(IPage<Object> page, @Param("userId") String userId);
|
||||
|
||||
void updateApplyForCount(@Param("id") Long id);
|
||||
|
||||
Integer getAffectedCountryCount();
|
||||
}
|
||||
|
|
|
@ -1720,4 +1720,9 @@
|
|||
id=#{id}
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<select id="getAffectedCountryCount" resultType="java.lang.Integer">
|
||||
SELECT count(*) FROM
|
||||
(SELECT disaster_country FROM `disaster_info` GROUP BY disaster_country) disaster
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -98,4 +98,6 @@ public interface DisasterInfoService extends IService<DisasterInfo> {
|
|||
IPage<DisasterInfo> getUserDisasterInfoListNew(IPage<Object> page, String userId, String roleId);
|
||||
|
||||
void updateApplyForCount(Long disasterId);
|
||||
|
||||
Integer getAffectedCountryCount();
|
||||
}
|
||||
|
|
|
@ -626,4 +626,9 @@ public class DisasterInfoServiceImpl extends ServiceImpl<DisasterInfoMapper, Dis
|
|||
public void updateApplyForCount(Long disasterId) {
|
||||
baseMapper.updateApplyForCount(disasterId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getAffectedCountryCount() {
|
||||
return baseMapper.getAffectedCountryCount();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue