mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-11-01 20:13:12 +08:00
🎨 清理一些jetbrain的校验注解
This commit is contained in:
@ -1,12 +1,10 @@
|
||||
package me.chanjar.weixin.cp.api;
|
||||
|
||||
import lombok.NonNull;
|
||||
import me.chanjar.weixin.common.bean.result.WxMediaUploadResult;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
|
||||
import me.chanjar.weixin.cp.bean.external.*;
|
||||
import me.chanjar.weixin.cp.bean.external.contact.*;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -42,7 +40,7 @@ public interface WxCpExternalContactService {
|
||||
* @return wx cp contact way result
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpContactWayResult addContactWay(@NonNull WxCpContactWayInfo info) throws WxErrorException;
|
||||
WxCpContactWayResult addContactWay(WxCpContactWayInfo info) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 获取企业已配置的「联系我」方式
|
||||
@ -55,7 +53,7 @@ public interface WxCpExternalContactService {
|
||||
* @return contact way
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpContactWayInfo getContactWay(@NonNull String configId) throws WxErrorException;
|
||||
WxCpContactWayInfo getContactWay(String configId) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 更新企业已配置的「联系我」方式
|
||||
@ -68,7 +66,7 @@ public interface WxCpExternalContactService {
|
||||
* @return wx cp base resp
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpBaseResp updateContactWay(@NonNull WxCpContactWayInfo info) throws WxErrorException;
|
||||
WxCpBaseResp updateContactWay(WxCpContactWayInfo info) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 删除企业已配置的「联系我」方式
|
||||
@ -81,7 +79,7 @@ public interface WxCpExternalContactService {
|
||||
* @return wx cp base resp
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpBaseResp deleteContactWay(@NonNull String configId) throws WxErrorException;
|
||||
WxCpBaseResp deleteContactWay(String configId) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 结束临时会话
|
||||
@ -97,7 +95,7 @@ public interface WxCpExternalContactService {
|
||||
* @return wx cp base resp
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpBaseResp closeTempChat(@NonNull String userId, @NonNull String externalUserId) throws WxErrorException;
|
||||
WxCpBaseResp closeTempChat(String userId, String externalUserId) throws WxErrorException;
|
||||
|
||||
|
||||
/**
|
||||
@ -170,7 +168,7 @@ public interface WxCpExternalContactService {
|
||||
* @return 该企业的外部联系人ID string
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
String unionidToExternalUserid(@NotNull String unionid, String openid) throws WxErrorException;
|
||||
String unionidToExternalUserid(String unionid, String openid) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 配置客户群进群方式
|
||||
@ -185,7 +183,7 @@ public interface WxCpExternalContactService {
|
||||
* @return {@link WxCpGroupJoinWayResult}
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpGroupJoinWayResult addJoinWay(@NonNull WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException;
|
||||
WxCpGroupJoinWayResult addJoinWay(WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 更新客户群进群方式配置
|
||||
@ -196,7 +194,7 @@ public interface WxCpExternalContactService {
|
||||
* @return wx cp base resp
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpBaseResp updateJoinWay(@NonNull WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException;
|
||||
WxCpBaseResp updateJoinWay(WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 获取客户群进群方式配置
|
||||
@ -207,7 +205,7 @@ public interface WxCpExternalContactService {
|
||||
* @return join way
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpGroupJoinWayInfo getJoinWay(@NonNull String configId) throws WxErrorException;
|
||||
WxCpGroupJoinWayInfo getJoinWay(String configId) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 删除客户群进群方式配置
|
||||
@ -217,7 +215,7 @@ public interface WxCpExternalContactService {
|
||||
* @return wx cp base resp
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpBaseResp delJoinWay(@NonNull String configId) throws WxErrorException;
|
||||
WxCpBaseResp delJoinWay(String configId) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 代开发应用external_userid转换
|
||||
@ -239,7 +237,7 @@ public interface WxCpExternalContactService {
|
||||
* @return 该服务商第三方应用下的企业的外部联系人ID string
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
String toServiceExternalUserid(@NotNull String externalUserid) throws WxErrorException;
|
||||
String toServiceExternalUserid(String externalUserid) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 企业客户微信unionid的升级 - unionid查询external_userid
|
||||
@ -265,7 +263,7 @@ public interface WxCpExternalContactService {
|
||||
* @return 该服务商第三方应用下的企业的外部联系人ID wx cp external user id list
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
WxCpExternalUserIdList unionidToExternalUserid3rd(@NotNull String unionid, @NotNull String openid, String corpid) throws WxErrorException;
|
||||
WxCpExternalUserIdList unionidToExternalUserid3rd(String unionid, String openid, String corpid) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 转换external_userid
|
||||
@ -308,7 +306,7 @@ public interface WxCpExternalContactService {
|
||||
* @return wx cp base resp
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
WxCpBaseResp finishExternalUserIdMigration(@NotNull String corpid) throws WxErrorException;
|
||||
WxCpBaseResp finishExternalUserIdMigration(String corpid) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 客户群opengid转换
|
||||
@ -333,7 +331,7 @@ public interface WxCpExternalContactService {
|
||||
* @return 客户群ID ,可以用来调用获取客户群详情
|
||||
* @throws WxErrorException .
|
||||
*/
|
||||
String opengidToChatid(@NotNull String opengid) throws WxErrorException;
|
||||
String opengidToChatid(String opengid) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* 批量获取客户详情.
|
||||
@ -472,7 +470,7 @@ public interface WxCpExternalContactService {
|
||||
* @return 客户转接接口实体 wx cp user transfer result resp
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpUserTransferResultResp transferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid,
|
||||
WxCpUserTransferResultResp transferResult(String handOverUserid, String takeOverUserid,
|
||||
String cursor) throws WxErrorException;
|
||||
|
||||
/**
|
||||
@ -513,7 +511,7 @@ public interface WxCpExternalContactService {
|
||||
* @return 客户转接接口实体 wx cp user transfer result resp
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpUserTransferResultResp resignedTransferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid,
|
||||
WxCpUserTransferResultResp resignedTransferResult(String handOverUserid, String takeOverUserid,
|
||||
String cursor) throws WxErrorException;
|
||||
|
||||
/**
|
||||
@ -890,7 +888,7 @@ public interface WxCpExternalContactService {
|
||||
* @return wx cp base resp
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpGroupMsgListResult getGroupMsgListV2(String chatType, @NonNull Date startTime, @NonNull Date endTime,
|
||||
WxCpGroupMsgListResult getGroupMsgListV2(String chatType, Date startTime, Date endTime,
|
||||
String creator, Integer filterType, Integer limit, String cursor) throws WxErrorException;
|
||||
|
||||
/**
|
||||
@ -970,7 +968,7 @@ public interface WxCpExternalContactService {
|
||||
* @return wx cp base resp
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpGroupWelcomeTemplateResult getGroupWelcomeTemplate(@NotNull String templateId) throws WxErrorException;
|
||||
WxCpGroupWelcomeTemplateResult getGroupWelcomeTemplate(String templateId) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
@ -984,7 +982,7 @@ public interface WxCpExternalContactService {
|
||||
* @return wx cp base resp
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
WxCpBaseResp delGroupWelcomeTemplate(@NotNull String templateId, String agentId) throws WxErrorException;
|
||||
WxCpBaseResp delGroupWelcomeTemplate(String templateId, String agentId) throws WxErrorException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
|
||||
@ -2,7 +2,6 @@ package me.chanjar.weixin.cp.api.impl;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonObject;
|
||||
import lombok.NonNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import me.chanjar.weixin.common.bean.result.WxMediaUploadResult;
|
||||
import me.chanjar.weixin.common.error.WxCpErrorMsgEnum;
|
||||
@ -19,7 +18,6 @@ import me.chanjar.weixin.cp.bean.external.*;
|
||||
import me.chanjar.weixin.cp.bean.external.contact.*;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -41,7 +39,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
private final WxCpService mainService;
|
||||
|
||||
@Override
|
||||
public WxCpContactWayResult addContactWay(@NonNull WxCpContactWayInfo info) throws WxErrorException {
|
||||
public WxCpContactWayResult addContactWay(WxCpContactWayInfo info) throws WxErrorException {
|
||||
|
||||
if (info.getContactWay().getUsers() != null && info.getContactWay().getUsers().size() > 100) {
|
||||
throw new WxRuntimeException("「联系我」使用人数默认限制不超过100人(包括部门展开后的人数)");
|
||||
@ -54,7 +52,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpContactWayInfo getContactWay(@NonNull String configId) throws WxErrorException {
|
||||
public WxCpContactWayInfo getContactWay(String configId) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("config_id", configId);
|
||||
|
||||
@ -64,7 +62,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpBaseResp updateContactWay(@NonNull WxCpContactWayInfo info) throws WxErrorException {
|
||||
public WxCpBaseResp updateContactWay(WxCpContactWayInfo info) throws WxErrorException {
|
||||
if (StringUtils.isBlank(info.getContactWay().getConfigId())) {
|
||||
throw new WxRuntimeException("更新「联系我」方式需要指定configId");
|
||||
}
|
||||
@ -79,7 +77,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpBaseResp deleteContactWay(@NonNull String configId) throws WxErrorException {
|
||||
public WxCpBaseResp deleteContactWay(String configId) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("config_id", configId);
|
||||
|
||||
@ -90,7 +88,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpBaseResp closeTempChat(@NonNull String userId, @NonNull String externalUserId) throws WxErrorException {
|
||||
public WxCpBaseResp closeTempChat(String userId, String externalUserId) throws WxErrorException {
|
||||
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("userid", userId);
|
||||
@ -122,7 +120,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public String convertToOpenid(@NotNull String externalUserId) throws WxErrorException {
|
||||
public String convertToOpenid(String externalUserId) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("external_userid", externalUserId);
|
||||
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(CONVERT_TO_OPENID);
|
||||
@ -132,7 +130,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public String unionidToExternalUserid(@NotNull String unionid, String openid) throws WxErrorException {
|
||||
public String unionidToExternalUserid(String unionid, String openid) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("unionid", unionid);
|
||||
if (StringUtils.isNotEmpty(openid)) {
|
||||
@ -145,7 +143,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toServiceExternalUserid(@NotNull String externalUserid) throws WxErrorException {
|
||||
public String toServiceExternalUserid(String externalUserid) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("external_userid", externalUserid);
|
||||
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(TO_SERVICE_EXTERNAL_USERID);
|
||||
@ -155,7 +153,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpExternalUserIdList unionidToExternalUserid3rd(@NotNull String unionid, @NotNull String openid,
|
||||
public WxCpExternalUserIdList unionidToExternalUserid3rd(String unionid, String openid,
|
||||
String corpid) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("unionid", unionid);
|
||||
@ -180,7 +178,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpBaseResp finishExternalUserIdMigration(@NotNull String corpid) throws WxErrorException {
|
||||
public WxCpBaseResp finishExternalUserIdMigration(String corpid) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("corpid", corpid);
|
||||
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(FINISH_EXTERNAL_USERID_MIGRATION);
|
||||
@ -189,7 +187,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public String opengidToChatid(@NotNull String opengid) throws WxErrorException {
|
||||
public String opengidToChatid(String opengid) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("opengid", opengid);
|
||||
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(OPENID_TO_CHATID);
|
||||
@ -280,7 +278,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpUserTransferResultResp transferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid,
|
||||
public WxCpUserTransferResultResp transferResult(String handOverUserid, String takeOverUserid,
|
||||
String cursor) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("cursor", cursor);
|
||||
@ -300,8 +298,8 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpUserTransferResultResp resignedTransferResult(@NotNull String handOverUserid,
|
||||
@NotNull String takeOverUserid, String cursor) throws WxErrorException {
|
||||
public WxCpUserTransferResultResp resignedTransferResult(String handOverUserid,
|
||||
String takeOverUserid, String cursor) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("cursor", cursor);
|
||||
json.addProperty("handover_userid", handOverUserid);
|
||||
@ -638,7 +636,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@Override
|
||||
public WxCpGroupMsgListResult getGroupMsgListV2(String chatType, @NonNull Date startTime, @NonNull Date endTime,
|
||||
public WxCpGroupMsgListResult getGroupMsgListV2(String chatType, Date startTime, Date endTime,
|
||||
String creator, Integer filterType, Integer limit, String cursor) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("chat_type", chatType);
|
||||
@ -774,7 +772,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@Override
|
||||
public WxCpGroupWelcomeTemplateResult getGroupWelcomeTemplate(@NotNull String templateId) throws WxErrorException {
|
||||
public WxCpGroupWelcomeTemplateResult getGroupWelcomeTemplate(String templateId) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("template_id", templateId);
|
||||
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(GROUP_WELCOME_TEMPLATE_GET);
|
||||
@ -795,7 +793,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
* @throws WxErrorException the wx error exception
|
||||
*/
|
||||
@Override
|
||||
public WxCpBaseResp delGroupWelcomeTemplate(@NotNull String templateId, String agentId) throws WxErrorException {
|
||||
public WxCpBaseResp delGroupWelcomeTemplate(String templateId, String agentId) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("template_id", templateId);
|
||||
if (!StringUtils.isEmpty(agentId)) {
|
||||
@ -908,7 +906,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpGroupJoinWayResult addJoinWay(@NonNull WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException {
|
||||
public WxCpGroupJoinWayResult addJoinWay(WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException {
|
||||
if (wxCpGroupJoinWayInfo.getJoinWay().getChatIdList() != null && wxCpGroupJoinWayInfo.getJoinWay().getChatIdList().size() > 5) {
|
||||
throw new WxRuntimeException("使用该配置的客户群ID列表,支持5个");
|
||||
}
|
||||
@ -919,7 +917,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpBaseResp updateJoinWay(@NonNull WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException {
|
||||
public WxCpBaseResp updateJoinWay(WxCpGroupJoinWayInfo wxCpGroupJoinWayInfo) throws WxErrorException {
|
||||
if (wxCpGroupJoinWayInfo.getJoinWay().getChatIdList() != null && wxCpGroupJoinWayInfo.getJoinWay().getChatIdList().size() > 5) {
|
||||
throw new WxRuntimeException("使用该配置的客户群ID列表,支持5个");
|
||||
}
|
||||
@ -939,7 +937,7 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public WxCpBaseResp delJoinWay(@NonNull String configId) throws WxErrorException {
|
||||
public WxCpBaseResp delJoinWay(String configId) throws WxErrorException {
|
||||
JsonObject json = new JsonObject();
|
||||
json.addProperty("config_id", configId);
|
||||
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(DEL_JOIN_WAY);
|
||||
|
||||
Reference in New Issue
Block a user