Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
IEQEFCR
halo
提交
6b46e8a8
H
halo
项目概览
IEQEFCR
/
halo
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
halo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
6b46e8a8
编写于
4月 22, 2019
作者:
RYAN0UP
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Support attachment query by type.
上级
b17e03ac
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
11 addition
and
5 deletion
+11
-5
src/main/java/run/halo/app/model/params/AttachmentQuery.java
src/main/java/run/halo/app/model/params/AttachmentQuery.java
+2
-0
src/main/java/run/halo/app/service/impl/AttachmentServiceImpl.java
...java/run/halo/app/service/impl/AttachmentServiceImpl.java
+6
-0
src/main/resources/templates/common/web/sitemap_html.ftl
src/main/resources/templates/common/web/sitemap_html.ftl
+3
-5
未找到文件。
src/main/java/run/halo/app/model/params/AttachmentQuery.java
浏览文件 @
6b46e8a8
...
...
@@ -17,4 +17,6 @@ public class AttachmentQuery {
private
String
keyword
;
private
String
mediaType
;
private
String
attachmentType
;
}
src/main/java/run/halo/app/service/impl/AttachmentServiceImpl.java
浏览文件 @
6b46e8a8
...
...
@@ -13,8 +13,10 @@ import run.halo.app.handler.file.FileHandlers;
import
run.halo.app.model.dto.AttachmentOutputDTO
;
import
run.halo.app.model.entity.Attachment
;
import
run.halo.app.model.enums.AttachmentType
;
import
run.halo.app.model.enums.converter.AttachmentTypeConverter
;
import
run.halo.app.model.params.AttachmentQuery
;
import
run.halo.app.model.properties.AttachmentProperties
;
import
run.halo.app.model.properties.PropertyEnum
;
import
run.halo.app.model.support.UploadResult
;
import
run.halo.app.repository.AttachmentRepository
;
import
run.halo.app.service.AttachmentService
;
...
...
@@ -73,6 +75,10 @@ public class AttachmentServiceImpl extends AbstractCrudService<Attachment, Integ
predicates
.
add
(
criteriaBuilder
.
equal
(
root
.
get
(
"mediaType"
),
attachmentQuery
.
getMediaType
()));
}
if
(
attachmentQuery
.
getAttachmentType
()
!=
null
){
predicates
.
add
(
criteriaBuilder
.
equal
(
root
.
get
(
"type"
),
PropertyEnum
.
convertToEnum
(
attachmentQuery
.
getAttachmentType
(),
AttachmentType
.
class
)));
}
if
(
attachmentQuery
.
getKeyword
()
!=
null
)
{
String
likeCondition
=
String
.
format
(
"%%%s%%"
,
StringUtils
.
strip
(
attachmentQuery
.
getKeyword
()));
...
...
src/main/resources/templates/common/web/sitemap_html.ftl
浏览文件 @
6b46e8a8
...
...
@@ -20,8 +20,8 @@ see https://gitee.com/yadong.zhang/DBlog/blob/master/blog-web/src/main/java/com/
#myTable
{
list-style
:
none
;
margin
:
10px
0
px
10px
0px
;
padding
:
0
px
;
margin
:
10px
0
10px
0
;
padding
:
0
;
width
:
100%
;
min-width
:
804px
;
}
...
...
@@ -80,7 +80,7 @@ see https://gitee.com/yadong.zhang/DBlog/blob/master/blog-web/src/main/java/com/
#footer
{
padding
:
2px
;
margin
:
0
px
;
margin
:
0
;
font-size
:
8pt
;
color
:
gray
;
min-width
:
900px
;
...
...
@@ -103,7 +103,6 @@ see https://gitee.com/yadong.zhang/DBlog/blob/master/blog-web/src/main/java/com/
margin-top
:
10px
;
}
/* 窗口缩小到768px以下时 */
@media
(
max-width
:
768px
)
{
.T2-h
,
.T3-h
,
.T4-h
,
.T2
,
.T3
,
.T4
{
display
:
none
;
...
...
@@ -118,7 +117,6 @@ see https://gitee.com/yadong.zhang/DBlog/blob/master/blog-web/src/main/java/com/
}
}
/* 窗口放大到768px以上时 */
@media
(
min-width
:
768px
)
{
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录