Browse Source

连接common

master
zy_Java 5 years ago
parent
commit
e5f818407b
  1. 8
      src/main/java/com/ccsens/filedeal/service/FileService.java
  2. 8
      src/main/java/com/ccsens/filedeal/service/IFileService.java
  3. 2
      src/main/resources/druid-dev.yml
  4. 2
      src/main/resources/druid-prod.yml

8
src/main/java/com/ccsens/filedeal/service/FileService.java

@ -57,7 +57,7 @@ public class FileService extends AbstractRedisService implements IFileService {
@Override
public List<FileVo.Upload> saveFileMultiple(String dir, List<Part> files, long userId) throws IOException, BaseException {
public List<FileVo.Upload> saveFileMultiple(String dir, List<Part> files, Long userId) throws IOException, BaseException {
List<FileVo.Upload> fileList = new ArrayList<>();
String allowedExt = WebConstant.FILE_TYPE_ALL;
for (Part file: files) {
@ -230,13 +230,13 @@ public class FileService extends AbstractRedisService implements IFileService {
}
@Override
public FileVo.Upload saveFileSingle(String dir, Part file, long userId) throws IOException, BaseException {
public FileVo.Upload saveFileSingle(String dir, Part file, Long userId) throws IOException, BaseException {
String allowedExt = WebConstant.FILE_TYPE_ALL;
return getFileCommit(dir, allowedExt, file, userId);
}
@Override
public FileVo.BigFile uploadBigFile(FileDto.MultipartFileUpload fileUpload, long userId) throws IOException {
public FileVo.BigFile uploadBigFile(FileDto.MultipartFileUpload fileUpload, Long userId) throws IOException {
long t1 = System.currentTimeMillis();
FileVo.BigFile bigFile = new FileVo.BigFile();
bigFile.setChunkNum(fileUpload.getChunkNum());
@ -371,7 +371,7 @@ public class FileService extends AbstractRedisService implements IFileService {
}
@Override
public FileVo.BigFileCheck bigFileCheck(FileDto.BigFileCheck fileCheck, long userId) throws IOException {
public FileVo.BigFileCheck bigFileCheck(FileDto.BigFileCheck fileCheck, Long userId) throws IOException {
log.info("文件检查:{},{}", fileCheck, userId);
FileVo.BigFileCheck check = new FileVo.BigFileCheck();

8
src/main/java/com/ccsens/filedeal/service/IFileService.java

@ -22,7 +22,7 @@ public interface IFileService {
* @throws IOException 文件读写异常
* @throws BaseException 文件存储异常
*/
List<FileVo.Upload> saveFileMultiple(String dir, List<Part> files, long userId) throws IOException, BaseException;
List<FileVo.Upload> saveFileMultiple(String dir, List<Part> files, Long userId) throws IOException, BaseException;
/**
* 根据ID查询数据
@ -49,7 +49,7 @@ public interface IFileService {
* @throws IOException 文件读写异常
* @throws BaseException 文件存储异常
*/
FileVo.Upload saveFileSingle(String dir, Part file, long userId) throws IOException, BaseException;
FileVo.Upload saveFileSingle(String dir, Part file, Long userId) throws IOException, BaseException;
/**
* 大文件分块上传
@ -57,7 +57,7 @@ public interface IFileService {
* @param userId
* @return 上传结果
*/
FileVo.BigFile uploadBigFile(FileDto.MultipartFileUpload fileUpload, long userId) throws IOException;
FileVo.BigFile uploadBigFile(FileDto.MultipartFileUpload fileUpload, Long userId) throws IOException;
/**
* 大文件检查
@ -65,7 +65,7 @@ public interface IFileService {
* @param userId
* @return
*/
FileVo.BigFileCheck bigFileCheck(FileDto.BigFileCheck fileCheck, long userId) throws IOException;
FileVo.BigFileCheck bigFileCheck(FileDto.BigFileCheck fileCheck, Long userId) throws IOException;
/**
* 通过id批量查询文件信息

2
src/main/resources/druid-dev.yml

@ -27,7 +27,7 @@ spring:
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
url: jdbc:mysql://49.233.89.188:3306/filedeal?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
url: jdbc:mysql://49.233.89.188:3306/common?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username: root
validationQuery: SELECT 1 FROM DUAL
env: CCSENS_TALL

2
src/main/resources/druid-prod.yml

@ -28,7 +28,7 @@ spring:
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
url: jdbc:mysql://127.0.0.1/filedeal?useUnicode=true&characterEncoding=UTF-8
url: jdbc:mysql://127.0.0.1/common?useUnicode=true&characterEncoding=UTF-8
username: root
validationQuery: SELECT 1 FROM DUAL
env: CCSENS_HEALTH
Loading…
Cancel
Save