修改应用功能的文件位置
This commit is contained in:
parent
36e2554c30
commit
07edf76a7c
|
@ -13,4 +13,6 @@ spring:
|
|||
url: jdbc:mysql://hzya.ufyct.com:9096/businesscenternew?serverTimezone=UTC&useUnicode=true&characterEncoding=UTF8&serverTimezone=GMT%2B8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowLoadLocalInfile=false&autoReconnect=true&failOverReadOnly=false&connectTimeout=30000&socketTimeout=30000&autoReconnectForPools=true
|
||||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
path: /Users/apple/Desktop/log/dev
|
|
@ -4,6 +4,7 @@ logging:
|
|||
level:
|
||||
root: info
|
||||
file:
|
||||
# 日志保存路径
|
||||
path: /Users/apple/Desktop/log/local
|
||||
spring:
|
||||
datasource:
|
||||
|
@ -14,3 +15,6 @@ spring:
|
|||
username: root
|
||||
password: bd993088e8a7c3dc5f44441617f9b4bf
|
||||
driver-class-name: com.mysql.jdbc.Driver # 3.2.0开始支持SPI可省略此配置
|
||||
savefile:
|
||||
# 文件保存路径
|
||||
path: /Users/apple/Desktop/log/local
|
|
@ -1,14 +0,0 @@
|
|||
package com.hzya.frame.fileutil;
|
||||
|
||||
/**
|
||||
* @Content 定义针对文件的常量类
|
||||
* @Author gjh
|
||||
* @Date 2019/3/14 16:11
|
||||
* @Version 1.0
|
||||
*/
|
||||
public class ConstantClassField {
|
||||
|
||||
//public static final String DSK = "/Users/apple/myself/file";
|
||||
public static final String DSK = "/home/webservice/zt/file";
|
||||
|
||||
}
|
|
@ -4,7 +4,6 @@ import cn.dev33.satoken.stp.StpUtil;
|
|||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.hzya.frame.basedao.service.impl.BaseService;
|
||||
import com.hzya.frame.dateutil.DateUtil;
|
||||
import com.hzya.frame.fileutil.ConstantClassField;
|
||||
import com.hzya.frame.fileutil.FileUtils;
|
||||
import com.hzya.frame.sys.businessFile.dao.IBusinessFileDao;
|
||||
import com.hzya.frame.sys.businessFile.entity.BusinessFileEntity;
|
||||
|
@ -17,6 +16,7 @@ import com.hzya.frame.uuid.UUIDLong;
|
|||
import com.hzya.frame.web.action.SessionContext;
|
||||
import com.hzya.frame.web.exception.BaseSystemException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
@ -36,6 +36,8 @@ import java.util.List;
|
|||
*/
|
||||
@Service(value = "sys_fileUploadService")
|
||||
public class FileUploadServiceImpl extends BaseService<FileUploadEntity, Long> implements IFileUploadService {
|
||||
@Value("${savefile.path}")
|
||||
public String DSK;
|
||||
|
||||
protected IFileUploadDao fileUploadDao;
|
||||
|
||||
|
@ -54,7 +56,7 @@ public class FileUploadServiceImpl extends BaseService<FileUploadEntity, Long> i
|
|||
/** 获取系统设置文件存放的盘符*/
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
/** 获取根目录*/
|
||||
stringBuffer.append(ConstantClassField.DSK);
|
||||
stringBuffer.append(DSK);
|
||||
/** 根据当前日期创建文件目录*/
|
||||
String nowDateString = DateUtil.dateToString(new Date(), "yyyy-MM-dd");
|
||||
|
||||
|
@ -89,7 +91,7 @@ public class FileUploadServiceImpl extends BaseService<FileUploadEntity, Long> i
|
|||
/** 获取系统设置文件存放的盘符*/
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
/** 获取根目录*/
|
||||
stringBuffer.append(ConstantClassField.DSK);
|
||||
stringBuffer.append(DSK);
|
||||
/** 获取当前人所在的公司,用ID和公司名称拼接*/
|
||||
// stringBuffer.append("/" + userEntity.getOrg_name() + "_" + userEntity.getOrg_id());
|
||||
/** 根据当前日期创建文件目录*/
|
||||
|
@ -143,7 +145,7 @@ public class FileUploadServiceImpl extends BaseService<FileUploadEntity, Long> i
|
|||
/** 获取系统设置文件存放的盘符*/
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
/** 获取根目录*/
|
||||
stringBuffer.append(ConstantClassField.DSK);
|
||||
stringBuffer.append(DSK);
|
||||
/** 获取当前人所在的公司,用ID和公司名称拼接*/
|
||||
// stringBuffer.append("/" + userEntity.getOrg_name() + "_" + userEntity.getOrg_id());
|
||||
/** 获取单票ID,判断单票ID是否存在*/
|
||||
|
@ -215,7 +217,7 @@ public class FileUploadServiceImpl extends BaseService<FileUploadEntity, Long> i
|
|||
/** 获取系统设置文件存放的盘符*/
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
/** 获取根目录*/
|
||||
stringBuffer.append(ConstantClassField.DSK);
|
||||
stringBuffer.append(DSK);
|
||||
/** 获取当前人所在的公司,用ID和公司名称拼接*/
|
||||
// stringBuffer.append("/" + userEntity.getOrg_name() + "_" + userEntity.getOrg_id());
|
||||
/** 根据当前日期创建文件目录*/
|
||||
|
|
Loading…
Reference in New Issue