Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
aroad_aqsc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
许言琪
aroad_aqsc
Commits
07e03f79
提交
07e03f79
authored
5月 05, 2019
作者:
宋文杰
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(info information): add reported to me information
上级
06e96cd6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
154 行增加
和
4 行删除
+154
-4
InfoInformationsController.java
...ad/module/info/controller/InfoInformationsController.java
+4
-4
InfoDto.java
...phant/framework/galaxy/aroad/module/info/dto/InfoDto.java
+71
-0
InfoInformationsMapper.java
...laxy/aroad/module/info/mapper/InfoInformationsMapper.java
+14
-0
InfoInformationsService.java
...xy/aroad/module/info/service/InfoInformationsService.java
+15
-0
InfoInformationsServiceImpl.java
...module/info/service/impl/InfoInformationsServiceImpl.java
+18
-0
InfoInformationsMapper.xml
src/main/resources/mapper/info/InfoInformationsMapper.xml
+32
-0
没有找到文件。
src/main/java/com/elephant/framework/galaxy/aroad/module/info/controller/InfoInformationsController.java
浏览文件 @
07e03f79
...
...
@@ -29,12 +29,12 @@ public class InfoInformationsController extends BaseController {
/**
* 分页查询
* @param page 分页对象
* @param
infoInformations 信息表
* @param
receiverId 接收人id
* @return
*/
@GetMapping
(
"/
pag
e"
)
public
R
get
InfoInformationsPage
(
Page
page
,
InfoInformations
infoInformations
)
{
return
new
R
<>(
infoInformationsService
.
page
(
page
,
Wrappers
.
query
(
infoInformations
)
));
@GetMapping
(
"/
reportedToM
e"
)
public
R
get
ReportedToMe
(
Page
page
,
Integer
receiverId
)
{
return
new
R
<>(
infoInformationsService
.
getReportedToMe
(
page
,
receiverId
));
}
...
...
src/main/java/com/elephant/framework/galaxy/aroad/module/info/dto/InfoDto.java
0 → 100644
浏览文件 @
07e03f79
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
info
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @program:
* @description:
* @author: songwenjie
* @create: 2019-05-05 18:46
**/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
InfoDto
implements
Serializable
{
/**
* 信息id
*/
private
Integer
infoId
;
/**
* 信息模板id
*/
private
Integer
templateId
;
/**
* 信息标题
*/
private
String
infoTitle
;
/**
* 信息内容
*/
private
String
infoContent
;
/**
* 信息备注
*/
private
String
infoRemark
;
/**
* 上报人id
*/
private
Integer
reporterId
;
/**
* 上报人
*/
private
String
reporter
;
/**
* 上报时间
*/
private
Date
reportingTime
;
/**
* 模板名称
*/
private
String
templateName
;
/**
* 模板类型
*/
private
String
templateType
;
/**
* 接收人id
*/
private
Integer
receiverId
;
/**
* 接收人姓名
*/
private
String
receiverName
;
}
src/main/java/com/elephant/framework/galaxy/aroad/module/info/mapper/InfoInformationsMapper.java
浏览文件 @
07e03f79
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
info
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.elephant.framework.galaxy.aroad.module.info.dto.InfoDto
;
import
com.elephant.framework.galaxy.aroad.module.info.entity.InfoInformations
;
import
java.util.List
;
/**
* 信息表
*
...
...
@@ -18,4 +23,13 @@ public interface InfoInformationsMapper extends BaseMapper<InfoInformations> {
* @Date: 2019/5/5
*/
Boolean
saveInformations
(
InfoInformations
informations
);
/**
* @Description: 查询报给我的信息
* @Param: [receiverId]
* @return: java.util.List<com.elephant.framework.galaxy.aroad.module.info.dto.InfoDto>
* @Author: songwenjie
* @Date: 2019/5/5
*/
IPage
<
InfoDto
>
getReportedToMe
(
Page
page
,
Integer
receiverId
);
}
src/main/java/com/elephant/framework/galaxy/aroad/module/info/service/InfoInformationsService.java
浏览文件 @
07e03f79
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
info
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.elephant.framework.galaxy.aroad.module.info.dto.InfoDto
;
import
com.elephant.framework.galaxy.aroad.module.info.dto.InfoInformationsDto
;
import
com.elephant.framework.galaxy.aroad.module.info.entity.InfoInformations
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
/**
* 信息表
*
...
...
@@ -21,4 +27,13 @@ public interface InfoInformationsService extends IService<InfoInformations> {
* @Date: 2019/5/5
*/
Boolean
saveInformations
(
InfoInformationsDto
info
);
/**
* @Description: 分页查询报给我的信息
* @Param: [page, receiverId]
* @return: java.util.List<com.elephant.framework.galaxy.aroad.module.info.dto.InfoDto>
* @Author: songwenjie
* @Date: 2019/5/5
*/
public
IPage
<
InfoDto
>
getReportedToMe
(
Page
page
,
Integer
receiverId
);
}
src/main/java/com/elephant/framework/galaxy/aroad/module/info/service/impl/InfoInformationsServiceImpl.java
浏览文件 @
07e03f79
package
com
.
elephant
.
framework
.
galaxy
.
aroad
.
module
.
info
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.elephant.framework.galaxy.aroad.module.attendance.dto.MemberDto
;
import
com.elephant.framework.galaxy.aroad.module.info.dto.InfoDto
;
import
com.elephant.framework.galaxy.aroad.module.info.dto.InfoInformationsDto
;
import
com.elephant.framework.galaxy.aroad.module.info.entity.InfoInformations
;
import
com.elephant.framework.galaxy.aroad.module.info.entity.InfoReceivers
;
...
...
@@ -15,6 +18,9 @@ import org.springframework.transaction.annotation.Transactional;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
* 信息表
...
...
@@ -70,4 +76,16 @@ public class InfoInformationsServiceImpl extends ServiceImpl<InfoInformationsMap
});
return
infoReceiversService
.
saveBatch
(
receivers
);
}
/**
* @Description: 分页查询报给我的信息
* @Param: [page, receiverId]
* @return: java.util.List<com.elephant.framework.galaxy.aroad.module.info.dto.InfoDto>
* @Author: songwenjie
* @Date: 2019/5/5
*/
public
IPage
<
InfoDto
>
getReportedToMe
(
Page
page
,
Integer
receiverId
){
IPage
<
InfoDto
>
infos
=
baseMapper
.
getReportedToMe
(
page
,
receiverId
);
return
infos
;
}
}
src/main/resources/mapper/info/InfoInformationsMapper.xml
浏览文件 @
07e03f79
...
...
@@ -14,10 +14,42 @@
<result
property=
"reportingTime"
column=
"reporting_time"
/>
</resultMap>
<resultMap
id=
"infoMap"
type=
"com.elephant.framework.galaxy.aroad.module.info.dto.InfoDto"
>
<id
property=
"infoId"
column=
"info_id"
/>
<result
property=
"templateId"
column=
"template_id"
/>
<result
property=
"infoTitle"
column=
"info_title"
/>
<result
property=
"infoContent"
column=
"info_content"
/>
<result
property=
"infoRemark"
column=
"info_remark"
/>
<result
property=
"reporterId"
column=
"reporter_id"
/>
<result
property=
"reporter"
column=
"reporter"
/>
<result
property=
"reportingTime"
column=
"reporting_time"
/>
<result
property=
"templateName"
column=
"template_name"
/>
<result
property=
"templateType"
column=
"template_type"
/>
<result
property=
"receiverId"
column=
"receiver_id"
/>
<result
property=
"receiverName"
column=
"receiver_name"
/>
</resultMap>
<insert
id=
"saveInformations"
useGeneratedKeys=
"true"
keyProperty=
"infoId"
>
insert into
info_informations(template_id, info_title,info_content,info_remark,reporter_id,reporter,reporting_time)
values
(#{templateId}, #{infoTitle},#{infoContent},#{infoRemark},#{reporterId},#{reporter},#{reportingTime})
</insert>
<!--报给我的信息-->
<select
id=
"getReportedToMe"
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,r.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 r.receiver_id = #{receiverId}
</select>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论