Commit 4319ea50 by 徐高华

自建

parent a22a34f4
...@@ -27,6 +27,7 @@ import com.gic.haoban.manage.service.entity.TabMaterialContent; ...@@ -27,6 +27,7 @@ import com.gic.haoban.manage.service.entity.TabMaterialContent;
import com.gic.haoban.manage.service.service.MaterialService; import com.gic.haoban.manage.service.service.MaterialService;
import com.gic.haoban.manage.service.service.WxEnterpriseService; import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.haoban.manage.service.util.CommonUtil; import com.gic.haoban.manage.service.util.CommonUtil;
import com.gic.haoban.manage.service.util.QwUtils;
import com.gic.wechat.api.enums.QywxMediaTypeEnum; import com.gic.wechat.api.enums.QywxMediaTypeEnum;
import com.gic.wechat.api.service.qywx.QywxSuiteApiService; import com.gic.wechat.api.service.qywx.QywxSuiteApiService;
import com.gic.weimob.common.Md5Util; import com.gic.weimob.common.Md5Util;
...@@ -215,11 +216,7 @@ public class MaterialServiceImpl implements MaterialService { ...@@ -215,11 +216,7 @@ public class MaterialServiceImpl implements MaterialService {
arr = url.split("/"); arr = url.split("/");
} }
int count = arr.length; int count = arr.length;
String secret = config.getWxSuiteid() ;
boolean selfFlag = qwDTO.isSelf() ; boolean selfFlag = qwDTO.isSelf() ;
if(selfFlag) {
secret = qwDTO.getSelfSecret() ;
}
if(qwUploadFrom==2) { if(qwUploadFrom==2) {
// 朋友圈上传接口 // 朋友圈上传接口
if (type == 2) { if (type == 2) {
...@@ -230,10 +227,10 @@ public class MaterialServiceImpl implements MaterialService { ...@@ -230,10 +227,10 @@ public class MaterialServiceImpl implements MaterialService {
url+= "?imageView2/2/w/1440/h/1080" ; url+= "?imageView2/2/w/1440/h/1080" ;
logger.info("url={}",url); logger.info("url={}",url);
} }
jp = qywxSuiteApiService.uploadAttachment(qwDTO.getThirdCorpid(), secret, CommonUtil.getFileByte(url), arr[count - 1], fileType.getCode() , selfFlag); jp = qywxSuiteApiService.uploadAttachment(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), url, arr[count - 1], fileType.getCode() , selfFlag , qwDTO.getUrlHost());
}else { }else {
// 群发上传 // 群发上传
jp = qywxSuiteApiService.uploadMedia(qwDTO.getThirdCorpid(), secret, CommonUtil.getFileByte(url), arr[count - 1], fileType.getCode() , selfFlag); jp = qywxSuiteApiService.uploadMedia(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), url, arr[count - 1], fileType.getCode() , selfFlag , qwDTO.getUrlHost());
} }
if (jp.getErrorCode() == 0) { if (jp.getErrorCode() == 0) {
if(from==1) { if(from==1) {
......
...@@ -110,7 +110,7 @@ public class QywxSendServiceImpl implements QywxSendService { ...@@ -110,7 +110,7 @@ public class QywxSendServiceImpl implements QywxSendService {
JSONResponse respon = null ; JSONResponse respon = null ;
if(qwDTO.isSelf()) { if(qwDTO.isSelf()) {
respon = qywxSuiteApiService.sendExternalMessageSelf(qwDTO.getThirdCorpid(), qwDTO.getSelfSecret(), respon = qywxSuiteApiService.sendExternalMessageSelf(qwDTO.getThirdCorpid(), qwDTO.getSelfSecret(),
messageDTO); messageDTO , qwDTO.getUrlHost());
}else { }else {
respon = qywxSuiteApiService.sendExternalMessage(qwDTO.getThirdCorpid(), config.getWxSuiteid(), respon = qywxSuiteApiService.sendExternalMessage(qwDTO.getThirdCorpid(), config.getWxSuiteid(),
messageDTO); messageDTO);
......
...@@ -48,8 +48,8 @@ import com.gic.haoban.manage.service.service.StaffClerkRelationService; ...@@ -48,8 +48,8 @@ import com.gic.haoban.manage.service.service.StaffClerkRelationService;
import com.gic.haoban.manage.service.service.WelcomeSendService; import com.gic.haoban.manage.service.service.WelcomeSendService;
import com.gic.haoban.manage.service.service.WelcomeService; import com.gic.haoban.manage.service.service.WelcomeService;
import com.gic.haoban.manage.service.service.WxEnterpriseService; import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.haoban.manage.service.util.CommonUtil;
import com.gic.haoban.manage.service.util.EmojiFilterUtil; import com.gic.haoban.manage.service.util.EmojiFilterUtil;
import com.gic.haoban.manage.service.util.QwUtils;
import com.gic.mq.sdk.GicMQClient; import com.gic.mq.sdk.GicMQClient;
import com.gic.wechat.api.dto.qywx.welcome.QywxExternalMessageBaseDTO; import com.gic.wechat.api.dto.qywx.welcome.QywxExternalMessageBaseDTO;
import com.gic.wechat.api.dto.qywx.welcome.QywxFileExternalBaseDTO; import com.gic.wechat.api.dto.qywx.welcome.QywxFileExternalBaseDTO;
...@@ -259,13 +259,9 @@ public class WelcomeSendServiceImpl implements WelcomeSendService { ...@@ -259,13 +259,9 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
private void attachmentAddImage(List<QywxExternalMessageBaseDTO> attachments, WelcomeMediaBO media, String corpid , WxEnterpriseQwDTO qwDTO) { private void attachmentAddImage(List<QywxExternalMessageBaseDTO> attachments, WelcomeMediaBO media, String corpid , WxEnterpriseQwDTO qwDTO) {
String mediaUrl = media.getMediaUrl(); String mediaUrl = media.getMediaUrl();
String[] arr = mediaUrl.split("/"); String[] arr = mediaUrl.split("/");
String secret = config.getWxSuiteid() ;
boolean selfFlag = qwDTO.isSelf() ; boolean selfFlag = qwDTO.isSelf() ;
if(selfFlag) { JSONResponse jp = qywxSuiteApiService.uploadMedia(corpid, QwUtils.getSecret(qwDTO, config.getWxSuiteid()),
secret = qwDTO.getSelfSecret() ; mediaUrl, arr[arr.length - 1], QywxMediaTypeEnum.IMAGE.getCode(),selfFlag,qwDTO.getUrlHost());
}
JSONResponse jp = qywxSuiteApiService.uploadMedia(corpid, secret,
CommonUtil.getFileByte(mediaUrl), arr[arr.length - 1], QywxMediaTypeEnum.IMAGE.getCode(),selfFlag);
log.info("欢迎语发送图片返回:{}", JSON.toJSONString(jp)); log.info("欢迎语发送图片返回:{}", JSON.toJSONString(jp));
if (jp.getErrorCode() == 0) { if (jp.getErrorCode() == 0) {
QywxImageExternalBaseDTO qywxImageExternalBaseDTO = new QywxImageExternalBaseDTO(); QywxImageExternalBaseDTO qywxImageExternalBaseDTO = new QywxImageExternalBaseDTO();
...@@ -277,13 +273,9 @@ public class WelcomeSendServiceImpl implements WelcomeSendService { ...@@ -277,13 +273,9 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
private void attachmentAddVideo(List<QywxExternalMessageBaseDTO> attachments, WelcomeMediaBO media, String corpid, WxEnterpriseQwDTO qwDTO) { private void attachmentAddVideo(List<QywxExternalMessageBaseDTO> attachments, WelcomeMediaBO media, String corpid, WxEnterpriseQwDTO qwDTO) {
String mediaUrl = media.getMediaUrl(); String mediaUrl = media.getMediaUrl();
String[] arr = mediaUrl.split("/"); String[] arr = mediaUrl.split("/");
String secret = config.getWxSuiteid() ;
boolean selfFlag = qwDTO.isSelf() ; boolean selfFlag = qwDTO.isSelf() ;
if(selfFlag) { JSONResponse jp = qywxSuiteApiService.uploadMedia(corpid, QwUtils.getSecret(qwDTO, config.getWxSuiteid()),
secret = qwDTO.getSelfSecret() ; mediaUrl, arr[arr.length - 1], QywxMediaTypeEnum.VIDEO.getCode(),selfFlag,qwDTO.getUrlHost());
}
JSONResponse jp = qywxSuiteApiService.uploadMedia(corpid, secret,
CommonUtil.getFileByte(mediaUrl), arr[arr.length - 1], QywxMediaTypeEnum.VIDEO.getCode(),selfFlag);
log.info("欢迎语发送视频返回:{}", JSON.toJSONString(jp)); log.info("欢迎语发送视频返回:{}", JSON.toJSONString(jp));
if (jp.getErrorCode() == 0) { if (jp.getErrorCode() == 0) {
QywxVideoExternalBaseDTO qywxVideoExternalBaseDTO = new QywxVideoExternalBaseDTO(); QywxVideoExternalBaseDTO qywxVideoExternalBaseDTO = new QywxVideoExternalBaseDTO();
...@@ -295,13 +287,9 @@ public class WelcomeSendServiceImpl implements WelcomeSendService { ...@@ -295,13 +287,9 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
private void attachmentAddFile(List<QywxExternalMessageBaseDTO> attachments, WelcomeMediaBO media, String corpid, WxEnterpriseQwDTO qwDTO) { private void attachmentAddFile(List<QywxExternalMessageBaseDTO> attachments, WelcomeMediaBO media, String corpid, WxEnterpriseQwDTO qwDTO) {
String mediaUrl = media.getMediaUrl(); String mediaUrl = media.getMediaUrl();
String[] arr = mediaUrl.split("/"); String[] arr = mediaUrl.split("/");
String secret = config.getWxSuiteid() ;
boolean selfFlag = qwDTO.isSelf() ; boolean selfFlag = qwDTO.isSelf() ;
if(selfFlag) { JSONResponse jp = qywxSuiteApiService.uploadMedia(corpid, QwUtils.getSecret(qwDTO, config.getWxSuiteid()),
secret = qwDTO.getSelfSecret() ; mediaUrl, arr[arr.length - 1], QywxMediaTypeEnum.FILE.getCode(),selfFlag,qwDTO.getUrlHost());
}
JSONResponse jp = qywxSuiteApiService.uploadMedia(corpid, secret,
CommonUtil.getFileByte(mediaUrl), arr[arr.length - 1], QywxMediaTypeEnum.FILE.getCode(),selfFlag);
log.info("欢迎语发送文件返回:{}", JSON.toJSONString(jp)); log.info("欢迎语发送文件返回:{}", JSON.toJSONString(jp));
if (jp.getErrorCode() == 0) { if (jp.getErrorCode() == 0) {
QywxFileExternalBaseDTO qywxFileExternalBaseDTO = new QywxFileExternalBaseDTO(); QywxFileExternalBaseDTO qywxFileExternalBaseDTO = new QywxFileExternalBaseDTO();
...@@ -372,13 +360,9 @@ public class WelcomeSendServiceImpl implements WelcomeSendService { ...@@ -372,13 +360,9 @@ public class WelcomeSendServiceImpl implements WelcomeSendService {
if (qRcodePic != null) { if (qRcodePic != null) {
String downloadUrl = qRcodePic.getPicUploadResDTO().downloadUrl; String downloadUrl = qRcodePic.getPicUploadResDTO().downloadUrl;
String[] arr = downloadUrl.split("/"); String[] arr = downloadUrl.split("/");
String secret = config.getWxSuiteid() ;
boolean selfFlag = qwDTO.isSelf() ; boolean selfFlag = qwDTO.isSelf() ;
if(selfFlag) { JSONResponse jp = qywxSuiteApiService.uploadMedia(corpid, QwUtils.getSecret(qwDTO, config.getWxSuiteid()),
secret = qwDTO.getSelfSecret() ; downloadUrl, arr[arr.length - 1], QywxMediaTypeEnum.IMAGE.getCode(),selfFlag,qwDTO.getUrlHost());
}
JSONResponse jp = qywxSuiteApiService.uploadMedia(corpid, secret,
CommonUtil.getFileByte(downloadUrl), arr[arr.length - 1], QywxMediaTypeEnum.IMAGE.getCode(),selfFlag);
log.info("欢迎语发送带参数的公众号企微二维码返回:{}", JSON.toJSONString(jp)); log.info("欢迎语发送带参数的公众号企微二维码返回:{}", JSON.toJSONString(jp));
if (jp.getErrorCode() == 0) { if (jp.getErrorCode() == 0) {
QywxImageExternalBaseDTO qywxImageExternalBaseDTO = new QywxImageExternalBaseDTO(); QywxImageExternalBaseDTO qywxImageExternalBaseDTO = new QywxImageExternalBaseDTO();
......
...@@ -146,7 +146,7 @@ public class MaterialApiServiceImpl implements MaterialApiService { ...@@ -146,7 +146,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
if (type == 3) { if (type == 3) {
String imgUrl = materialDTO.getImgUrl(); String imgUrl = materialDTO.getImgUrl();
logger.info("【上传图片】imgUrl={}", imgUrl); logger.info("【上传图片】imgUrl={}", imgUrl);
JSONResponse response = qywxSuiteApiService.uploadImage(qwDTO.getThirdCorpid() , QwUtils.getSecret(qwDTO, config.getWxSuiteid()), CommonUtil.getFileByte(imgUrl) , qwDTO.isSelf()); JSONResponse response = qywxSuiteApiService.uploadImage(qwDTO.getThirdCorpid() , QwUtils.getSecret(qwDTO, config.getWxSuiteid()), imgUrl , qwDTO.isSelf(),qwDTO.getUrlHost());
logger.info("【上传图片返回】response={}", JSON.toJSONString(response)); logger.info("【上传图片返回】response={}", JSON.toJSONString(response));
String wxImgUrl = response.getResult() == null ? "" : response.getResult().toString(); String wxImgUrl = response.getResult() == null ? "" : response.getResult().toString();
materialDTO.setWxImgUrl(wxImgUrl); materialDTO.setWxImgUrl(wxImgUrl);
...@@ -154,12 +154,8 @@ public class MaterialApiServiceImpl implements MaterialApiService { ...@@ -154,12 +154,8 @@ public class MaterialApiServiceImpl implements MaterialApiService {
if (fileType != null) { if (fileType != null) {
String[] arr = url.split("/"); String[] arr = url.split("/");
int count = arr.length; int count = arr.length;
String secret = config.getWxSuiteid() ;
boolean selfFlag = qwDTO.isSelf() ; boolean selfFlag = qwDTO.isSelf() ;
if(selfFlag) { JSONResponse jp = qywxSuiteApiService.uploadMedia(qwDTO.getThirdCorpid() , QwUtils.getSecret(qwDTO, config.getWxSuiteid()), url, arr[count - 1], fileType.getCode(),selfFlag,qwDTO.getUrlHost());
secret = qwDTO.getSelfSecret() ;
}
JSONResponse jp = qywxSuiteApiService.uploadMedia(qwDTO.getThirdCorpid() , secret, CommonUtil.getFileByte(url), arr[count - 1], fileType.getCode(),selfFlag);
if (jp.getErrorCode() == 0) { if (jp.getErrorCode() == 0) {
materialDTO.setWxLastUploadTime(new Date()); materialDTO.setWxLastUploadTime(new Date());
materialDTO.setMediaId(jp.getResult().toString()); materialDTO.setMediaId(jp.getResult().toString());
...@@ -216,7 +212,7 @@ public class MaterialApiServiceImpl implements MaterialApiService { ...@@ -216,7 +212,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
String imgUrl = materialDTO.getImgUrl(); String imgUrl = materialDTO.getImgUrl();
String oldImgUrl = materialDTO.getImgUrl(); String oldImgUrl = materialDTO.getImgUrl();
if (!imgUrl.equals(oldImgUrl)) { if (!imgUrl.equals(oldImgUrl)) {
JSONResponse response = qywxSuiteApiService.uploadImage(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), CommonUtil.getFileByte(imgUrl) ,qwDTO.isSelf()); JSONResponse response = qywxSuiteApiService.uploadImage(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), imgUrl ,qwDTO.isSelf(),qwDTO.getUrlHost());
String wxImgUrl = response.getResult() == null ? "" : response.getResult().toString(); String wxImgUrl = response.getResult() == null ? "" : response.getResult().toString();
materialDTO.setWxImgUrl(wxImgUrl); materialDTO.setWxImgUrl(wxImgUrl);
} }
...@@ -224,12 +220,8 @@ public class MaterialApiServiceImpl implements MaterialApiService { ...@@ -224,12 +220,8 @@ public class MaterialApiServiceImpl implements MaterialApiService {
if (fileType != null && !url.equals(oldUrl)) { if (fileType != null && !url.equals(oldUrl)) {
String[] arr = url.split("/"); String[] arr = url.split("/");
int count = arr.length; int count = arr.length;
String secret = config.getWxSuiteid() ;
boolean selfFlag = qwDTO.isSelf() ; boolean selfFlag = qwDTO.isSelf() ;
if(selfFlag) { JSONResponse jp = qywxSuiteApiService.uploadMedia(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), url , arr[count - 1], fileType.getCode(),selfFlag,qwDTO.getUrlHost());
secret = qwDTO.getSelfSecret() ;
}
JSONResponse jp = qywxSuiteApiService.uploadMedia(qwDTO.getThirdCorpid(), secret, CommonUtil.getFileByte(url), arr[count - 1], fileType.getCode(),selfFlag);
if (jp.getErrorCode() == 0) { if (jp.getErrorCode() == 0) {
materialDTO.setWxLastUploadTime(new Date()); materialDTO.setWxLastUploadTime(new Date());
materialDTO.setMediaId(jp.getResult().toString()); materialDTO.setMediaId(jp.getResult().toString());
...@@ -278,12 +270,7 @@ public class MaterialApiServiceImpl implements MaterialApiService { ...@@ -278,12 +270,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
} }
String[] arr = url.split("/"); String[] arr = url.split("/");
int count = arr.length; int count = arr.length;
boolean selfFlag = qwDTO.isSelf() ; JSONResponse jp = qywxSuiteApiService.uploadMedia(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), url, arr[count - 1], fileType.getCode(),qwDTO.isSelf(),qwDTO.getUrlHost());
String secret = config.getWxSuiteid() ;
if(selfFlag) {
secret = qwDTO.getSelfSecret() ;
}
JSONResponse jp = qywxSuiteApiService.uploadMedia(qwDTO.getThirdCorpid(), secret, CommonUtil.getFileByte(url), arr[count - 1], fileType.getCode(),selfFlag);
if (jp.getErrorCode() == 0) { if (jp.getErrorCode() == 0) {
old.setWxLastUploadTime(new Date()); old.setWxLastUploadTime(new Date());
old.setMediaId(jp.getResult().toString()); old.setMediaId(jp.getResult().toString());
...@@ -460,11 +447,7 @@ public class MaterialApiServiceImpl implements MaterialApiService { ...@@ -460,11 +447,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
QywxMediaTypeEnum fileType = QywxMediaTypeEnum.IMAGE; QywxMediaTypeEnum fileType = QywxMediaTypeEnum.IMAGE;
int count = arr.length; int count = arr.length;
boolean selfFlag = qwDTO.isSelf() ; boolean selfFlag = qwDTO.isSelf() ;
String secret = config.getWxSuiteid() ; JSONResponse jp = qywxSuiteApiService.uploadMedia(corPid, QwUtils.getSecret(qwDTO, config.getWxSuiteid()), url, arr[count - 1], fileType.getCode(),selfFlag,qwDTO.getUrlHost());
if(selfFlag) {
secret = qwDTO.getSelfSecret() ;
}
JSONResponse jp = qywxSuiteApiService.uploadMedia(corPid, secret, CommonUtil.getFileByte(url), arr[count - 1], fileType.getCode(),selfFlag);
if (jp.getErrorCode() == 0) { if (jp.getErrorCode() == 0) {
return jp.getResult().toString(); return jp.getResult().toString();
} }
......
...@@ -20,6 +20,7 @@ import com.gic.haoban.manage.service.entity.TabMiniprogramSetting; ...@@ -20,6 +20,7 @@ import com.gic.haoban.manage.service.entity.TabMiniprogramSetting;
import com.gic.haoban.manage.service.service.MiniprogramSettingService; import com.gic.haoban.manage.service.service.MiniprogramSettingService;
import com.gic.haoban.manage.service.service.WxEnterpriseService; import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.haoban.manage.service.util.CommonUtil; import com.gic.haoban.manage.service.util.CommonUtil;
import com.gic.haoban.manage.service.util.QwUtils;
import com.gic.wechat.api.enums.QywxMediaTypeEnum; import com.gic.wechat.api.enums.QywxMediaTypeEnum;
import com.gic.wechat.api.service.qywx.QywxSuiteApiService; import com.gic.wechat.api.service.qywx.QywxSuiteApiService;
...@@ -62,12 +63,8 @@ public class MiniprogramSettingServiceImpl implements MiniprogramSettingService ...@@ -62,12 +63,8 @@ public class MiniprogramSettingServiceImpl implements MiniprogramSettingService
} }
String[] arr = miniprogramSetting.getImageUrl().split("/"); String[] arr = miniprogramSetting.getImageUrl().split("/");
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(miniprogramSetting.getWxEnterpriseId()) ; WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(miniprogramSetting.getWxEnterpriseId()) ;
String secret = config.getWxSuiteid() ;
boolean selfFlag = qwDTO.isSelf() ; boolean selfFlag = qwDTO.isSelf() ;
if(selfFlag) { JSONResponse jp = qywxSuiteApiService.uploadMedia(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), miniprogramSetting.getImageUrl(), arr[arr.length - 1], QywxMediaTypeEnum.IMAGE.getCode(),selfFlag,qwDTO.getUrlHost());
secret = qwDTO.getSelfSecret() ;
}
JSONResponse jp = qywxSuiteApiService.uploadMedia(qwDTO.getThirdCorpid(), secret, CommonUtil.getFileByte(miniprogramSetting.getImageUrl()), arr[arr.length - 1], QywxMediaTypeEnum.IMAGE.getCode(),selfFlag);
if (jp.getErrorCode() == 0) { if (jp.getErrorCode() == 0) {
miniprogramSetting.setMediaTime(date); miniprogramSetting.setMediaTime(date);
miniprogramSetting.setMediaId(jp.getResult().toString()); miniprogramSetting.setMediaId(jp.getResult().toString());
...@@ -121,12 +118,8 @@ public class MiniprogramSettingServiceImpl implements MiniprogramSettingService ...@@ -121,12 +118,8 @@ public class MiniprogramSettingServiceImpl implements MiniprogramSettingService
} }
String[] arr = miniprogramSetting.getImageUrl().split("/"); String[] arr = miniprogramSetting.getImageUrl().split("/");
WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ; WxEnterpriseQwDTO qwDTO = this.wxEnterpriseService.getQwInfo(wxEnterpriseId) ;
String secret = config.getWxSuiteid() ;
boolean selfFlag = qwDTO.isSelf() ; boolean selfFlag = qwDTO.isSelf() ;
if(selfFlag) { JSONResponse jp = qywxSuiteApiService.uploadMedia(qwDTO.getThirdCorpid(), QwUtils.getSecret(qwDTO, config.getWxSuiteid()), miniprogramSetting.getImageUrl(), arr[arr.length - 1], QywxMediaTypeEnum.IMAGE.getCode(),selfFlag,qwDTO.getUrlHost());
secret = qwDTO.getSelfSecret() ;
}
JSONResponse jp = qywxSuiteApiService.uploadMedia(qwDTO.getThirdCorpid(), secret, CommonUtil.getFileByte(miniprogramSetting.getImageUrl()), arr[arr.length - 1], QywxMediaTypeEnum.IMAGE.getCode(),selfFlag);
if (jp.getErrorCode() == 0) { if (jp.getErrorCode() == 0) {
miniprogramSetting.setMediaTime(date); miniprogramSetting.setMediaTime(date);
miniprogramSetting.setMediaId(jp.getResult().toString()); miniprogramSetting.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