Commit 79abd131 by qwmqiuwenmin

fix

parent c948826b
......@@ -170,7 +170,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
oldUrl = old.getLink();
}
if(fileType != null && !url.equals(oldUrl)){
JSONResponse jp = qywxSuiteApiService.uploadMedia(enterprise.getCorpid(), config.getWxSuiteid(), getFileByte(url), fileType.getCode());
JSONResponse jp = qywxSuiteApiService.uploadMedia(enterprise.getCorpid(), config.getWxSuiteid(), getFileByte(url),url.split(".")[1], fileType.getCode());
if(jp.getErrorCode() == 0){
materialDTO.setWxLastUploadTime(new Date());
materialDTO.setMediaId(jp.getResult().toString());
......@@ -209,7 +209,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
fileType = QywxMediaTypeEnum.FILE;
url = old.getLink();
}
JSONResponse jp = qywxSuiteApiService.uploadMedia(enterprise.getCorpid(), config.getWxSuiteid(), getFileByte(url), fileType.getCode());
JSONResponse jp = qywxSuiteApiService.uploadMedia(enterprise.getCorpid(), config.getWxSuiteid(), getFileByte(url),url.split(".")[1], fileType.getCode());
if(jp.getErrorCode() == 0){
old.setWxLastUploadTime(new Date());
old.setMediaId(jp.getResult().toString());
......
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