glj-代码提交
This commit is contained in:
parent
c13e038991
commit
c0206ad1c2
|
@ -89,4 +89,9 @@ public class UserVo {
|
|||
|
||||
//国家
|
||||
private String country;
|
||||
|
||||
private Integer byUserStatisticsOne;
|
||||
private Integer byUserStatisticsTwo;
|
||||
private Integer byUserStatisticsThree;
|
||||
private Integer byUserStatisticsFour;
|
||||
}
|
||||
|
|
|
@ -410,5 +410,8 @@ public class DisasterInfoController {
|
|||
return R.data(disasterInfoService.updateById(disasterInfo));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/getByUserDisasterInfoStatistics")
|
||||
public R getByUserDisasterInfo(Long userId) {
|
||||
return R.data(disasterInfoService.getByUserDisasterInfoStatistics(userId));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,15 @@ public interface GuestInfoMapper extends BaseMapper<GuestInfo> {
|
|||
|
||||
UserVo getBladeUserByEmail(@Param("email") String email);
|
||||
|
||||
int updatePassword(String email, String password);
|
||||
int updatePassword(@Param("email") String email,@Param("password") String password);
|
||||
|
||||
int updateAccount(UserVo userVo);
|
||||
int updateAccount(@Param("userVo") UserVo userVo);
|
||||
|
||||
int getByUserStatisticsOne(@Param("userId") Long userId);
|
||||
|
||||
int getByUserStatisticsTwo(@Param("userId") Long userId);
|
||||
|
||||
int getByUserStatisticsThree(@Param("userId") Long userId);
|
||||
|
||||
int getByUserStatisticsFour(@Param("userId") Long userId);
|
||||
}
|
||||
|
|
|
@ -39,4 +39,46 @@
|
|||
email = #{email}
|
||||
</where>
|
||||
</select>
|
||||
<select id="getByUserStatisticsOne" resultType="java.lang.Integer">
|
||||
select count(di.id)
|
||||
FROM disaster_info di
|
||||
inner join guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id
|
||||
inner join guest_info gi on gi.id = gmdr.sponsor_id
|
||||
inner join blade_user bu on bu.email = gi.email
|
||||
<where>
|
||||
bu.id = #{userId}
|
||||
and di.respond_status = 3
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getByUserStatisticsTwo" resultType="java.lang.Integer">
|
||||
select count(di.id)
|
||||
FROM disaster_info di
|
||||
inner join guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id
|
||||
inner join guest_info gi on gi.id = gmdr.sponsor_id
|
||||
inner join blade_user bu on bu.email = gi.email
|
||||
<where>
|
||||
bu.id = #{userId}
|
||||
and di.respond_status = 2
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getByUserStatisticsThree" resultType="java.lang.Integer">
|
||||
select count(ed.id)
|
||||
FROM entity_data ed
|
||||
<where>
|
||||
ed.manager_id = #{userId}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getByUserStatisticsFour" resultType="java.lang.Integer">
|
||||
select count(ed.id)
|
||||
FROM entity_data ed
|
||||
left join guest_manage_disaster_ref gmdr on gmdr.disaster_id = ed.disaster_id
|
||||
<where>
|
||||
gmdr.manager_id = #{userId}
|
||||
and ed.manager_id = null
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -70,4 +70,6 @@ public interface DisasterInfoService extends IService<DisasterInfo> {
|
|||
UserVo getBladeUserByEmail(String email);
|
||||
|
||||
Integer getByUserDisasterInfo(Long userId, Long disasterId);
|
||||
|
||||
UserVo getByUserDisasterInfoStatistics(Long userId);
|
||||
}
|
||||
|
|
|
@ -217,6 +217,24 @@ public class DisasterInfoServiceImpl extends ServiceImpl<DisasterInfoMapper, Dis
|
|||
return guestManageDisasterRefService.count(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserVo getByUserDisasterInfoStatistics(Long userId) {
|
||||
//已响应
|
||||
int byUserStatisticsOne = guestInfoMapper.getByUserStatisticsOne(userId);
|
||||
//正在响应
|
||||
int byUserStatisticsTwo = guestInfoMapper.getByUserStatisticsTwo(userId);
|
||||
//已审核数据数量
|
||||
int byUserStatisticsThree = guestInfoMapper.getByUserStatisticsThree(userId);
|
||||
//待审核数据数量
|
||||
int byUserStatisticsFour = guestInfoMapper.getByUserStatisticsFour(userId);
|
||||
UserVo userVo = new UserVo();
|
||||
userVo.setByUserStatisticsOne(byUserStatisticsOne);
|
||||
userVo.setByUserStatisticsTwo(byUserStatisticsTwo);
|
||||
userVo.setByUserStatisticsThree(byUserStatisticsThree);
|
||||
userVo.setByUserStatisticsFour(byUserStatisticsFour);
|
||||
return userVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台管理系统-控制台灾害各项统计
|
||||
* @description 暂时没有条件查询 所有统计都暂时写在一个查询里面
|
||||
|
|
Loading…
Reference in New Issue