Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
aroad_aqsc
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
许言琪
aroad_aqsc
Commits
2fac209a
提交
2fac209a
authored
6月 27, 2019
作者:
宋文杰
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat(aroad): 解决信息上报模块sql不兼容的问题
上级
102f6660
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
57 行增加
和
28 行删除
+57
-28
EmergencyPlanMapper.xml
...in/resources/mapper/emergencyplan/EmergencyPlanMapper.xml
+11
-11
InfoInformationsMapper.xml
src/main/resources/mapper/info/InfoInformationsMapper.xml
+44
-15
InfoTemplatesMapper.xml
src/main/resources/mapper/info/InfoTemplatesMapper.xml
+2
-2
没有找到文件。
src/main/resources/mapper/emergencyplan/EmergencyPlanMapper.xml
浏览文件 @
2fac209a
...
@@ -40,17 +40,17 @@
...
@@ -40,17 +40,17 @@
<select
id=
"getPlanPage"
resultMap=
"emergencyPlanDtoMap"
>
<select
id=
"getPlanPage"
resultMap=
"emergencyPlanDtoMap"
>
select
select
`plan_id`
,
plan_id
,
`plan_name`
,
plan_name
,
`plan_type`
,
plan_type
,
`plan_level`
,
plan_level
,
`plan_doc_name`
,
plan_doc_name
,
`plan_doc_url`
,
plan_doc_url
,
`plan_keyword`
,
plan_keyword
,
`publish_dept`
,
publish_dept
,
`publish_time`
,
publish_time
,
`publisher`
,
publisher
,
`publisher_id`
publisher_id
from
from
emergency_plan
emergency_plan
<where>
<where>
...
...
src/main/resources/mapper/info/InfoInformationsMapper.xml
浏览文件 @
2fac209a
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
i.info_id,i.template_id,i.info_title,i.info_content,i.info_remark,i.reporter_id,i.reporter,i.reporting_time,
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,
t.template_name,t.template_type,
r.receiver_id,r.receiver_name
r.receiver_id,r.receiver_name
from
`info_templates`
t
from
info_templates
t
right join
right join
info_informations i
info_informations i
on t.template_id = i.template_id
on t.template_id = i.template_id
...
@@ -56,19 +56,48 @@
...
@@ -56,19 +56,48 @@
<!--我上报的信息-->
<!--我上报的信息-->
<select
id=
"getIReported"
resultMap=
"infoMap"
>
<select
id=
"getIReported"
resultMap=
"infoMap"
>
select
SELECT
i.info_id,i.template_id,i.info_title,i.info_content,i.info_remark,i.reporter_id,i.reporter,i.reporting_time,
i.template_id,
t.template_name,t.template_type,
i.info_title,
r.receiver_id,group_concat(r.receiver_name) as receiver_name
i.info_content,
from `info_templates` t
i.info_remark,
right join
i.reporter_id,
info_informations i
i.reporter,
on t.template_id = i.template_id
i.reporting_time,
inner join
T.template_name,
info_receivers r
T.template_type,
on i.info_id = r.info_id
r.info_id,
where i.reporter_id = #{reporterId}
r.receiver_name
group by i.info_id
from
order by i.reporting_time desc
info_templates T RIGHT JOIN info_informations i ON T.template_id = i.template_id
INNER join
(SELECT
i.info_id,
string_agg(r.receiver_name, ',') AS receiver_name
FROM
info_templates
T RIGHT 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
ORDER BY
i.reporting_time DESC) r ON i.info_id = r.info_id
</select>
</select>
<!-- -- 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-->
<!-- -- right 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-->
<!-- -- order by i.reporting_time desc-->
</mapper>
</mapper>
src/main/resources/mapper/info/InfoTemplatesMapper.xml
浏览文件 @
2fac209a
...
@@ -17,11 +17,11 @@
...
@@ -17,11 +17,11 @@
<select
id=
"getInfoTemplatePage"
resultMap=
"infoTemplatesMap"
>
<select
id=
"getInfoTemplatePage"
resultMap=
"infoTemplatesMap"
>
select * from info_templates
select * from info_templates
where create_dept_id = #{createDeptId}
where create_dept_id = #{createDeptId}
and is_del =
0
and is_del =
'0'
</select>
</select>
<!--假删除信息模板-->
<!--假删除信息模板-->
<update
id=
"del"
>
<update
id=
"del"
>
update info_templates set is_del=
1
where template_id = #{templateId}
update info_templates set is_del=
'1'
where template_id = #{templateId}
</update>
</update>
</mapper>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论