Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
8timerv2
8timerapiv200
Commits
0a8edda1
Commit
0a8edda1
authored
Jan 12, 2022
by
284718418@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码-我的文件图标显示
parent
a06613c2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
src/main/java/cn/timer/api/bean/disk/DiskFiles.java
+10
-4
src/main/resources/mapping/disk/DiskFilesMapper.xml
+2
-2
No files found.
src/main/java/cn/timer/api/bean/disk/DiskFiles.java
View file @
0a8edda1
package
cn
.
timer
.
api
.
bean
.
disk
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
...
...
@@ -10,10 +11,7 @@ import lombok.Builder;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.*
;
import
java.io.Serializable
;
import
java.util.Date
;
...
...
@@ -109,4 +107,12 @@ public class DiskFiles extends Model<DiskFiles> {
*/
@ApiModelProperty
(
value
=
""
)
private
Date
updateTime
;
/**
* 文件图标
*/
@Transient
@TableField
(
exist
=
false
)
@ApiModelProperty
(
value
=
"文件图标"
)
private
String
url
;
}
src/main/resources/mapping/disk/DiskFilesMapper.xml
View file @
0a8edda1
...
...
@@ -21,8 +21,8 @@
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<select
id=
"selectListByParam"
result
Map=
"BaseResultMap
"
>
SELECT f.* FROM `disk_files` f
<select
id=
"selectListByParam"
result
Type=
"cn.timer.api.bean.disk.DiskFiles
"
>
SELECT f.*
,(SELECT url FROM disk_file_image WHERE f.file_type=type AND delete_flag = 0 LIMIT 1) url
FROM `disk_files` f
LEFT JOIN disk_catalogue_files cf ON f.id=cf.files_id AND cf.id > 0
WHERE f.delete_flag=0 AND cf.delete_flag = 0
AND cf.catalogue_id=#{param.parentId}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment