🎨 修复部分错误的javadoc标签

This commit is contained in:
Binary Wang
2023-06-06 23:35:45 +08:00
parent 15d14929df
commit dd7f02de35
48 changed files with 355 additions and 448 deletions

View File

@ -10,7 +10,7 @@ import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse;
* 资金流水列表 响应
*
* @author LiXiZe
* @date 2023-04-16
* @since 2023-04-16
*/
@Data
@NoArgsConstructor

View File

@ -7,7 +7,7 @@ import org.testng.annotations.Test;
/**
* @author LiXiZe
* @date 2023-04-20
* @since 2023-04-20
*/
public class WxChannelMessageRouterRuleTest {

View File

@ -19,7 +19,7 @@ import org.testng.annotations.Test;
/**
* @author LiXiZe
* @date 2023-04-21
* @since 2023-04-21
*/
@Slf4j
@Guice(modules = ApiTestModule.class)

View File

@ -10,7 +10,6 @@ import static org.testng.Assert.assertTrue;
/**
* @author jiangby
* @version 1.0
* @description: 作用
* created on 2022/5/26 1:46
*/
@Test

View File

@ -12,8 +12,7 @@ import java.util.List;
* QJAVA版本的sdk报错UnsatisfiedLinkError
* A请检查是否修改了sdk的包名。
* <p>
* 官方文档:
* https://developer.work.weixin.qq.com/document/path/91552
* <a href="https://developer.work.weixin.qq.com/document/path/91552">官方文档</a>
*
* @author <a href="https://github.com/0katekate0">Wang_Wong</a> created on 2022-01-17
*/
@ -25,182 +24,175 @@ public class Finance {
private static final String SO_FILE = "so";
private static final String DLL_FILE = "dll";
/**
* New sdk long.
*
* @return the long
*/
public native static long NewSdk();
/**
* New sdk long.
*
* @return the long
*/
public static native long NewSdk();
/**
* 初始化函数
* Return值=0表示该API调用成功
*
* @param sdk the sdk
* @param corpid the corpid
* @param secret the secret
* @return 返回是否初始化成功 0 - 成功 !=0 - 失败
*/
public native static int Init(long sdk, String corpid, String secret);
/**
* 初始化函数
* Return值=0表示该API调用成功
*
* @param sdk the sdk
* @param corpid the corpid
* @param secret the secret
* @return 返回是否初始化成功 0 - 成功 !=0 - 失败
*/
public static native int Init(long sdk, String corpid, String secret);
/**
* 拉取聊天记录函数
* Return值=0表示该API调用成功
*
* @param sdk the sdk
* @param seq the seq
* @param limit the limit
* @param proxy the proxy
* @param passwd the passwd
* @param timeout the timeout
* @param chatData the chat data
* @return 返回是否调用成功 0 - 成功 !=0 - 失败
*/
public native static int GetChatData(long sdk, long seq, long limit, String proxy, String passwd, long timeout, long chatData);
/**
* 拉取聊天记录函数
* Return值=0表示该API调用成功
*
* @param sdk the sdk
* @param seq the seq
* @param limit the limit
* @param proxy the proxy
* @param passwd the passwd
* @param timeout the timeout
* @param chatData the chat data
* @return 返回是否调用成功 0 - 成功 !=0 - 失败
*/
public static native int GetChatData(long sdk, long seq, long limit, String proxy, String passwd, long timeout, long chatData);
/**
* 拉取媒体消息函数
* Return值=0表示该API调用成功
*
* @param sdk the sdk
* @param indexbuf the indexbuf
* @param sdkField the sdk field
* @param proxy the proxy
* @param passwd the passwd
* @param timeout the timeout
* @param mediaData the media data
* @return 返回是否调用成功 0 - 成功 !=0 - 失败
*/
public native static int GetMediaData(long sdk, String indexbuf, String sdkField, String proxy, String passwd, long timeout, long mediaData);
/**
* 拉取媒体消息函数
* Return值=0表示该API调用成功
*
* @param sdk the sdk
* @param indexbuf the indexbuf
* @param sdkField the sdk field
* @param proxy the proxy
* @param passwd the passwd
* @param timeout the timeout
* @param mediaData the media data
* @return 返回是否调用成功 0 - 成功 !=0 - 失败
*/
public static native int GetMediaData(long sdk, String indexbuf, String sdkField, String proxy, String passwd, long timeout, long mediaData);
/**
* Decrypt data int.
*
* @param sdk the sdk
* @param encrypt_key the encrypt key
* @param encrypt_msg the encrypt msg
* @param msg the msg
* @return 返回是否调用成功 0 - 成功 !=0 - 失败
* @brief 解析密文
*/
public native static int DecryptData(long sdk, String encrypt_key, String encrypt_msg, long msg);
/**
* 解析密文
*
* @param sdk the sdk
* @param encrypt_key the encrypt key
* @param encrypt_msg the encrypt msg
* @param msg the msg
* @return 返回是否调用成功 0 - 成功 !=0 - 失败
*/
public static native int DecryptData(long sdk, String encrypt_key, String encrypt_msg, long msg);
/**
* Destroy sdk.
*
* @param sdk the sdk
*/
public native static void DestroySdk(long sdk);
/**
* Destroy sdk.
*
* @param sdk the sdk
*/
public static native void DestroySdk(long sdk);
/**
* New slice long.
*
* @return the long
*/
public native static long NewSlice();
/**
* New slice long.
*
* @return the long
*/
public static native long NewSlice();
/**
* Free slice.
*
* @param slice the slice
* @return
* @brief 释放slice 和NewSlice成对使用
*/
public native static void FreeSlice(long slice);
/**
* 释放slice 和NewSlice成对使用
*
* @param slice the slice
*/
public static native void FreeSlice(long slice);
/**
* Get content from slice string.
*
* @param slice the slice
* @return 内容 string
* @brief 获取slice内容
*/
public native static String GetContentFromSlice(long slice);
/**
* 获取slice内容
*
* @param slice the slice
* @return 内容 string
*/
public static native String GetContentFromSlice(long slice);
/**
* Get slice len int.
*
* @param slice the slice
* @return 内容 int
* @brief 获取slice内容长度
*/
public native static int GetSliceLen(long slice);
/**
* 获取slice内容长度
*
* @param slice the slice
* @return 内容 int
*/
public static native int GetSliceLen(long slice);
/**
* New media data long.
*
* @return the long
*/
public native static long NewMediaData();
/**
* New media data long.
*
* @return the long
*/
public static native long NewMediaData();
/**
* Free media data.
*
* @param mediaData the media data
*/
public native static void FreeMediaData(long mediaData);
/**
* Free media data.
*
* @param mediaData the media data
*/
public static native void FreeMediaData(long mediaData);
/**
* Get out index buf string.
*
* @param mediaData the media data
* @return outindex string
* @brief 获取mediadata outindex
*/
public native static String GetOutIndexBuf(long mediaData);
/**
* 获取 mediadata outindex
*
* @param mediaData the media data
* @return outindex string
*/
public static native String GetOutIndexBuf(long mediaData);
/**
* Get data byte [ ].
*
* @param mediaData the media data
* @return data byte [ ]
* @brief 获取mediadata data数据
*/
public native static byte[] GetData(long mediaData);
/**
* 获取 mediadata data数据
*
* @param mediaData the media data
* @return data byte [ ]
*/
public static native byte[] GetData(long mediaData);
/**
* Get index len int.
*
* @param mediaData the media data
* @return the int
*/
public native static int GetIndexLen(long mediaData);
/**
* Get index len int.
*
* @param mediaData the media data
* @return the int
*/
public static native int GetIndexLen(long mediaData);
/**
* Get data len int.
*
* @param mediaData the media data
* @return the int
*/
public native static int GetDataLen(long mediaData);
/**
* Get data len int.
*
* @param mediaData the media data
* @return the int
*/
public static native int GetDataLen(long mediaData);
/**
* Is media data finish int.
*
* @param mediaData the media data
* @return 1完成 、0未完成
* @brief 判断mediadata是否结束
*/
public native static int IsMediaDataFinish(long mediaData);
/**
* Is media data finish int.
*
* @param mediaData the media data
* @return 1完成 、0未完成
* 判断mediadata是否结束
*/
public static native int IsMediaDataFinish(long mediaData);
/**
* 判断Windows环境
*
* @return boolean
*/
public static boolean isWindows() {
/**
* 判断Windows环境
*
* @return boolean boolean
*/
public static boolean isWindows() {
String osName = System.getProperties().getProperty("os.name");
log.info("Loading System Libraries, Current OS Version Is: {}", osName);
return osName.toUpperCase().contains("WINDOWS");
}
/**
* 加载系统类库
*
* @param libFiles 类库配置文件
* @param prefixPath 类库文件的前缀路径
*/
public Finance(List<String> libFiles, String prefixPath) {
/**
* 加载系统类库
*
* @param libFiles 类库配置文件
* @param prefixPath 类库文件的前缀路径
*/
public Finance(List<String> libFiles, String prefixPath) {
boolean isWindows = Finance.isWindows();
for (String file : libFiles) {
String suffix = file.substring(file.lastIndexOf(".") + 1);
@ -219,14 +211,14 @@ public class Finance {
}
/**
* 初始化类库文件
*
* @param libFiles the lib files
* @param prefixPath the prefix path
* @return finance
*/
public synchronized static Finance loadingLibraries(List<String> libFiles, String prefixPath) {
/**
* 初始化类库文件
*
* @param libFiles the lib files
* @param prefixPath the prefix path
* @return finance finance
*/
public static synchronized Finance loadingLibraries(List<String> libFiles, String prefixPath) {
if (finance != null) {
return finance;
}
@ -234,12 +226,12 @@ public class Finance {
return finance;
}
/**
* 单例sdk
*
* @return long
*/
public synchronized static long SingletonSDK() {
/**
* 单例sdk
*
* @return long
*/
public static synchronized long SingletonSDK() {
if (sdk > 0) {
return sdk;
}
@ -247,13 +239,12 @@ public class Finance {
return sdk;
}
/**
* 销毁sdk,保证线程可见性
*
* @param destroySDK the destroy sdk
* @return
*/
public synchronized static void DestroySingletonSDK(long destroySDK) {
/**
* 销毁sdk,保证线程可见性
*
* @param destroySDK the destroy sdk
*/
public static synchronized void DestroySingletonSDK(long destroySDK) {
sdk = 0L;
Finance.DestroySdk(destroySDK);
}

View File

@ -1,18 +1,27 @@
package me.chanjar.weixin.cp.api;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.cp.bean.corpgroup.*;
import me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorp;
import java.util.List;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.api
* @Description: 企业互联相关接口
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 27/2/2023 9:57 PM
* 企业互联相关接口
*
* @author libo <422423229@qq.com>
* Created on 27/2/2023 9:57 PM
*/
public interface WxCpCorpGroupService {
List<WxCpCorpGroupCorp> listAppShareInfo(Integer agentId,Integer businessType,String corpId,Integer limit,String cursor) throws WxErrorException;
/**
* List app share info list.
*
* @param agentId the agent id
* @param businessType the business type
* @param corpId the corp id
* @param limit the limit
* @param cursor the cursor
* @return the list
* @throws WxErrorException the wx error exception
*/
List<WxCpCorpGroupCorp> listAppShareInfo(Integer agentId, Integer businessType, String corpId, Integer limit, String cursor) throws WxErrorException;
}

View File

@ -10,10 +10,10 @@ import me.chanjar.weixin.cp.bean.WxCpAgentWorkBench;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.WorkBench.*;
/**
* The type Wx cp agent work bench service.
* 工作台自定义展示实现
*
* @author songshiyu created on : create in 11:24 2020/9/28
* @description: 工作台自定义展示实现
* @author songshiyu
* created at 11:24 2020/9/28
*/
@RequiredArgsConstructor
public class WxCpAgentWorkBenchServiceImpl implements WxCpAgentWorkBenchService {

View File

@ -7,29 +7,27 @@ import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.common.util.json.GsonParser;
import me.chanjar.weixin.cp.api.WxCpCorpGroupService;
import me.chanjar.weixin.cp.api.WxCpService;
import me.chanjar.weixin.cp.bean.corpgroup.*;
import me.chanjar.weixin.cp.constant.WxCpApiPathConsts;
import me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorp;
import me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorpListAppShareInfoResp;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.util.List;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.CorpGroup.*;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.LinkedCorp.GET_PERM_LIST;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.CorpGroup.LIST_SHARE_APP_INFO;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.api.impl
* @Description: 企业互联相关接口实现类
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 27/2/2023 10:02 PM
* 企业互联相关接口实现类
*
* @author libo <422423229@qq.com>
* Created on 27/2/2023 9:57 PM
*/
@RequiredArgsConstructor
public class WxCpCorpGroupServiceImpl implements WxCpCorpGroupService {
private final WxCpService cpService;
@Override
public List<WxCpCorpGroupCorp> listAppShareInfo(Integer agentId, Integer businessType, String corpId, Integer limit, String cursor) throws WxErrorException {
public List<WxCpCorpGroupCorp> listAppShareInfo(Integer agentId, Integer businessType, String corpId,
Integer limit, String cursor) throws WxErrorException {
final String url = this.cpService.getWxCpConfigStorage().getApiUrl(LIST_SHARE_APP_INFO);
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("agentid", agentId);

View File

@ -11,7 +11,6 @@ import java.io.Serializable;
* The type Wx cp tp contact search.
*
* @author uianz
* @description
* @since 2020 /12/23 下午 02:43
*/
@Data

View File

@ -12,7 +12,6 @@ import java.util.List;
* The type Wx cp tp contact search resp.
*
* @author uianz
* @description
* @since 2020 /12/23 下午 02:55
*/
@EqualsAndHashCode(callSuper = true)

View File

@ -6,7 +6,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
/**
* @author freedom
* @date 2022/10/20 16:36
* @since 2022/10/20 16:36
*/
@Data
public class WxTpCustomizedAuthUrl extends WxCpBaseResp {

View File

@ -8,12 +8,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.bean.corpgroup
* @Description: 应用类
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 27/2/2023 9:50 PM
* @author libo
*/
@NoArgsConstructor
@Data

View File

@ -6,12 +6,8 @@ import lombok.Data;
import java.io.Serializable;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.bean.corpgroup
* @Description: 获取下级/下游企业的access_token
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 27/2/2023 9:07 PM
* 获取下级/下游企业的access_token
* @author libo
*/
@Data
public class WxCpCorpGroupCorpGetTokenReq implements Serializable {

View File

@ -8,12 +8,8 @@ import java.io.Serializable;
import java.util.List;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.bean.corpgroup
* @Description: 获取应用共享信息返回类
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 27/2/2023 9:02 PM
* 获取应用共享信息返回类
* @author libo
*/
@Data
public class WxCpCorpGroupCorpListAppShareInfoResp implements Serializable {

View File

@ -7,12 +7,8 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.bean.corpgroup
* @Description: 获取下级/下游企业的access_token返回类
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 27/2/2023 9:07 PM
* 获取下级/下游企业的access_token返回类
* @author libo
*/
@Data
public class WxCpCorpGroupCorpToken implements Serializable {

View File

@ -2,18 +2,14 @@ package me.chanjar.weixin.cp.bean.corpgroup;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import me.chanjar.weixin.cp.bean.WxCpAgent;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.bean.corpgroup
* @Description: 获取下级/下游企业小程序session返回类
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 27/2/2023 9:10 PM
* 获取下级/下游企业小程序session返回类
*
* @author libo
*/
@Data
public class WxCpMaTransferSession implements Serializable {

View File

@ -6,12 +6,9 @@ import lombok.Data;
import java.io.Serializable;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.bean.linkedcorp
* @Description: 获取应用可见范围请求类
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 28/2/2023 6:16 PM
* 获取应用可见范围请求类
*
* @author libo
*/
@Data
public class WxCpLinkedCorpAgentPerm implements Serializable {

View File

@ -1,23 +1,14 @@
package me.chanjar.weixin.cp.bean.linkedcorp;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.bean.linkedcorp
* @Description: 获取互联企业部门列表
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 28/2/2023 6:16 PM
* 获取互联企业部门列表
*
* @author libo
*/
@Data
public class WxCpLinkedCorpDepartment implements Serializable {

View File

@ -6,20 +6,15 @@ import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
import me.chanjar.weixin.cp.bean.WxCpUser;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.bean.linkedcorp
* @Description: 获取互联企业成员详细信息
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 28/2/2023 6:16 PM
* 获取互联企业成员详细信息
*
* @author libo
*/
@Data
public class WxCpLinkedCorpUser implements Serializable {

View File

@ -11,12 +11,13 @@ import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
* The type Wx cp xml out event message.
*
* @author eYoung
* @description: created on create at 2021/12/3 16:36
* created at 2021/12/3 16:36
*/
@XStreamAlias("xml")
@Data
@EqualsAndHashCode(callSuper = false)
public class WxCpXmlOutEventMessage extends WxCpXmlOutMessage {
private static final long serialVersionUID = -692538307520295832L;
@XStreamAlias("Event")
@XStreamConverter(value = XStreamCDataConverter.class)

View File

@ -6,7 +6,7 @@ import me.chanjar.weixin.cp.bean.message.WxCpXmlOutEventMessage;
* The type Event builder.
*
* @author eYoung
* @description: created on create at 2021/12/3 16:34
* created at 2021/12/3 16:34
*/
public class EventBuilder extends BaseBuilder<EventBuilder, WxCpXmlOutEventMessage> {

View File

@ -14,7 +14,7 @@ import java.util.List;
/**
* @author chenjie03
* @version 1.0
* @date 2022/11/4 11:54
* @since 2022/11/4 11:54
*/
@Data
@Builder

View File

@ -12,7 +12,7 @@ import java.io.Serializable;
/**
* @author chenjie03
* @version 1.0
* @date 2022/11/4 11:57
* @since 2022/11/4 11:57
*/
@Data
@Builder

View File

@ -12,7 +12,7 @@ import java.io.Serializable;
/**
* @author chenjie03
* @version 1.0
* @date 2022/11/4 12:12
* @since 2022/11/4 12:12
*/
@Data
@Builder

View File

@ -8,7 +8,7 @@ import java.io.Serializable;
* The type Work bench key data.
*
* @author songshiyu created on : create in 10:21 2020/9/28
* @description: 关键数据型模板类型
* 关键数据型模板类型
*/
@Data
public class WorkBenchKeyData implements Serializable {

View File

@ -5,23 +5,25 @@ import lombok.Data;
import java.io.Serializable;
/**
* The type Work bench list.
* 列表模板类型 *
*
* @author songshiyu created on : create in 10:21 2020/9/28
* @description: 列表模板类型
* @author songshiyu
* created at 10:21 2020/9/28
*/
@Data
public class WorkBenchList implements Serializable {
/*
private static final long serialVersionUID = -7892708831294949257L;
/**
* 列表显示文字不超过128个字节
* */
*/
private String title;
/*
/**
* 点击跳转url若不填且应用设置了主页url则跳转到主页url否则跳到应用会话窗口
* */
*/
private String jumpUrl;
/*
/**
* 若应用为小程序类型该字段填小程序pagepath若未设置跳到小程序主页
* */
*/
private String pagePath;
}

View File

@ -2,18 +2,13 @@ package me.chanjar.weixin.cp.config;
import me.chanjar.weixin.common.bean.WxAccessToken;
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
import me.chanjar.weixin.cp.bean.WxCpProviderToken;
import java.io.File;
import java.util.concurrent.locks.Lock;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.config
* @Description: 微信客户端(企业互联)配置
* @or: libo
* @Email: 422423229@qq.com
* @Date: 1/3/2023 9:56 AM
* 微信客户端(企业互联)配置
*
* @author libo
*/
public interface WxCpCorpGroupConfigStorage {
/**

View File

@ -2,11 +2,9 @@ package me.chanjar.weixin.cp.config.impl;
import me.chanjar.weixin.common.bean.WxAccessToken;
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
import me.chanjar.weixin.cp.config.WxCpConfigStorage;
import me.chanjar.weixin.cp.config.WxCpCorpGroupConfigStorage;
import org.apache.commons.lang3.StringUtils;
import java.io.File;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
@ -15,12 +13,9 @@ import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.config.impl
* @Description: 基于内存的微信配置provider在实际生产环境中应该将这些配置持久化.
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 1/3/2023 10:30 AM
* 基于内存的微信配置provider在实际生产环境中应该将这些配置持久化.
*
* @author libo
*/
public class WxCpCorpGroupDefaultConfigImpl implements WxCpCorpGroupConfigStorage, Serializable {
private final transient Map<String, Lock> corpAccessTokenLocker = new ConcurrentHashMap<>();

View File

@ -6,7 +6,6 @@ import lombok.Setter;
import me.chanjar.weixin.common.bean.WxAccessToken;
import me.chanjar.weixin.common.redis.WxRedisOps;
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
import me.chanjar.weixin.cp.bean.WxCpProviderToken;
import me.chanjar.weixin.cp.config.WxCpCorpGroupConfigStorage;
import org.apache.commons.lang3.StringUtils;
@ -15,15 +14,12 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.config.impl
* @Description: 企业微信企业互联各种固定、授权配置的Redisson存储实现
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 1/3/2023 10:48 AM
* 企业微信企业互联各种固定、授权配置的Redisson存储实现
*
* @author libo Email: 422423229@qq.com
* @since 1/3/2023 10:48 AM
*/
@Builder
public class WxCpCorpGroupRedissonConfigImpl implements WxCpCorpGroupConfigStorage, Serializable {

View File

@ -11,19 +11,16 @@ import me.chanjar.weixin.cp.bean.corpgroup.WxCpMaTransferSession;
import me.chanjar.weixin.cp.config.WxCpCorpGroupConfigStorage;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.corpgroup.service
* @Description: 企业微信企业互联API的Service.
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 1/3/2023 5:37 PM
* 企业微信企业互联API的Service.
*
* @author libo
*/
public interface WxCpCgService {
/**
* Update corp access token.
*
* @param corpId
* @param agentId
* @param corpId .
* @param agentId .
* @param corpAccessToken the corp access token
* @param expiresInSeconds the expires in seconds
*/
@ -146,6 +143,7 @@ public interface WxCpCgService {
void setWxCpCorpGroupConfigStorage(WxCpCorpGroupConfigStorage wxCpCorpGroupConfigStorage);
WxCpCorpGroupConfigStorage getWxCpCorpGroupConfigStorage();
/**
* http请求对象.
*
@ -165,10 +163,11 @@ public interface WxCpCgService {
/**
* 获取下级/下游企业小程序session
* https://developer.work.weixin.qq.com/document/path/93355
*
* @param userId
* @param sessionKey
* @return
* @throws WxErrorException
*/
WxCpMaTransferSession getCorpTransferSession(String userId, String sessionKey,WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
WxCpMaTransferSession getCorpTransferSession(String userId, String sessionKey, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
}

View File

@ -1,7 +1,7 @@
package me.chanjar.weixin.cp.corpgroup.service;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.cp.bean.corpgroup.*;
import me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorpGetTokenReq;
import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpAgentPerm;
import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpDepartment;
import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpUser;
@ -9,22 +9,20 @@ import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpUser;
import java.util.List;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.api
* @Description: 互联企业相关接口
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 27/2/2023 9:57 PM
* 互联企业相关接口
*
* @author libo Email: 422423229@qq.com
* @since 27/2/2023 9:57 PM
*/
public interface WxCpLinkedCorpService {
WxCpLinkedCorpAgentPerm getLinkedCorpAgentPerm(WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
WxCpLinkedCorpUser getLinkedCorpUser(String userId,WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
WxCpLinkedCorpUser getLinkedCorpUser(String userId, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
List<WxCpLinkedCorpUser> getLinkedCorpSimpleUserList(String departmentId,WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
List<WxCpLinkedCorpUser> getLinkedCorpSimpleUserList(String departmentId, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
List<WxCpLinkedCorpUser> getLinkedCorpUserList(String departmentId,WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
List<WxCpLinkedCorpUser> getLinkedCorpUserList(String departmentId, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
List<WxCpLinkedCorpDepartment> getLinkedCorpDepartmentList(String departmentId,WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
List<WxCpLinkedCorpDepartment> getLinkedCorpDepartmentList(String departmentId, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
}

View File

@ -26,12 +26,8 @@ import java.io.IOException;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.CorpGroup.*;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.corpgroup.service.impl
* @Description:
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 1/3/2023 5:45 PM
* @author libo Email: 422423229@qq.com
* @since 1/3/2023 5:45 PM
*/
@Slf4j
public abstract class BaseWxCpCgServiceImpl<H, P> implements WxCpCgService, RequestHttp<H, P> {

View File

@ -1,20 +1,14 @@
package me.chanjar.weixin.cp.corpgroup.service.impl;
import com.fasterxml.jackson.databind.ser.Serializers;
import me.chanjar.weixin.common.util.http.HttpType;
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
import me.chanjar.weixin.common.util.http.apache.DefaultApacheHttpClientBuilder;
import org.apache.http.HttpHost;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.CloseableHttpClient;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.corpgroup.service.impl
* @Description:
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 1/3/2023 6:16 PM
* @author libo Email: 422423229@qq.com
* @since 1/3/2023 6:16 PM
*/
public class WxCpCgServiceApacheHttpClientImpl extends BaseWxCpCgServiceImpl<CloseableHttpClient, HttpHost> {
private CloseableHttpClient httpClient;

View File

@ -6,12 +6,11 @@ import lombok.RequiredArgsConstructor;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.common.util.json.GsonParser;
import me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorpGetTokenReq;
import me.chanjar.weixin.cp.corpgroup.service.WxCpCgService;
import me.chanjar.weixin.cp.corpgroup.service.WxCpLinkedCorpService;
import me.chanjar.weixin.cp.api.WxCpService;
import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpAgentPerm;
import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpDepartment;
import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpUser;
import me.chanjar.weixin.cp.corpgroup.service.WxCpCgService;
import me.chanjar.weixin.cp.corpgroup.service.WxCpLinkedCorpService;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.util.List;
@ -19,12 +18,10 @@ import java.util.List;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.LinkedCorp.*;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.api.impl
* @Description: 互联企业相关接口实现类
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 27/2/2023 10:02 PM
* 互联企业相关接口实现类
*
* @author libo Email: 422423229@qq.com
* @since 27/2/2023 10:02 PM
*/
@RequiredArgsConstructor
public class WxCpLinkedCorpServiceImpl implements WxCpLinkedCorpService {
@ -57,7 +54,7 @@ public class WxCpLinkedCorpServiceImpl implements WxCpLinkedCorpService {
final String url = this.cpCgService.getWxCpCorpGroupConfigStorage().getApiUrl(GET_USER_SIMPLELIST);
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("department_id", departmentId);
String responseContent = this.cpCgService.post(url, jsonObject.toString(),req);
String responseContent = this.cpCgService.post(url, jsonObject.toString(), req);
JsonObject tmpJson = GsonParser.parse(responseContent);
return WxCpGsonBuilder.create().fromJson(tmpJson.get("userlist"),
@ -71,7 +68,7 @@ public class WxCpLinkedCorpServiceImpl implements WxCpLinkedCorpService {
final String url = this.cpCgService.getWxCpCorpGroupConfigStorage().getApiUrl(GET_USER_LIST);
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("department_id", departmentId);
String responseContent = this.cpCgService.post(url, jsonObject.toString(),req);
String responseContent = this.cpCgService.post(url, jsonObject.toString(), req);
JsonObject tmpJson = GsonParser.parse(responseContent);
return WxCpGsonBuilder.create().fromJson(tmpJson.get("userlist"),
@ -85,7 +82,7 @@ public class WxCpLinkedCorpServiceImpl implements WxCpLinkedCorpService {
final String url = this.cpCgService.getWxCpCorpGroupConfigStorage().getApiUrl(GET_DEPARTMENT_LIST);
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("department_id", departmentId);
String responseContent = this.cpCgService.post(url, jsonObject.toString(),req);
String responseContent = this.cpCgService.post(url, jsonObject.toString(), req);
JsonObject tmpJson = GsonParser.parse(responseContent);
return WxCpGsonBuilder.create().fromJson(tmpJson.get("department_list"),

View File

@ -8,7 +8,6 @@ import me.chanjar.weixin.cp.bean.WxCpTpContactSearchResp;
* The interface Wx cp tp contact service.
*
* @author uianz
* @description
* @since 2020 /12/23 下午 02:39
*/
public interface WxCpTpContactService {

View File

@ -13,7 +13,6 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.CONTACT_SEARCH;
* The type Wx cp tp contact service.
*
* @author uianz
* @description
* @since 2020 /12/23 下午 02:39
*/
@RequiredArgsConstructor

View File

@ -20,7 +20,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Department.*;
* The type Wx cp tp department service.
*
* @author uianz
* @description corp from {@link WxCpDepartmentServiceImpl )} 唯一不同在于获取部门列表时需要传对应企业的accessToken
* copy from {@link WxCpDepartmentServiceImpl )} 唯一不同在于获取部门列表时需要传对应企业的accessToken
* @since 2020 /12/23 下午 02:39
*/
@RequiredArgsConstructor

View File

@ -17,6 +17,7 @@ import java.util.Base64;
/**
* The type Wx cp crypt util.
* @author qian
*/
public class WxCpCryptUtil extends WxCryptUtil {
/**
@ -53,7 +54,7 @@ public class WxCpCryptUtil extends WxCryptUtil {
throw new WxErrorException("请配置会话存档解密方式");
}
if (pkcs1.intValue() == 1) {
if (pkcs1 == 1) {
return decryptPriKeyByPKCS1(encryptRandomKey, msgAuditPriKey);
}
@ -72,7 +73,7 @@ public class WxCpCryptUtil extends WxCryptUtil {
String privateKey = msgAuditPriKey.replaceAll("(\r\n|\r|\n|\n\r)", "")
.replace("-----BEGIN PRIVATE KEY-----", "")
.replace("-----END PRIVATE KEY-----", "")
.replaceAll(" ", "");
.replace(" ", "");
byte[] keyBytes = Base64.getDecoder().decode(privateKey);
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
@ -99,7 +100,7 @@ public class WxCpCryptUtil extends WxCryptUtil {
String privateKey = msgAuditPriKey.replaceAll("(\r\n|\r|\n|\n\r)", "")
.replace("-----BEGIN RSA PRIVATE KEY-----", "")
.replace("-----END RSA PRIVATE KEY-----", "")
.replaceAll(" ", "");
.replace(" ", "");
byte[] keyBytes = Base64.getDecoder().decode(privateKey);
DerValue[] seq = new DerInputStream(keyBytes).getSequence(0);

View File

@ -16,10 +16,10 @@ import java.util.ArrayList;
import java.util.List;
/**
* The type Wx cp agent work bench impl test.
* 测试工作台服务
*
* @author songshiyu created on : create in 10:31 2020/9/29
* @description: 测试工作台服务
* @author songshiyu
* created at 10:31 2020/9/29
*/
@Guice(modules = ApiTestModule.class)
public class WxCpAgentWorkBenchImplTest {

View File

@ -1,29 +1,19 @@
package me.chanjar.weixin.cp.api.impl;
import com.google.gson.JsonObject;
import com.google.inject.Inject;
import me.chanjar.weixin.common.bean.WxAccessToken;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.cp.api.ApiTestModule;
import me.chanjar.weixin.cp.api.WxCpService;
import me.chanjar.weixin.cp.bean.corpgroup.*;
import me.chanjar.weixin.cp.corpgroup.service.WxCpCgService;
import me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorp;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
import java.util.List;
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.CorpGroup.CORP_GET_TOKEN;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.api.impl
* @Description:
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 28/2/2023 7:06 PM
* @author libo
*/
@Guice(modules = ApiTestModule.class)
public class WxCpCorpGroupServiceImplTest {

View File

@ -26,12 +26,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.CorpGroup.MA_TRANS
import static org.testng.Assert.assertNotNull;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.corpgroup.service.impl
* @Description:
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 2/3/2023 4:00 PM
* @author libo
*/
@Guice(modules = ApiTestModule.class)
public class WxCpCgServiceApacheHttpClientImplTest {

View File

@ -21,12 +21,7 @@ import java.util.List;
import static org.testng.Assert.assertNotNull;
/**
* @Project: WxJava
* @Package: me.chanjar.weixin.cp.api.impl
* @Description:
* @Author: libo
* @Email: 422423229@qq.com
* @Date: 28/2/2023 7:06 PM
* @author libo
*/
@Guice(modules = ApiTestModule.class)
public class WxCpLinkedCorpServiceImplTest {

View File

@ -6,7 +6,7 @@ import java.util.List;
/**
*
* @Description :微信营销接口
* 微信营销接口
* @author <a href="https://github.com/184759547">184759547</a>
* @since : 2021/12/28
*/

View File

@ -3,7 +3,6 @@ package cn.binarywang.wx.miniapp.api.impl;
import cn.binarywang.wx.miniapp.api.WxMaMarketingService;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.bean.marketing.WxMaUserAction;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -14,7 +13,7 @@ import java.util.List;
/**
* @author <a href="https://github.com/184759547">184759547</a>
* @Description :微信营销接口
* 微信营销接口
* @since : 2021/12/28
*/
@Slf4j

View File

@ -11,7 +11,8 @@ import java.io.Serializable;
import java.util.List;
/**
* @Description :微信营销接口
* 微信营销接口
*
* @author <a href="https://github.com/184759547">184759547</a>
* @since : 2021/12/28
*/

View File

@ -3,7 +3,6 @@ package me.chanjar.weixin.mp.bean.kefu;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.mp.builder.kefu.*;
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
@ -124,18 +123,18 @@ public class WxMpKefuMessage implements Serializable {
/**
* <pre>
* 请使用
* {@link WxConsts.KefuMsgType#TEXT}
* {@link WxConsts.KefuMsgType#IMAGE}
* {@link WxConsts.KefuMsgType#VOICE}
* {@link WxConsts.KefuMsgType#MUSIC}
* {@link WxConsts.KefuMsgType#VIDEO}
* {@link WxConsts.KefuMsgType#NEWS}
* {@link WxConsts.KefuMsgType#MPNEWS}
* {@link WxConsts.KefuMsgType#WXCARD}
* {@link WxConsts.KefuMsgType#MINIPROGRAMPAGE}
* {@link WxConsts.KefuMsgType#TASKCARD}
* {@link WxConsts.KefuMsgType#MSGMENU}
* {@link WxConsts.KefuMsgType#MP_NEWS_ARTICLE}
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#TEXT}
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#IMAGE}
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#VOICE}
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#MUSIC}
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#VIDEO}
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#NEWS}
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#MPNEWS}
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#WXCARD}
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#MINIPROGRAMPAGE}
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#TASKCARD}
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#MSGMENU}
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#MP_NEWS_ARTICLE}
* </pre>
*/
public void setMsgType(String msgType) {

View File

@ -1,48 +1,48 @@
package me.chanjar.weixin.mp.builder.outxml;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutDeviceMessage;
/**
* 设备消息 Builder
* @author biggates
* @see https://iot.weixin.qq.com/wiki/new/index.html?page=3-4-2
*/
public final class DeviceBuilder extends BaseBuilder<DeviceBuilder, WxMpXmlOutDeviceMessage> {
private String deviceId;
private String deviceType;
private String content;
private String sessionId;
public DeviceBuilder deviceType(String deviceType) {
this.deviceType = deviceType;
return this;
}
public DeviceBuilder deviceId(String deviceId) {
this.deviceId = deviceId;
return this;
}
public DeviceBuilder content(String content) {
this.content = content;
return this;
}
public DeviceBuilder sessionId(String sessionId) {
this.sessionId = sessionId;
return this;
}
@Override
public WxMpXmlOutDeviceMessage build() {
WxMpXmlOutDeviceMessage m = new WxMpXmlOutDeviceMessage();
setCommon(m);
m.setDeviceId(this.deviceId);
m.setDeviceType(this.deviceType);
m.setContent(this.content);
m.setSessionId(this.sessionId);
return m;
}
}
package me.chanjar.weixin.mp.builder.outxml;
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutDeviceMessage;
/**
* 设备消息 Builder
* @author biggates
* @see <a href="https://iot.weixin.qq.com/wiki/new/index.html?page=3-4-2">文档</a>
*/
public final class DeviceBuilder extends BaseBuilder<DeviceBuilder, WxMpXmlOutDeviceMessage> {
private String deviceId;
private String deviceType;
private String content;
private String sessionId;
public DeviceBuilder deviceType(String deviceType) {
this.deviceType = deviceType;
return this;
}
public DeviceBuilder deviceId(String deviceId) {
this.deviceId = deviceId;
return this;
}
public DeviceBuilder content(String content) {
this.content = content;
return this;
}
public DeviceBuilder sessionId(String sessionId) {
this.sessionId = sessionId;
return this;
}
@Override
public WxMpXmlOutDeviceMessage build() {
WxMpXmlOutDeviceMessage m = new WxMpXmlOutDeviceMessage();
setCommon(m);
m.setDeviceId(this.deviceId);
m.setDeviceType(this.deviceType);
m.setContent(this.content);
m.setSessionId(this.sessionId);
return m;
}
}

View File

@ -8,8 +8,7 @@ import java.lang.reflect.Type;
import java.util.*;
/**
* @author robgao
* @Email 315789501@qq.com
* @author robgao Email 315789501@qq.com
*/
public class WxOpenAuthorizerListResultGsonAdapter implements JsonDeserializer<WxOpenAuthorizerListResult> {