glj-代码提交

This commit is contained in:
glj 2023-05-06 14:52:20 +08:00
parent 026eb5d0b4
commit eaa4f0d66d
3 changed files with 10 additions and 1 deletions

View File

@ -336,6 +336,12 @@ public class DisasterInfoController {
@ApiOperation(value = "提交", notes = "传入Tool")
@PostMapping("/submit")
public R submit(@ApiParam(value = "Tool对象", required = true) @RequestBody DisasterInfo disasterInfo) {
LambdaQueryWrapper<GuestManageDisasterRef> qw = new LambdaQueryWrapper<>();
qw.eq(GuestManageDisasterRef::getDisasterId,disasterInfo.getId());
GuestManageDisasterRef one = guestManageDisasterRefService.getOne(qw);
one.setStatus(1);
one.setManagerId(disasterInfo.getChiefId());
guestManageDisasterRefService.updateById(one);
return R.status(disasterInfoService.saveOrUpdate(disasterInfo));
}

View File

@ -72,6 +72,7 @@ public class NewsController {
IPage<News> pages = newsService.page(Condition.getPage(query), queryWrapper);
return R.data(pages);
}
@PostMapping("review")
public R<Boolean> review(String ids ,Integer status){
UpdateWrapper<News> updateWrapper = new UpdateWrapper<>();

View File

@ -356,12 +356,14 @@
</select>
<select id="chiefData" resultType="java.util.Map">
SELECT b.`name`, count(*) as val FROM disaster_info t INNER JOIN blade_user b on t.chief_id = b.id
where date_format(t.disaster_time,'%Y') = #{year} GROUP BY b.`name` ORDER BY val desc limit 10
where date_format(t.disaster_time,'%Y') = #{year} and b.`name` != "超级管理员" GROUP BY b.`name` ORDER BY val desc limit 10
</select>
<select id="adminData" resultType="java.util.Map">
SELECT b.`name`, count(*) as val FROM guest_manage_disaster_ref t INNER JOIN blade_user b on t.manager_id = b.id INNER JOIN disaster_info d on d.id = t.disaster_id
where date_format(d.disaster_time,'%Y') = #{year} and b.role_id = '1123598816738675204' GROUP BY b.`name` ORDER BY val desc limit 10
</select>
<select id="disasterNum" resultType="java.util.Map">
SELECT d.dict_value as `name`, count(1) as val FROM disaster_info t INNER JOIN blade_dict_biz d on t.disaster_type = d.dict_key
where date_format(t.disaster_time,'%Y') = #{year} GROUP BY d.dict_value