jiangping
2025-04-17 9b00b80c926b3d1b38b7ef9b682ee097345dde3f
server/src/main/java/com/doumee/core/utils/qiyeweixin/QywxUtil.java
@@ -81,13 +81,18 @@
        return null;
    }
    public static QywxSendMsgResponse sendMsg(String token, QywxSendMsgRequest param)  {
        String[] interfaceUrl = QywxConstant.SEND_MSG;
        String url = interfaceUrl[0].replace("${accesstoken}",token);
        QywxSendMsgResponse response = sendHttpRequestSingle(url,interfaceUrl[1],JSONObject.toJSONString(param)
                ,new TypeReference<QywxSendMsgResponse>(){});
        if(response.getErrcode()!=null && response.getErrcode() ==0){
            return response;
        try{
            String[] interfaceUrl = QywxConstant.SEND_MSG;
            String url = interfaceUrl[0].replace("${accesstoken}",token);
            QywxSendMsgResponse response = sendHttpRequestSingle(url,interfaceUrl[1],JSONObject.toJSONString(param)
                    ,new TypeReference<QywxSendMsgResponse>(){});
            if(response.getErrcode()!=null && response.getErrcode() ==0){
                return response;
            }
        }catch (Exception e){
        }
        return null;
    }
    public static List<QywxUserListResponse> getUserList(String token,String depatId)   {
@@ -125,6 +130,19 @@
        return null;
    }
    public static String getJsApiTicket(String token)  {
        String[] interfaceUrl = QywxConstant.GET_JSAPI_TICKET;
        String url = interfaceUrl[0].replace("${accesstoken}",token);
        QywxBaseResponse<String> response = sendHttpRequest(url,interfaceUrl[1],""
                ,new TypeReference<QywxBaseResponse<String>>(){});
        if(response.getErrcode()!=null && response.getErrcode() ==0){
            return response.getJsapi_ticket();
        }
        return null;
    }
    /**
     * 发起wms接口请求
     * @param url