Browse Source

修改图片路径

xusonglin 5 years ago
parent
commit
701c30680e

+ 1 - 1
src/main/java/com/jkcredit/sysnews/service/photo/PhotoServiceImpl.java

@@ -100,7 +100,7 @@ public class PhotoServiceImpl extends BaseService implements PhotoService {
         int month = cal.get(Calendar.MONTH) + 1;
         int month = cal.get(Calendar.MONTH) + 1;
         int year = cal.get(Calendar.YEAR);
         int year = cal.get(Calendar.YEAR);
         String directoryName = year+"-"+month;
         String directoryName = year+"-"+month;
-        String filePath = uploadPath +directoryName + File.separator + fileName;
+        String filePath = uploadPath + File.separator + directoryName + File.separator + fileName;
 
 
         try {
         try {
             UploadUtil.upload(photoDto.getPhoto(), filePath);
             UploadUtil.upload(photoDto.getPhoto(), filePath);