glj-代码提交
This commit is contained in:
parent
026eb5d0b4
commit
eaa4f0d66d
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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<>();
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue