提交 a27430dd authored 作者: 董吉利's avatar 董吉利

Merge branch 'dev' of http://39.96.70.20:8080/A7/aroad into dev

......@@ -27,7 +27,7 @@ public class InfoInformationsController extends BaseController {
private final InfoInformationsService infoInformationsService;
/**
* 分页查询
* 分页查询上报给我的信息
* @param page 分页对象
* @param receiverId 接收人id
* @return
......@@ -37,6 +37,17 @@ public class InfoInformationsController extends BaseController {
return new R<>(infoInformationsService.getReportedToMe(page,receiverId));
}
/**
* 分页查询我上报的信息
* @param page 分页对象
* @param reporterId 上报人id
* @return
*/
@GetMapping("/iReported")
public R getIReported(Page page, Integer reporterId) {
return new R<>(infoInformationsService.getIReported(page,reporterId));
}
/**
* 通过id查询信息表
......
......@@ -32,4 +32,14 @@ public interface InfoInformationsMapper extends BaseMapper<InfoInformations> {
* @Date: 2019/5/5
*/
IPage<InfoDto> getReportedToMe (Page page, Integer receiverId);
/**
* @Description: 查询我上报的信息
* @Param: [page, reporterId]
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.elephant.framework.galaxy.aroad.module.info.dto.InfoDto>
* @Author: songwenjie
* @Date: 2019/5/6
*/
IPage<InfoDto> getIReported (Page page, Integer reporterId);
}
......@@ -36,4 +36,13 @@ public interface InfoInformationsService extends IService<InfoInformations> {
* @Date: 2019/5/5
*/
public IPage<InfoDto> getReportedToMe (Page page, Integer receiverId);
/**
* @Description: 分页查询我上报的信息
* @Param: [page, reporterId]
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.elephant.framework.galaxy.aroad.module.info.dto.InfoDto>
* @Author: songwenjie
* @Date: 2019/5/6
*/
public IPage<InfoDto> getIReported (Page page, Integer reporterId);
}
......@@ -88,4 +88,17 @@ public class InfoInformationsServiceImpl extends ServiceImpl<InfoInformationsMap
IPage<InfoDto> infos = baseMapper.getReportedToMe(page,receiverId);
return infos;
}
/**
* @Description: 分页查询我上报的信息
* @Param: [page, reporterId]
* @return: com.baomidou.mybatisplus.core.metadata.IPage<com.elephant.framework.galaxy.aroad.module.info.dto.InfoDto>
* @Author: songwenjie
* @Date: 2019/5/6
*/
public IPage<InfoDto> getIReported (Page page, Integer reporterId){
IPage<InfoDto> infos = baseMapper.getIReported(page,reporterId);
infos.getRecords().forEach(i->i.setReceiverName(i.getReceiverName().replaceAll(",",",")));
return infos;
}
}
......@@ -52,4 +52,21 @@
on i.info_id = r.info_id
where r.receiver_id = #{receiverId}
</select>
<!--我上报的信息-->
<select id="getIReported" resultMap="infoMap">
select
i.info_id,i.template_id,i.info_title,i.info_content,i.info_remark,i.reporter_id,i.reporter,i.reporting_time,
t.template_name,t.template_type,
r.receiver_id,group_concat(r.receiver_name) as receiver_name
from `info_templates` t
inner join
info_informations i
on t.template_id = i.template_id
inner join
info_receivers r
on i.info_id = r.info_id
where i.reporter_id = #{reporterId}
group by i.info_id
</select>
</mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论