Commit 5bb0d428 authored by YangZhaoJun1's avatar YangZhaoJun1

修改存入数据库的文件路径

parent 52de1d8b
...@@ -145,10 +145,7 @@ public class BFileServiceImpl implements BFileService { ...@@ -145,10 +145,7 @@ public class BFileServiceImpl implements BFileService {
pathName = global.getPDF_LOCATION();//pdf路径 pathName = global.getPDF_LOCATION();//pdf路径
} }
String oldPath = global.getBASE_UPLOAD_SERVER_LOCATION() + File.separator String oldPath = global.getBASE_UPLOAD_SERVER_LOCATION() + url;
+ global.getCOURSE_LOCATION() + File.separator
+ path.substring(0,path.indexOf(File.separator))
+ url;
String tempPath = global.getBASE_UPLOAD_SERVER_LOCATION() + File.separator String tempPath = global.getBASE_UPLOAD_SERVER_LOCATION() + File.separator
+ global.getCOURSE_LOCATION() + File.separator + global.getCOURSE_LOCATION() + File.separator
...@@ -240,9 +237,7 @@ public class BFileServiceImpl implements BFileService { ...@@ -240,9 +237,7 @@ public class BFileServiceImpl implements BFileService {
byte[] bytes = file.getBytes(); byte[] bytes = file.getBytes();
stream.write(bytes,0,bytes.length); stream.write(bytes,0,bytes.length);
String newPath = path.substring(path.indexOf(File.separator)+1) + File.separator String newPath = realPath.substring(realPath.indexOf(File.separator)+1);
+ bFile.getChapterId() + File.separator
+ pathName + File.separator;
bFile.setVideoName(name+ "." +uploadFileSuffix);//文件名 bFile.setVideoName(name+ "." +uploadFileSuffix);//文件名
if (bFile.getType().equals("0")){ if (bFile.getType().equals("0")){
......
...@@ -8,7 +8,6 @@ import org.springframework.context.annotation.Configuration; ...@@ -8,7 +8,6 @@ import org.springframework.context.annotation.Configuration;
import redis.clients.jedis.JedisPool; import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig; import redis.clients.jedis.JedisPoolConfig;
import static sun.jvm.hotspot.oops.CellTypeState.addr;
/** /**
* Created by lcy on 18/1/8. * Created by lcy on 18/1/8.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment