rk
2 天以前 5df732ffe16b3f162422c2db61a78458e28c7f8d
server/visits/dmvisit_service/src/main/java/com/doumee/core/dingTalk/DingTalk.java
@@ -373,7 +373,7 @@
     * api 地址 https://open.dingtalk.com/document/orgapp/asynchronous-sending-of-enterprise-session-messages
     * @throws ApiException
     */
    public void workInfoOANotice(Long agentId,String userIds,OapiMessageCorpconversationAsyncsendV2Request.Msg msg){
    public Boolean workInfoOANotice(Long agentId,String userIds,OapiMessageCorpconversationAsyncsendV2Request.Msg msg){
        try{
            DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/message/corpconversation/asyncsend_v2");
            OapiMessageCorpconversationAsyncsendV2Request request = new OapiMessageCorpconversationAsyncsendV2Request();
@@ -384,13 +384,14 @@
            request.setMsg(msg);
            OapiMessageCorpconversationAsyncsendV2Response rsp = client.execute(request, "60c2df248ca93d4eafb4a04a2330d3d3");//getToken());
            if(rsp.getErrcode().equals(Constants.DD_ERR_CODE)){
                return true;
            }else{
                throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),rsp.getMessage());
            }
        }catch (ApiException apiException){
        }
        return false;
    }