mirror of
https://github.com/zfile-dev/zfile.git
synced 2025-04-19 05:34:52 +00:00
✨ 下载日志增加下载类型功能
This commit is contained in:
@@ -27,6 +27,10 @@ import java.util.Date;
|
|||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class DownloadLog implements Serializable {
|
public class DownloadLog implements Serializable {
|
||||||
|
|
||||||
|
public static final String DOWNLOAD_TYPE_DIRECT_LINK = "directLink";
|
||||||
|
|
||||||
|
public static final String DOWNLOAD_TYPE_SHORT_LINK = "shortLink";
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@TableId(value = "id", type = IdType.INPUT)
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
@@ -34,6 +38,11 @@ public class DownloadLog implements Serializable {
|
|||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField(value = "`download_type`")
|
||||||
|
@ApiModelProperty(value="下载类型", example = "directLink", allowableValues = "directLink, shortLink")
|
||||||
|
private String downloadType;
|
||||||
|
|
||||||
|
|
||||||
@TableField(value = "`path`")
|
@TableField(value = "`path`")
|
||||||
@ApiModelProperty(value="文件路径")
|
@ApiModelProperty(value="文件路径")
|
||||||
private String path;
|
private String path;
|
||||||
@@ -68,7 +77,8 @@ public class DownloadLog implements Serializable {
|
|||||||
@ApiModelProperty(value="访问 referer")
|
@ApiModelProperty(value="访问 referer")
|
||||||
private String referer;
|
private String referer;
|
||||||
|
|
||||||
public DownloadLog(String path, String storageKey, String shortKey) {
|
public DownloadLog(String downloadType, String path, String storageKey, String shortKey) {
|
||||||
|
this.downloadType = downloadType;
|
||||||
this.path = path;
|
this.path = path;
|
||||||
this.storageKey = storageKey;
|
this.storageKey = storageKey;
|
||||||
this.shortKey = shortKey;
|
this.shortKey = shortKey;
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table download_log add download_type varchar(32);
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table download_log add download_type varchar(32);
|
||||||
@@ -12,10 +12,11 @@
|
|||||||
<result column="ip" jdbcType="VARCHAR" property="ip" />
|
<result column="ip" jdbcType="VARCHAR" property="ip" />
|
||||||
<result column="user_agent" jdbcType="VARCHAR" property="userAgent" />
|
<result column="user_agent" jdbcType="VARCHAR" property="userAgent" />
|
||||||
<result column="referer" jdbcType="VARCHAR" property="referer" />
|
<result column="referer" jdbcType="VARCHAR" property="referer" />
|
||||||
|
<result column="download_type" jdbcType="VARCHAR" property="downloadType" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
`id`, `path`, `storage_key`, `create_time`, `ip`, `user_agent`, `referer`, `short_key`
|
`id`, `path`, `storage_key`, `create_time`, `ip`, `user_agent`, `referer`, `short_key`, `download_type`
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<delete id="deleteByStorageKey">
|
<delete id="deleteByStorageKey">
|
||||||
|
|||||||
Reference in New Issue
Block a user