doum
2025-09-26 9057e04efad1b7d61c77a72e5c37a504d0aee935
server/src/main/java/com/doumee/core/utils/qiyeweixin/QywxUtil.java
@@ -1,19 +1,14 @@
package com.doumee.core.utils.qiyeweixin;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.utils.HttpsUtil;
import com.doumee.core.utils.qiyeweixin.model.request.QywxSendMsgRequest;
import com.doumee.core.utils.qiyeweixin.model.response.*;
import com.fasterxml.jackson.core.type.TypeReference;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
@@ -30,10 +25,10 @@
    private static QywxUtil qyUtil;
    @Value("${qiwei.serviceurl}")
//    @Value("${qiwei.serviceurl}")
    private    String qiweiUrl;
    @PostConstruct
//    @PostConstruct
    private void init() {
        qyUtil = this;
//        QywxUtil.qiweiUrl =  serviceurl;
@@ -88,7 +83,7 @@
        try{
            String[] interfaceUrl = QywxConstant.SEND_MSG;
            String url = interfaceUrl[0].replace("${accesstoken}",token);
            QywxSendMsgResponse response = sendHttpRequestSingle(url,interfaceUrl[1],JSONObject.toJSONString(param)
            QywxSendMsgResponse response = sendHttpRequestSingle(url,interfaceUrl[1], JSONObject.toJSONString(param)
                    ,new TypeReference<QywxSendMsgResponse>(){});
            log.error("推送消息结果{}",JSONObject.toJSONString(response));
            if(response.getErrcode()!=null && response.getErrcode() ==0){