cn.woodwhales.common.webhook.executor.WeComWebhookExecutor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of woodwhales-common Show documentation
Show all versions of woodwhales-common Show documentation
https://github.com/woodwhales
package cn.woodwhales.common.webhook.executor;
import cn.woodwhales.common.webhook.enums.WebhookProductEnum;
import cn.woodwhales.common.webhook.model.request.BaseWebhookRequestBody;
import cn.woodwhales.common.webhook.model.request.WeComRequestBody;
import cn.woodwhales.common.webhook.model.response.WeComResponse;
import cn.woodwhales.common.webhook.model.response.ExecuteResponse;
import java.util.Objects;
/**
* @author woodwhales on 2021-07-19 11:32
*/
public class WeComWebhookExecutor extends BaseWebhookExecutor {
private static final int ERR_CODE_SUCCESS = 0;
public static WeComWebhookExecutor newInstance() {
return new WeComWebhookExecutor();
}
@Override
protected boolean checkResponseObjectHandler(ExecuteResponse executeResponse) {
WeComResponse weComResponse = executeResponse.parsedResponseObject;
return Objects.equals(ERR_CODE_SUCCESS, weComResponse.getErrcode());
}
@Override
protected WebhookProductEnum webhookProductEnum() {
return WebhookProductEnum.WE_COM;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy