From 25e1ddca6447eb8be3a284475829c8f558d6a48f Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Thu, 19 May 2022 13:59:51 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9F=B3=E4=B9=90=E6=92=AD=E6=94=BE=E5=99=A8?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E8=B0=83=E8=AF=95=E6=97=B6=E6=98=A0=E5=B0=84?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yutou/nas/mybatis/model/MusicData.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/yutou/nas/mybatis/model/MusicData.java b/src/main/java/com/yutou/nas/mybatis/model/MusicData.java index d20e01a..cff2dfe 100644 --- a/src/main/java/com/yutou/nas/mybatis/model/MusicData.java +++ b/src/main/java/com/yutou/nas/mybatis/model/MusicData.java @@ -1,6 +1,9 @@ package com.yutou.nas.mybatis.model; +import java.io.File; import java.io.Serializable; + +import com.yutou.nas.utils.AppTools; import lombok.Data; /** @@ -113,5 +116,14 @@ public class MusicData implements Serializable { */ private String md5; + public String getFile() { + if(AppTools.isRuntimeSystemOfWindow()){ + if (file != null) { + file = file.replace("/media/yutou/disk_lvm/public/", "Z:\\").replace("/", File.separator); + } + } + return file; + } + private static final long serialVersionUID = 1L; } \ No newline at end of file