Commit 4f3bc86c authored by hanfeng's avatar hanfeng

Merge branch 'master_activity' into dev

parents 45819286 ba0802ac
...@@ -97,7 +97,7 @@ public class UserBiz extends BaseBiz<UserMapper, User> { ...@@ -97,7 +97,7 @@ public class UserBiz extends BaseBiz<UserMapper, User> {
log.info("----code为空---"); log.info("----code为空---");
throw new BaseException(ResultCode.FAILED_CODE, Sets.newSet("code为空")); throw new BaseException(ResultCode.FAILED_CODE, Sets.newSet("code为空"));
} }
String openid = "oXDd91MppH9i5F7xzPwigiMj--5w"; String openid = "oXDd91N8Rwijd3gscAND9TO77a2I";
/*String access_token = null; /*String access_token = null;
try { try {
JSONObject jsonData = weixinService.getAccessToken(code); JSONObject jsonData = weixinService.getAccessToken(code);
......
...@@ -61,7 +61,7 @@ public class UploadZipServiceImpl implements UploadZipService { ...@@ -61,7 +61,7 @@ public class UploadZipServiceImpl implements UploadZipService {
log.error("zip file save to " + uploadPath + " error", e.getMessage(), e); log.error("zip file save to " + uploadPath + " error", e.getMessage(), e);
return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE,"保存压缩文件到:" + uploadPath + " 失败!"); return ObjectRestResponse.createFailedResult(ResultCode.FAILED_CODE,"保存压缩文件到:" + uploadPath + " 失败!");
} }
//zip压缩包解压 //zip压缩包解压
return unPackZip(file, prefix); return unPackZip(file, prefix);
} }
...@@ -77,7 +77,7 @@ public class UploadZipServiceImpl implements UploadZipService { ...@@ -77,7 +77,7 @@ public class UploadZipServiceImpl implements UploadZipService {
while (entries.hasMoreElements()) { while (entries.hasMoreElements()) {
ZipEntry entry = entries.nextElement(); ZipEntry entry = entries.nextElement();
if (entry.isDirectory() && index++ == 0) { if (entry.isDirectory() && index++ == 0) {
File dir = new File(uploadPath+dirPathToday); File dir = new File(uploadPath+File.separator+dirPathToday);
dir.mkdir(); dir.mkdir();
} else if (!entry.isDirectory()) { } else if (!entry.isDirectory()) {
...@@ -89,12 +89,11 @@ public class UploadZipServiceImpl implements UploadZipService { ...@@ -89,12 +89,11 @@ public class UploadZipServiceImpl implements UploadZipService {
String format = name.substring(name.lastIndexOf(".")); String format = name.substring(name.lastIndexOf("."));
if (PHOTO_FORMAT.contains(format)) { if (PHOTO_FORMAT.contains(format)) {
String realFileRelPath = dirPathToday + File.separator + no +format; String realFileRelPath = dirPathToday + File.separator + no +format;
File targetFile = new File(uploadPath+realFileRelPath); File targetFile = new File(uploadPath+File.separator+realFileRelPath);
FileUtils.copyInputStreamToFile(zipFile.getInputStream(entry),targetFile); FileUtils.copyInputStreamToFile(zipFile.getInputStream(entry),targetFile);
realFileRelPath=xx_url+ SystemConfig.XXMP_URL+realFileRelPath; realFileRelPath=xx_url+ SystemConfig.XXMP_URL+File.separator+realFileRelPath;
result.append(realFileRelPath+","); result.append(realFileRelPath+",");
} }
} }
} }
result.substring(0,result.length()-1); result.substring(0,result.length()-1);
......
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