Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
aa02bcd0
提交
aa02bcd0
authored
9月 09, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改post ——> post_data
上级
671d73d5
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
11 行增加
和
11 行删除
+11
-11
PostDao.xml
...orm-admin/src/main/resources/com/platform/dao/PostDao.xml
+11
-11
没有找到文件。
platform-admin/src/main/resources/com/platform/dao/PostDao.xml
浏览文件 @
aa02bcd0
...
...
@@ -44,12 +44,12 @@
`item_ids`,
`tag_ids`,
`title`
from post
from post
_data
where id = #{id}
</select>
<update
id=
"placedTop"
parameterType=
"com.platform.entity.PostEntity"
>
update post set is_top=#{isTop} where id=#{id}
update post
_data
set is_top=#{isTop} where id=#{id}
</update>
<select
id=
"queryList"
resultType=
"com.platform.vo.PostVo"
>
...
...
@@ -59,7 +59,7 @@
IFNULL(l.likes,0) likes,
u.nick createdBy
FROM
post p
post
_data
p
LEFT JOIN tb_cf_user_info u ON u.user_id=p.user_id
LEFT JOIN ( SELECT count( 1 ) count, post_id FROM `comment` GROUP BY post_id ) c ON p.id = c.post_id
LEFT JOIN ( SELECT count( 1 ) likes, post_id FROM post_like GROUP BY post_id ) l ON p.id = l.post_id
...
...
@@ -91,7 +91,7 @@
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from post
select count(*) from post
_data
WHERE 1=1
<if
test=
"title != null and title.trim() != ''"
>
AND caption LIKE concat('%',#{title},'%')
...
...
@@ -105,7 +105,7 @@
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.PostEntity"
>
insert into post(
insert into post
_data
(
`id`,
`archived`,
`archived_by`,
...
...
@@ -146,7 +146,7 @@
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.PostEntity"
>
update post
update post
_data
<set>
<if
test=
"archived != null"
>
`archived` = #{archived},
</if>
<if
test=
"archivedBy != null"
>
`archived_by` = #{archivedBy},
</if>
...
...
@@ -170,18 +170,18 @@
</update>
<delete
id=
"delete"
>
delete from post where id = #{value}
delete from post
_data
where id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from post where id in
delete from post
_data
where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
<update
id=
"changePostStatus"
>
update post set archived=#{archived} where id in
update post
_data
set archived=#{archived} where id in
<foreach
item=
"id"
collection=
"ids"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
...
...
@@ -189,6 +189,6 @@
<!--统计置顶帖子数量-->
<select
id=
"getPostTopNum"
resultType=
"int"
>
select count(1) from post where is_top=1 and archived=1
select count(1) from post
_data
where is_top=1 and archived=1
</select>
</mapper>
\ No newline at end of file
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论