mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-27 11:53:48 +08:00
🎨 修复部分错误的javadoc标签
This commit is contained in:
@ -10,7 +10,7 @@ import me.chanjar.weixin.channel.bean.base.WxChannelBaseResponse;
|
|||||||
* 资金流水列表 响应
|
* 资金流水列表 响应
|
||||||
*
|
*
|
||||||
* @author LiXiZe
|
* @author LiXiZe
|
||||||
* @date 2023-04-16
|
* @since 2023-04-16
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import org.testng.annotations.Test;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author LiXiZe
|
* @author LiXiZe
|
||||||
* @date 2023-04-20
|
* @since 2023-04-20
|
||||||
*/
|
*/
|
||||||
public class WxChannelMessageRouterRuleTest {
|
public class WxChannelMessageRouterRuleTest {
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ import org.testng.annotations.Test;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author LiXiZe
|
* @author LiXiZe
|
||||||
* @date 2023-04-21
|
* @since 2023-04-21
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Guice(modules = ApiTestModule.class)
|
@Guice(modules = ApiTestModule.class)
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import static org.testng.Assert.assertTrue;
|
|||||||
/**
|
/**
|
||||||
* @author jiangby
|
* @author jiangby
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @description: 作用
|
|
||||||
* created on 2022/5/26 1:46
|
* created on 2022/5/26 1:46
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@ -12,8 +12,7 @@ import java.util.List;
|
|||||||
* Q:JAVA版本的sdk报错UnsatisfiedLinkError?
|
* Q:JAVA版本的sdk报错UnsatisfiedLinkError?
|
||||||
* A:请检查是否修改了sdk的包名。
|
* A:请检查是否修改了sdk的包名。
|
||||||
* <p>
|
* <p>
|
||||||
* 官方文档:
|
* <a href="https://developer.work.weixin.qq.com/document/path/91552">官方文档</a>
|
||||||
* https://developer.work.weixin.qq.com/document/path/91552
|
|
||||||
*
|
*
|
||||||
* @author <a href="https://github.com/0katekate0">Wang_Wong</a> created on 2022-01-17
|
* @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 SO_FILE = "so";
|
||||||
private static final String DLL_FILE = "dll";
|
private static final String DLL_FILE = "dll";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* New sdk long.
|
* New sdk long.
|
||||||
*
|
*
|
||||||
* @return the long
|
* @return the long
|
||||||
*/
|
*/
|
||||||
public native static long NewSdk();
|
public static native long NewSdk();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化函数
|
* 初始化函数
|
||||||
* Return值=0表示该API调用成功
|
* Return值=0表示该API调用成功
|
||||||
*
|
*
|
||||||
* @param sdk the sdk
|
* @param sdk the sdk
|
||||||
* @param corpid the corpid
|
* @param corpid the corpid
|
||||||
* @param secret the secret
|
* @param secret the secret
|
||||||
* @return 返回是否初始化成功 0 - 成功 !=0 - 失败
|
* @return 返回是否初始化成功 0 - 成功 !=0 - 失败
|
||||||
*/
|
*/
|
||||||
public native static int Init(long sdk, String corpid, String secret);
|
public static native int Init(long sdk, String corpid, String secret);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拉取聊天记录函数
|
* 拉取聊天记录函数
|
||||||
* Return值=0表示该API调用成功
|
* Return值=0表示该API调用成功
|
||||||
*
|
*
|
||||||
* @param sdk the sdk
|
* @param sdk the sdk
|
||||||
* @param seq the seq
|
* @param seq the seq
|
||||||
* @param limit the limit
|
* @param limit the limit
|
||||||
* @param proxy the proxy
|
* @param proxy the proxy
|
||||||
* @param passwd the passwd
|
* @param passwd the passwd
|
||||||
* @param timeout the timeout
|
* @param timeout the timeout
|
||||||
* @param chatData the chat data
|
* @param chatData the chat data
|
||||||
* @return 返回是否调用成功 0 - 成功 !=0 - 失败
|
* @return 返回是否调用成功 0 - 成功 !=0 - 失败
|
||||||
*/
|
*/
|
||||||
public native static int GetChatData(long sdk, long seq, long limit, String proxy, String passwd, long timeout, long chatData);
|
public static native int GetChatData(long sdk, long seq, long limit, String proxy, String passwd, long timeout, long chatData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拉取媒体消息函数
|
* 拉取媒体消息函数
|
||||||
* Return值=0表示该API调用成功
|
* Return值=0表示该API调用成功
|
||||||
*
|
*
|
||||||
* @param sdk the sdk
|
* @param sdk the sdk
|
||||||
* @param indexbuf the indexbuf
|
* @param indexbuf the indexbuf
|
||||||
* @param sdkField the sdk field
|
* @param sdkField the sdk field
|
||||||
* @param proxy the proxy
|
* @param proxy the proxy
|
||||||
* @param passwd the passwd
|
* @param passwd the passwd
|
||||||
* @param timeout the timeout
|
* @param timeout the timeout
|
||||||
* @param mediaData the media data
|
* @param mediaData the media data
|
||||||
* @return 返回是否调用成功 0 - 成功 !=0 - 失败
|
* @return 返回是否调用成功 0 - 成功 !=0 - 失败
|
||||||
*/
|
*/
|
||||||
public native static int GetMediaData(long sdk, String indexbuf, String sdkField, String proxy, String passwd, long timeout, long mediaData);
|
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 sdk the sdk
|
||||||
* @param encrypt_key the encrypt key
|
* @param encrypt_key the encrypt key
|
||||||
* @param encrypt_msg the encrypt msg
|
* @param encrypt_msg the encrypt msg
|
||||||
* @param msg the msg
|
* @param msg the msg
|
||||||
* @return 返回是否调用成功 0 - 成功 !=0 - 失败
|
* @return 返回是否调用成功 0 - 成功 !=0 - 失败
|
||||||
* @brief 解析密文
|
*/
|
||||||
*/
|
public static native int DecryptData(long sdk, String encrypt_key, String encrypt_msg, long msg);
|
||||||
public native static int DecryptData(long sdk, String encrypt_key, String encrypt_msg, long msg);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroy sdk.
|
* Destroy sdk.
|
||||||
*
|
*
|
||||||
* @param sdk the sdk
|
* @param sdk the sdk
|
||||||
*/
|
*/
|
||||||
public native static void DestroySdk(long sdk);
|
public static native void DestroySdk(long sdk);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* New slice long.
|
* New slice long.
|
||||||
*
|
*
|
||||||
* @return the long
|
* @return the long
|
||||||
*/
|
*/
|
||||||
public native static long NewSlice();
|
public static native long NewSlice();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free slice.
|
* 释放slice ,和NewSlice成对使用
|
||||||
*
|
*
|
||||||
* @param slice the slice
|
* @param slice the slice
|
||||||
* @return
|
*/
|
||||||
* @brief 释放slice ,和NewSlice成对使用
|
public static native void FreeSlice(long slice);
|
||||||
*/
|
|
||||||
public native static void FreeSlice(long slice);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get content from slice string.
|
* 获取slice内容
|
||||||
*
|
*
|
||||||
* @param slice the slice
|
* @param slice the slice
|
||||||
* @return 内容 string
|
* @return 内容 string
|
||||||
* @brief 获取slice内容
|
*/
|
||||||
*/
|
public static native String GetContentFromSlice(long slice);
|
||||||
public native static String GetContentFromSlice(long slice);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get slice len int.
|
* 获取slice内容长度
|
||||||
*
|
*
|
||||||
* @param slice the slice
|
* @param slice the slice
|
||||||
* @return 内容 int
|
* @return 内容 int
|
||||||
* @brief 获取slice内容长度
|
*/
|
||||||
*/
|
public static native int GetSliceLen(long slice);
|
||||||
public native static int GetSliceLen(long slice);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* New media data long.
|
* New media data long.
|
||||||
*
|
*
|
||||||
* @return the long
|
* @return the long
|
||||||
*/
|
*/
|
||||||
public native static long NewMediaData();
|
public static native long NewMediaData();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free media data.
|
* Free media data.
|
||||||
*
|
*
|
||||||
* @param mediaData the media data
|
* @param mediaData the media data
|
||||||
*/
|
*/
|
||||||
public native static void FreeMediaData(long mediaData);
|
public static native void FreeMediaData(long mediaData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get out index buf string.
|
* 获取 mediadata outindex
|
||||||
*
|
*
|
||||||
* @param mediaData the media data
|
* @param mediaData the media data
|
||||||
* @return outindex string
|
* @return outindex string
|
||||||
* @brief 获取mediadata outindex
|
*/
|
||||||
*/
|
public static native String GetOutIndexBuf(long mediaData);
|
||||||
public native static String GetOutIndexBuf(long mediaData);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get data byte [ ].
|
* 获取 mediadata data数据
|
||||||
*
|
*
|
||||||
* @param mediaData the media data
|
* @param mediaData the media data
|
||||||
* @return data byte [ ]
|
* @return data byte [ ]
|
||||||
* @brief 获取mediadata data数据
|
*/
|
||||||
*/
|
public static native byte[] GetData(long mediaData);
|
||||||
public native static byte[] GetData(long mediaData);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get index len int.
|
* Get index len int.
|
||||||
*
|
*
|
||||||
* @param mediaData the media data
|
* @param mediaData the media data
|
||||||
* @return the int
|
* @return the int
|
||||||
*/
|
*/
|
||||||
public native static int GetIndexLen(long mediaData);
|
public static native int GetIndexLen(long mediaData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get data len int.
|
* Get data len int.
|
||||||
*
|
*
|
||||||
* @param mediaData the media data
|
* @param mediaData the media data
|
||||||
* @return the int
|
* @return the int
|
||||||
*/
|
*/
|
||||||
public native static int GetDataLen(long mediaData);
|
public static native int GetDataLen(long mediaData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Is media data finish int.
|
* Is media data finish int.
|
||||||
*
|
*
|
||||||
* @param mediaData the media data
|
* @param mediaData the media data
|
||||||
* @return 1完成 、0未完成
|
* @return 1完成 、0未完成
|
||||||
* @brief 判断mediadata是否结束
|
* 判断mediadata是否结束
|
||||||
*/
|
*/
|
||||||
public native static int IsMediaDataFinish(long mediaData);
|
public static native int IsMediaDataFinish(long mediaData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 判断Windows环境
|
* 判断Windows环境
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return boolean boolean
|
||||||
*/
|
*/
|
||||||
public static boolean isWindows() {
|
public static boolean isWindows() {
|
||||||
String osName = System.getProperties().getProperty("os.name");
|
String osName = System.getProperties().getProperty("os.name");
|
||||||
log.info("Loading System Libraries, Current OS Version Is: {}", osName);
|
log.info("Loading System Libraries, Current OS Version Is: {}", osName);
|
||||||
return osName.toUpperCase().contains("WINDOWS");
|
return osName.toUpperCase().contains("WINDOWS");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加载系统类库
|
* 加载系统类库
|
||||||
*
|
*
|
||||||
* @param libFiles 类库配置文件
|
* @param libFiles 类库配置文件
|
||||||
* @param prefixPath 类库文件的前缀路径
|
* @param prefixPath 类库文件的前缀路径
|
||||||
*/
|
*/
|
||||||
public Finance(List<String> libFiles, String prefixPath) {
|
public Finance(List<String> libFiles, String prefixPath) {
|
||||||
boolean isWindows = Finance.isWindows();
|
boolean isWindows = Finance.isWindows();
|
||||||
for (String file : libFiles) {
|
for (String file : libFiles) {
|
||||||
String suffix = file.substring(file.lastIndexOf(".") + 1);
|
String suffix = file.substring(file.lastIndexOf(".") + 1);
|
||||||
@ -219,14 +211,14 @@ public class Finance {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化类库文件
|
* 初始化类库文件
|
||||||
*
|
*
|
||||||
* @param libFiles the lib files
|
* @param libFiles the lib files
|
||||||
* @param prefixPath the prefix path
|
* @param prefixPath the prefix path
|
||||||
* @return finance
|
* @return finance finance
|
||||||
*/
|
*/
|
||||||
public synchronized static Finance loadingLibraries(List<String> libFiles, String prefixPath) {
|
public static synchronized Finance loadingLibraries(List<String> libFiles, String prefixPath) {
|
||||||
if (finance != null) {
|
if (finance != null) {
|
||||||
return finance;
|
return finance;
|
||||||
}
|
}
|
||||||
@ -234,12 +226,12 @@ public class Finance {
|
|||||||
return finance;
|
return finance;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单例sdk
|
* 单例sdk
|
||||||
*
|
*
|
||||||
* @return long
|
* @return long
|
||||||
*/
|
*/
|
||||||
public synchronized static long SingletonSDK() {
|
public static synchronized long SingletonSDK() {
|
||||||
if (sdk > 0) {
|
if (sdk > 0) {
|
||||||
return sdk;
|
return sdk;
|
||||||
}
|
}
|
||||||
@ -247,13 +239,12 @@ public class Finance {
|
|||||||
return sdk;
|
return sdk;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 销毁sdk,保证线程可见性
|
* 销毁sdk,保证线程可见性
|
||||||
*
|
*
|
||||||
* @param destroySDK the destroy sdk
|
* @param destroySDK the destroy sdk
|
||||||
* @return
|
*/
|
||||||
*/
|
public static synchronized void DestroySingletonSDK(long destroySDK) {
|
||||||
public synchronized static void DestroySingletonSDK(long destroySDK) {
|
|
||||||
sdk = 0L;
|
sdk = 0L;
|
||||||
Finance.DestroySdk(destroySDK);
|
Finance.DestroySdk(destroySDK);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,18 +1,27 @@
|
|||||||
package me.chanjar.weixin.cp.api;
|
package me.chanjar.weixin.cp.api;
|
||||||
|
|
||||||
import me.chanjar.weixin.common.error.WxErrorException;
|
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;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 企业互联相关接口
|
||||||
* @Package: me.chanjar.weixin.cp.api
|
*
|
||||||
* @Description: 企业互联相关接口
|
* @author libo <422423229@qq.com>
|
||||||
* @Author: libo
|
* Created on 27/2/2023 9:57 PM
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 27/2/2023 9:57 PM
|
|
||||||
*/
|
*/
|
||||||
public interface WxCpCorpGroupService {
|
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;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,10 +10,10 @@ import me.chanjar.weixin.cp.bean.WxCpAgentWorkBench;
|
|||||||
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.WorkBench.*;
|
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
|
* @author songshiyu
|
||||||
* @description: 工作台自定义展示实现
|
* created at 11:24 2020/9/28
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class WxCpAgentWorkBenchServiceImpl implements WxCpAgentWorkBenchService {
|
public class WxCpAgentWorkBenchServiceImpl implements WxCpAgentWorkBenchService {
|
||||||
|
|||||||
@ -7,29 +7,27 @@ import me.chanjar.weixin.common.error.WxErrorException;
|
|||||||
import me.chanjar.weixin.common.util.json.GsonParser;
|
import me.chanjar.weixin.common.util.json.GsonParser;
|
||||||
import me.chanjar.weixin.cp.api.WxCpCorpGroupService;
|
import me.chanjar.weixin.cp.api.WxCpCorpGroupService;
|
||||||
import me.chanjar.weixin.cp.api.WxCpService;
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
import me.chanjar.weixin.cp.bean.corpgroup.*;
|
import me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorp;
|
||||||
import me.chanjar.weixin.cp.constant.WxCpApiPathConsts;
|
import me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorpListAppShareInfoResp;
|
||||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.CorpGroup.*;
|
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.CorpGroup.LIST_SHARE_APP_INFO;
|
||||||
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.LinkedCorp.GET_PERM_LIST;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 企业互联相关接口实现类
|
||||||
* @Package: me.chanjar.weixin.cp.api.impl
|
*
|
||||||
* @Description: 企业互联相关接口实现类
|
* @author libo <422423229@qq.com>
|
||||||
* @Author: libo
|
* Created on 27/2/2023 9:57 PM
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 27/2/2023 10:02 PM
|
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class WxCpCorpGroupServiceImpl implements WxCpCorpGroupService {
|
public class WxCpCorpGroupServiceImpl implements WxCpCorpGroupService {
|
||||||
private final WxCpService cpService;
|
private final WxCpService cpService;
|
||||||
|
|
||||||
@Override
|
@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);
|
final String url = this.cpService.getWxCpConfigStorage().getApiUrl(LIST_SHARE_APP_INFO);
|
||||||
JsonObject jsonObject = new JsonObject();
|
JsonObject jsonObject = new JsonObject();
|
||||||
jsonObject.addProperty("agentid", agentId);
|
jsonObject.addProperty("agentid", agentId);
|
||||||
|
|||||||
@ -11,7 +11,6 @@ import java.io.Serializable;
|
|||||||
* The type Wx cp tp contact search.
|
* The type Wx cp tp contact search.
|
||||||
*
|
*
|
||||||
* @author uianz
|
* @author uianz
|
||||||
* @description
|
|
||||||
* @since 2020 /12/23 下午 02:43
|
* @since 2020 /12/23 下午 02:43
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@ -12,7 +12,6 @@ import java.util.List;
|
|||||||
* The type Wx cp tp contact search resp.
|
* The type Wx cp tp contact search resp.
|
||||||
*
|
*
|
||||||
* @author uianz
|
* @author uianz
|
||||||
* @description
|
|
||||||
* @since 2020 /12/23 下午 02:55
|
* @since 2020 /12/23 下午 02:55
|
||||||
*/
|
*/
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author freedom
|
* @author freedom
|
||||||
* @date 2022/10/20 16:36
|
* @since 2022/10/20 16:36
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WxTpCustomizedAuthUrl extends WxCpBaseResp {
|
public class WxTpCustomizedAuthUrl extends WxCpBaseResp {
|
||||||
|
|||||||
@ -8,12 +8,7 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* @author libo
|
||||||
* @Package: me.chanjar.weixin.cp.bean.corpgroup
|
|
||||||
* @Description: 应用类
|
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 27/2/2023 9:50 PM
|
|
||||||
*/
|
*/
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Data
|
@Data
|
||||||
|
|||||||
@ -6,12 +6,8 @@ import lombok.Data;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 获取下级/下游企业的access_token
|
||||||
* @Package: me.chanjar.weixin.cp.bean.corpgroup
|
* @author libo
|
||||||
* @Description: 获取下级/下游企业的access_token
|
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 27/2/2023 9:07 PM
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WxCpCorpGroupCorpGetTokenReq implements Serializable {
|
public class WxCpCorpGroupCorpGetTokenReq implements Serializable {
|
||||||
|
|||||||
@ -8,12 +8,8 @@ import java.io.Serializable;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 获取应用共享信息返回类
|
||||||
* @Package: me.chanjar.weixin.cp.bean.corpgroup
|
* @author libo
|
||||||
* @Description: 获取应用共享信息返回类
|
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 27/2/2023 9:02 PM
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WxCpCorpGroupCorpListAppShareInfoResp implements Serializable {
|
public class WxCpCorpGroupCorpListAppShareInfoResp implements Serializable {
|
||||||
|
|||||||
@ -7,12 +7,8 @@ import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 获取下级/下游企业的access_token返回类
|
||||||
* @Package: me.chanjar.weixin.cp.bean.corpgroup
|
* @author libo
|
||||||
* @Description: 获取下级/下游企业的access_token返回类
|
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 27/2/2023 9:07 PM
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WxCpCorpGroupCorpToken implements Serializable {
|
public class WxCpCorpGroupCorpToken implements Serializable {
|
||||||
|
|||||||
@ -2,18 +2,14 @@ package me.chanjar.weixin.cp.bean.corpgroup;
|
|||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import me.chanjar.weixin.cp.bean.WxCpAgent;
|
|
||||||
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 获取下级/下游企业小程序session返回类
|
||||||
* @Package: me.chanjar.weixin.cp.bean.corpgroup
|
*
|
||||||
* @Description: 获取下级/下游企业小程序session返回类
|
* @author libo
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 27/2/2023 9:10 PM
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WxCpMaTransferSession implements Serializable {
|
public class WxCpMaTransferSession implements Serializable {
|
||||||
|
|||||||
@ -6,12 +6,9 @@ import lombok.Data;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 获取应用可见范围请求类
|
||||||
* @Package: me.chanjar.weixin.cp.bean.linkedcorp
|
*
|
||||||
* @Description: 获取应用可见范围请求类
|
* @author libo
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 28/2/2023 6:16 PM
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WxCpLinkedCorpAgentPerm implements Serializable {
|
public class WxCpLinkedCorpAgentPerm implements Serializable {
|
||||||
|
|||||||
@ -1,23 +1,14 @@
|
|||||||
package me.chanjar.weixin.cp.bean.linkedcorp;
|
package me.chanjar.weixin.cp.bean.linkedcorp;
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 获取互联企业部门列表
|
||||||
* @Package: me.chanjar.weixin.cp.bean.linkedcorp
|
*
|
||||||
* @Description: 获取互联企业部门列表
|
* @author libo
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 28/2/2023 6:16 PM
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WxCpLinkedCorpDepartment implements Serializable {
|
public class WxCpLinkedCorpDepartment implements Serializable {
|
||||||
|
|||||||
@ -6,20 +6,15 @@ import lombok.Builder;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import me.chanjar.weixin.cp.bean.WxCpBaseResp;
|
|
||||||
import me.chanjar.weixin.cp.bean.WxCpUser;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 获取互联企业成员详细信息
|
||||||
* @Package: me.chanjar.weixin.cp.bean.linkedcorp
|
*
|
||||||
* @Description: 获取互联企业成员详细信息
|
* @author libo
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 28/2/2023 6:16 PM
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WxCpLinkedCorpUser implements Serializable {
|
public class WxCpLinkedCorpUser implements Serializable {
|
||||||
|
|||||||
@ -11,12 +11,13 @@ import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
|
|||||||
* The type Wx cp xml out event message.
|
* The type Wx cp xml out event message.
|
||||||
*
|
*
|
||||||
* @author eYoung
|
* @author eYoung
|
||||||
* @description: created on create at 2021/12/3 16:36
|
* created at 2021/12/3 16:36
|
||||||
*/
|
*/
|
||||||
@XStreamAlias("xml")
|
@XStreamAlias("xml")
|
||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class WxCpXmlOutEventMessage extends WxCpXmlOutMessage {
|
public class WxCpXmlOutEventMessage extends WxCpXmlOutMessage {
|
||||||
|
private static final long serialVersionUID = -692538307520295832L;
|
||||||
|
|
||||||
@XStreamAlias("Event")
|
@XStreamAlias("Event")
|
||||||
@XStreamConverter(value = XStreamCDataConverter.class)
|
@XStreamConverter(value = XStreamCDataConverter.class)
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import me.chanjar.weixin.cp.bean.message.WxCpXmlOutEventMessage;
|
|||||||
* The type Event builder.
|
* The type Event builder.
|
||||||
*
|
*
|
||||||
* @author eYoung
|
* @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> {
|
public class EventBuilder extends BaseBuilder<EventBuilder, WxCpXmlOutEventMessage> {
|
||||||
|
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* @author chenjie03
|
* @author chenjie03
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @date 2022/11/4 11:54
|
* @since 2022/11/4 11:54
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import java.io.Serializable;
|
|||||||
/**
|
/**
|
||||||
* @author chenjie03
|
* @author chenjie03
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @date 2022/11/4 11:57
|
* @since 2022/11/4 11:57
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import java.io.Serializable;
|
|||||||
/**
|
/**
|
||||||
* @author chenjie03
|
* @author chenjie03
|
||||||
* @version 1.0
|
* @version 1.0
|
||||||
* @date 2022/11/4 12:12
|
* @since 2022/11/4 12:12
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import java.io.Serializable;
|
|||||||
* The type Work bench key data.
|
* The type Work bench key data.
|
||||||
*
|
*
|
||||||
* @author songshiyu created on : create in 10:21 2020/9/28
|
* @author songshiyu created on : create in 10:21 2020/9/28
|
||||||
* @description: 关键数据型模板类型
|
* 关键数据型模板类型
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WorkBenchKeyData implements Serializable {
|
public class WorkBenchKeyData implements Serializable {
|
||||||
|
|||||||
@ -5,23 +5,25 @@ import lombok.Data;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type Work bench list.
|
* 列表模板类型 *
|
||||||
*
|
*
|
||||||
* @author songshiyu created on : create in 10:21 2020/9/28
|
* @author songshiyu
|
||||||
* @description: 列表模板类型
|
* created at 10:21 2020/9/28
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class WorkBenchList implements Serializable {
|
public class WorkBenchList implements Serializable {
|
||||||
/*
|
private static final long serialVersionUID = -7892708831294949257L;
|
||||||
|
|
||||||
|
/**
|
||||||
* 列表显示文字,不超过128个字节
|
* 列表显示文字,不超过128个字节
|
||||||
* */
|
*/
|
||||||
private String title;
|
private String title;
|
||||||
/*
|
/**
|
||||||
* 点击跳转url,若不填且应用设置了主页url,则跳转到主页url,否则跳到应用会话窗口
|
* 点击跳转url,若不填且应用设置了主页url,则跳转到主页url,否则跳到应用会话窗口
|
||||||
* */
|
*/
|
||||||
private String jumpUrl;
|
private String jumpUrl;
|
||||||
/*
|
/**
|
||||||
* 若应用为小程序类型,该字段填小程序pagepath,若未设置,跳到小程序主页
|
* 若应用为小程序类型,该字段填小程序pagepath,若未设置,跳到小程序主页
|
||||||
* */
|
*/
|
||||||
private String pagePath;
|
private String pagePath;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,18 +2,13 @@ package me.chanjar.weixin.cp.config;
|
|||||||
|
|
||||||
import me.chanjar.weixin.common.bean.WxAccessToken;
|
import me.chanjar.weixin.common.bean.WxAccessToken;
|
||||||
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
|
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;
|
import java.util.concurrent.locks.Lock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 微信客户端(企业互联)配置
|
||||||
* @Package: me.chanjar.weixin.cp.config
|
*
|
||||||
* @Description: 微信客户端(企业互联)配置
|
* @author libo
|
||||||
* @or: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 1/3/2023 9:56 AM
|
|
||||||
*/
|
*/
|
||||||
public interface WxCpCorpGroupConfigStorage {
|
public interface WxCpCorpGroupConfigStorage {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -2,11 +2,9 @@ package me.chanjar.weixin.cp.config.impl;
|
|||||||
|
|
||||||
import me.chanjar.weixin.common.bean.WxAccessToken;
|
import me.chanjar.weixin.common.bean.WxAccessToken;
|
||||||
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
|
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
|
||||||
import me.chanjar.weixin.cp.config.WxCpConfigStorage;
|
|
||||||
import me.chanjar.weixin.cp.config.WxCpCorpGroupConfigStorage;
|
import me.chanjar.weixin.cp.config.WxCpCorpGroupConfigStorage;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -15,12 +13,9 @@ import java.util.concurrent.locks.Lock;
|
|||||||
import java.util.concurrent.locks.ReentrantLock;
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 基于内存的微信配置provider,在实际生产环境中应该将这些配置持久化.
|
||||||
* @Package: me.chanjar.weixin.cp.config.impl
|
*
|
||||||
* @Description: 基于内存的微信配置provider,在实际生产环境中应该将这些配置持久化.
|
* @author libo
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 1/3/2023 10:30 AM
|
|
||||||
*/
|
*/
|
||||||
public class WxCpCorpGroupDefaultConfigImpl implements WxCpCorpGroupConfigStorage, Serializable {
|
public class WxCpCorpGroupDefaultConfigImpl implements WxCpCorpGroupConfigStorage, Serializable {
|
||||||
private final transient Map<String, Lock> corpAccessTokenLocker = new ConcurrentHashMap<>();
|
private final transient Map<String, Lock> corpAccessTokenLocker = new ConcurrentHashMap<>();
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import lombok.Setter;
|
|||||||
import me.chanjar.weixin.common.bean.WxAccessToken;
|
import me.chanjar.weixin.common.bean.WxAccessToken;
|
||||||
import me.chanjar.weixin.common.redis.WxRedisOps;
|
import me.chanjar.weixin.common.redis.WxRedisOps;
|
||||||
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
|
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
|
||||||
import me.chanjar.weixin.cp.bean.WxCpProviderToken;
|
|
||||||
import me.chanjar.weixin.cp.config.WxCpCorpGroupConfigStorage;
|
import me.chanjar.weixin.cp.config.WxCpCorpGroupConfigStorage;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
@ -15,15 +14,12 @@ import java.util.Map;
|
|||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.locks.Lock;
|
import java.util.concurrent.locks.Lock;
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 企业微信企业互联各种固定、授权配置的Redisson存储实现
|
||||||
* @Package: me.chanjar.weixin.cp.config.impl
|
*
|
||||||
* @Description: 企业微信企业互联各种固定、授权配置的Redisson存储实现
|
* @author libo Email: 422423229@qq.com
|
||||||
* @Author: libo
|
* @since 1/3/2023 10:48 AM
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 1/3/2023 10:48 AM
|
|
||||||
*/
|
*/
|
||||||
@Builder
|
@Builder
|
||||||
public class WxCpCorpGroupRedissonConfigImpl implements WxCpCorpGroupConfigStorage, Serializable {
|
public class WxCpCorpGroupRedissonConfigImpl implements WxCpCorpGroupConfigStorage, Serializable {
|
||||||
|
|||||||
@ -11,19 +11,16 @@ import me.chanjar.weixin.cp.bean.corpgroup.WxCpMaTransferSession;
|
|||||||
import me.chanjar.weixin.cp.config.WxCpCorpGroupConfigStorage;
|
import me.chanjar.weixin.cp.config.WxCpCorpGroupConfigStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 企业微信企业互联API的Service.
|
||||||
* @Package: me.chanjar.weixin.cp.corpgroup.service
|
*
|
||||||
* @Description: 企业微信企业互联API的Service.
|
* @author libo
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 1/3/2023 5:37 PM
|
|
||||||
*/
|
*/
|
||||||
public interface WxCpCgService {
|
public interface WxCpCgService {
|
||||||
/**
|
/**
|
||||||
* Update corp access token.
|
* Update corp access token.
|
||||||
*
|
*
|
||||||
* @param corpId
|
* @param corpId .
|
||||||
* @param agentId
|
* @param agentId .
|
||||||
* @param corpAccessToken the corp access token
|
* @param corpAccessToken the corp access token
|
||||||
* @param expiresInSeconds the expires in seconds
|
* @param expiresInSeconds the expires in seconds
|
||||||
*/
|
*/
|
||||||
@ -146,6 +143,7 @@ public interface WxCpCgService {
|
|||||||
void setWxCpCorpGroupConfigStorage(WxCpCorpGroupConfigStorage wxCpCorpGroupConfigStorage);
|
void setWxCpCorpGroupConfigStorage(WxCpCorpGroupConfigStorage wxCpCorpGroupConfigStorage);
|
||||||
|
|
||||||
WxCpCorpGroupConfigStorage getWxCpCorpGroupConfigStorage();
|
WxCpCorpGroupConfigStorage getWxCpCorpGroupConfigStorage();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* http请求对象.
|
* http请求对象.
|
||||||
*
|
*
|
||||||
@ -165,10 +163,11 @@ public interface WxCpCgService {
|
|||||||
/**
|
/**
|
||||||
* 获取下级/下游企业小程序session
|
* 获取下级/下游企业小程序session
|
||||||
* https://developer.work.weixin.qq.com/document/path/93355
|
* https://developer.work.weixin.qq.com/document/path/93355
|
||||||
|
*
|
||||||
* @param userId
|
* @param userId
|
||||||
* @param sessionKey
|
* @param sessionKey
|
||||||
* @return
|
* @return
|
||||||
* @throws WxErrorException
|
* @throws WxErrorException
|
||||||
*/
|
*/
|
||||||
WxCpMaTransferSession getCorpTransferSession(String userId, String sessionKey,WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
|
WxCpMaTransferSession getCorpTransferSession(String userId, String sessionKey, WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package me.chanjar.weixin.cp.corpgroup.service;
|
package me.chanjar.weixin.cp.corpgroup.service;
|
||||||
|
|
||||||
import me.chanjar.weixin.common.error.WxErrorException;
|
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.WxCpLinkedCorpAgentPerm;
|
||||||
import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpDepartment;
|
import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpDepartment;
|
||||||
import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpUser;
|
import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpUser;
|
||||||
@ -9,22 +9,20 @@ import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpUser;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* 互联企业相关接口
|
||||||
* @Package: me.chanjar.weixin.cp.api
|
*
|
||||||
* @Description: 互联企业相关接口
|
* @author libo Email: 422423229@qq.com
|
||||||
* @Author: libo
|
* @since 27/2/2023 9:57 PM
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 27/2/2023 9:57 PM
|
|
||||||
*/
|
*/
|
||||||
public interface WxCpLinkedCorpService {
|
public interface WxCpLinkedCorpService {
|
||||||
WxCpLinkedCorpAgentPerm getLinkedCorpAgentPerm(WxCpCorpGroupCorpGetTokenReq req) throws WxErrorException;
|
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,12 +26,8 @@ import java.io.IOException;
|
|||||||
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.CorpGroup.*;
|
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.CorpGroup.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* @author libo Email: 422423229@qq.com
|
||||||
* @Package: me.chanjar.weixin.cp.corpgroup.service.impl
|
* @since 1/3/2023 5:45 PM
|
||||||
* @Description:
|
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 1/3/2023 5:45 PM
|
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public abstract class BaseWxCpCgServiceImpl<H, P> implements WxCpCgService, RequestHttp<H, P> {
|
public abstract class BaseWxCpCgServiceImpl<H, P> implements WxCpCgService, RequestHttp<H, P> {
|
||||||
|
|||||||
@ -1,20 +1,14 @@
|
|||||||
package me.chanjar.weixin.cp.corpgroup.service.impl;
|
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.HttpType;
|
||||||
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
|
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
|
||||||
import me.chanjar.weixin.common.util.http.apache.DefaultApacheHttpClientBuilder;
|
import me.chanjar.weixin.common.util.http.apache.DefaultApacheHttpClientBuilder;
|
||||||
import org.apache.http.HttpHost;
|
import org.apache.http.HttpHost;
|
||||||
import org.apache.http.client.methods.HttpPost;
|
|
||||||
import org.apache.http.impl.client.CloseableHttpClient;
|
import org.apache.http.impl.client.CloseableHttpClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* @author libo Email: 422423229@qq.com
|
||||||
* @Package: me.chanjar.weixin.cp.corpgroup.service.impl
|
* @since 1/3/2023 6:16 PM
|
||||||
* @Description:
|
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 1/3/2023 6:16 PM
|
|
||||||
*/
|
*/
|
||||||
public class WxCpCgServiceApacheHttpClientImpl extends BaseWxCpCgServiceImpl<CloseableHttpClient, HttpHost> {
|
public class WxCpCgServiceApacheHttpClientImpl extends BaseWxCpCgServiceImpl<CloseableHttpClient, HttpHost> {
|
||||||
private CloseableHttpClient httpClient;
|
private CloseableHttpClient httpClient;
|
||||||
|
|||||||
@ -6,12 +6,11 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import me.chanjar.weixin.common.error.WxErrorException;
|
import me.chanjar.weixin.common.error.WxErrorException;
|
||||||
import me.chanjar.weixin.common.util.json.GsonParser;
|
import me.chanjar.weixin.common.util.json.GsonParser;
|
||||||
import me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorpGetTokenReq;
|
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.WxCpLinkedCorpAgentPerm;
|
||||||
import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpDepartment;
|
import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpDepartment;
|
||||||
import me.chanjar.weixin.cp.bean.linkedcorp.WxCpLinkedCorpUser;
|
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 me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -19,12 +18,10 @@ import java.util.List;
|
|||||||
import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.LinkedCorp.*;
|
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
|
||||||
* @Author: libo
|
* @since 27/2/2023 10:02 PM
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 27/2/2023 10:02 PM
|
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class WxCpLinkedCorpServiceImpl implements WxCpLinkedCorpService {
|
public class WxCpLinkedCorpServiceImpl implements WxCpLinkedCorpService {
|
||||||
@ -57,7 +54,7 @@ public class WxCpLinkedCorpServiceImpl implements WxCpLinkedCorpService {
|
|||||||
final String url = this.cpCgService.getWxCpCorpGroupConfigStorage().getApiUrl(GET_USER_SIMPLELIST);
|
final String url = this.cpCgService.getWxCpCorpGroupConfigStorage().getApiUrl(GET_USER_SIMPLELIST);
|
||||||
JsonObject jsonObject = new JsonObject();
|
JsonObject jsonObject = new JsonObject();
|
||||||
jsonObject.addProperty("department_id", departmentId);
|
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);
|
JsonObject tmpJson = GsonParser.parse(responseContent);
|
||||||
|
|
||||||
return WxCpGsonBuilder.create().fromJson(tmpJson.get("userlist"),
|
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);
|
final String url = this.cpCgService.getWxCpCorpGroupConfigStorage().getApiUrl(GET_USER_LIST);
|
||||||
JsonObject jsonObject = new JsonObject();
|
JsonObject jsonObject = new JsonObject();
|
||||||
jsonObject.addProperty("department_id", departmentId);
|
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);
|
JsonObject tmpJson = GsonParser.parse(responseContent);
|
||||||
|
|
||||||
return WxCpGsonBuilder.create().fromJson(tmpJson.get("userlist"),
|
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);
|
final String url = this.cpCgService.getWxCpCorpGroupConfigStorage().getApiUrl(GET_DEPARTMENT_LIST);
|
||||||
JsonObject jsonObject = new JsonObject();
|
JsonObject jsonObject = new JsonObject();
|
||||||
jsonObject.addProperty("department_id", departmentId);
|
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);
|
JsonObject tmpJson = GsonParser.parse(responseContent);
|
||||||
|
|
||||||
return WxCpGsonBuilder.create().fromJson(tmpJson.get("department_list"),
|
return WxCpGsonBuilder.create().fromJson(tmpJson.get("department_list"),
|
||||||
|
|||||||
@ -8,7 +8,6 @@ import me.chanjar.weixin.cp.bean.WxCpTpContactSearchResp;
|
|||||||
* The interface Wx cp tp contact service.
|
* The interface Wx cp tp contact service.
|
||||||
*
|
*
|
||||||
* @author uianz
|
* @author uianz
|
||||||
* @description
|
|
||||||
* @since 2020 /12/23 下午 02:39
|
* @since 2020 /12/23 下午 02:39
|
||||||
*/
|
*/
|
||||||
public interface WxCpTpContactService {
|
public interface WxCpTpContactService {
|
||||||
|
|||||||
@ -13,7 +13,6 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Tp.CONTACT_SEARCH;
|
|||||||
* The type Wx cp tp contact service.
|
* The type Wx cp tp contact service.
|
||||||
*
|
*
|
||||||
* @author uianz
|
* @author uianz
|
||||||
* @description
|
|
||||||
* @since 2020 /12/23 下午 02:39
|
* @since 2020 /12/23 下午 02:39
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
|||||||
@ -20,7 +20,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.Department.*;
|
|||||||
* The type Wx cp tp department service.
|
* The type Wx cp tp department service.
|
||||||
*
|
*
|
||||||
* @author uianz
|
* @author uianz
|
||||||
* @description corp from {@link WxCpDepartmentServiceImpl )} 唯一不同在于获取部门列表时需要传对应企业的accessToken
|
* copy from {@link WxCpDepartmentServiceImpl )} 唯一不同在于获取部门列表时需要传对应企业的accessToken
|
||||||
* @since 2020 /12/23 下午 02:39
|
* @since 2020 /12/23 下午 02:39
|
||||||
*/
|
*/
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
|
|||||||
@ -17,6 +17,7 @@ import java.util.Base64;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The type Wx cp crypt util.
|
* The type Wx cp crypt util.
|
||||||
|
* @author qian
|
||||||
*/
|
*/
|
||||||
public class WxCpCryptUtil extends WxCryptUtil {
|
public class WxCpCryptUtil extends WxCryptUtil {
|
||||||
/**
|
/**
|
||||||
@ -53,7 +54,7 @@ public class WxCpCryptUtil extends WxCryptUtil {
|
|||||||
throw new WxErrorException("请配置会话存档解密方式");
|
throw new WxErrorException("请配置会话存档解密方式");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pkcs1.intValue() == 1) {
|
if (pkcs1 == 1) {
|
||||||
return decryptPriKeyByPKCS1(encryptRandomKey, msgAuditPriKey);
|
return decryptPriKeyByPKCS1(encryptRandomKey, msgAuditPriKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,7 +73,7 @@ public class WxCpCryptUtil extends WxCryptUtil {
|
|||||||
String privateKey = msgAuditPriKey.replaceAll("(\r\n|\r|\n|\n\r)", "")
|
String privateKey = msgAuditPriKey.replaceAll("(\r\n|\r|\n|\n\r)", "")
|
||||||
.replace("-----BEGIN PRIVATE KEY-----", "")
|
.replace("-----BEGIN PRIVATE KEY-----", "")
|
||||||
.replace("-----END PRIVATE KEY-----", "")
|
.replace("-----END PRIVATE KEY-----", "")
|
||||||
.replaceAll(" ", "");
|
.replace(" ", "");
|
||||||
|
|
||||||
byte[] keyBytes = Base64.getDecoder().decode(privateKey);
|
byte[] keyBytes = Base64.getDecoder().decode(privateKey);
|
||||||
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
|
PKCS8EncodedKeySpec pkcs8KeySpec = new PKCS8EncodedKeySpec(keyBytes);
|
||||||
@ -99,7 +100,7 @@ public class WxCpCryptUtil extends WxCryptUtil {
|
|||||||
String privateKey = msgAuditPriKey.replaceAll("(\r\n|\r|\n|\n\r)", "")
|
String privateKey = msgAuditPriKey.replaceAll("(\r\n|\r|\n|\n\r)", "")
|
||||||
.replace("-----BEGIN RSA PRIVATE KEY-----", "")
|
.replace("-----BEGIN RSA PRIVATE KEY-----", "")
|
||||||
.replace("-----END RSA PRIVATE KEY-----", "")
|
.replace("-----END RSA PRIVATE KEY-----", "")
|
||||||
.replaceAll(" ", "");
|
.replace(" ", "");
|
||||||
|
|
||||||
byte[] keyBytes = Base64.getDecoder().decode(privateKey);
|
byte[] keyBytes = Base64.getDecoder().decode(privateKey);
|
||||||
DerValue[] seq = new DerInputStream(keyBytes).getSequence(0);
|
DerValue[] seq = new DerInputStream(keyBytes).getSequence(0);
|
||||||
|
|||||||
@ -16,10 +16,10 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type Wx cp agent work bench impl test.
|
* 测试工作台服务
|
||||||
*
|
*
|
||||||
* @author songshiyu created on : create in 10:31 2020/9/29
|
* @author songshiyu
|
||||||
* @description: 测试工作台服务
|
* created at 10:31 2020/9/29
|
||||||
*/
|
*/
|
||||||
@Guice(modules = ApiTestModule.class)
|
@Guice(modules = ApiTestModule.class)
|
||||||
public class WxCpAgentWorkBenchImplTest {
|
public class WxCpAgentWorkBenchImplTest {
|
||||||
|
|||||||
@ -1,29 +1,19 @@
|
|||||||
package me.chanjar.weixin.cp.api.impl;
|
package me.chanjar.weixin.cp.api.impl;
|
||||||
|
|
||||||
import com.google.gson.JsonObject;
|
|
||||||
import com.google.inject.Inject;
|
import com.google.inject.Inject;
|
||||||
import me.chanjar.weixin.common.bean.WxAccessToken;
|
|
||||||
import me.chanjar.weixin.common.error.WxErrorException;
|
import me.chanjar.weixin.common.error.WxErrorException;
|
||||||
import me.chanjar.weixin.cp.api.ApiTestModule;
|
import me.chanjar.weixin.cp.api.ApiTestModule;
|
||||||
import me.chanjar.weixin.cp.api.WxCpService;
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
import me.chanjar.weixin.cp.bean.corpgroup.*;
|
import me.chanjar.weixin.cp.bean.corpgroup.WxCpCorpGroupCorp;
|
||||||
import me.chanjar.weixin.cp.corpgroup.service.WxCpCgService;
|
|
||||||
import org.testng.annotations.Guice;
|
import org.testng.annotations.Guice;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
import java.util.List;
|
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;
|
import static org.testng.Assert.assertNotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* @author libo
|
||||||
* @Package: me.chanjar.weixin.cp.api.impl
|
|
||||||
* @Description:
|
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 28/2/2023 7:06 PM
|
|
||||||
*/
|
*/
|
||||||
@Guice(modules = ApiTestModule.class)
|
@Guice(modules = ApiTestModule.class)
|
||||||
public class WxCpCorpGroupServiceImplTest {
|
public class WxCpCorpGroupServiceImplTest {
|
||||||
|
|||||||
@ -26,12 +26,7 @@ import static me.chanjar.weixin.cp.constant.WxCpApiPathConsts.CorpGroup.MA_TRANS
|
|||||||
import static org.testng.Assert.assertNotNull;
|
import static org.testng.Assert.assertNotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* @author libo
|
||||||
* @Package: me.chanjar.weixin.cp.corpgroup.service.impl
|
|
||||||
* @Description:
|
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 2/3/2023 4:00 PM
|
|
||||||
*/
|
*/
|
||||||
@Guice(modules = ApiTestModule.class)
|
@Guice(modules = ApiTestModule.class)
|
||||||
public class WxCpCgServiceApacheHttpClientImplTest {
|
public class WxCpCgServiceApacheHttpClientImplTest {
|
||||||
|
|||||||
@ -21,12 +21,7 @@ import java.util.List;
|
|||||||
import static org.testng.Assert.assertNotNull;
|
import static org.testng.Assert.assertNotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Project: WxJava
|
* @author libo
|
||||||
* @Package: me.chanjar.weixin.cp.api.impl
|
|
||||||
* @Description:
|
|
||||||
* @Author: libo
|
|
||||||
* @Email: 422423229@qq.com
|
|
||||||
* @Date: 28/2/2023 7:06 PM
|
|
||||||
*/
|
*/
|
||||||
@Guice(modules = ApiTestModule.class)
|
@Guice(modules = ApiTestModule.class)
|
||||||
public class WxCpLinkedCorpServiceImplTest {
|
public class WxCpLinkedCorpServiceImplTest {
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @Description :微信营销接口
|
* 微信营销接口
|
||||||
* @author <a href="https://github.com/184759547">184759547</a>
|
* @author <a href="https://github.com/184759547">184759547</a>
|
||||||
* @since : 2021/12/28
|
* @since : 2021/12/28
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package cn.binarywang.wx.miniapp.api.impl;
|
|||||||
import cn.binarywang.wx.miniapp.api.WxMaMarketingService;
|
import cn.binarywang.wx.miniapp.api.WxMaMarketingService;
|
||||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||||
import cn.binarywang.wx.miniapp.bean.marketing.WxMaUserAction;
|
import cn.binarywang.wx.miniapp.bean.marketing.WxMaUserAction;
|
||||||
import com.google.gson.JsonArray;
|
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -14,7 +13,7 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @author <a href="https://github.com/184759547">184759547</a>
|
* @author <a href="https://github.com/184759547">184759547</a>
|
||||||
* @Description :微信营销接口
|
* 微信营销接口
|
||||||
* @since : 2021/12/28
|
* @since : 2021/12/28
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|||||||
@ -11,7 +11,8 @@ import java.io.Serializable;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description :微信营销接口
|
* 微信营销接口
|
||||||
|
*
|
||||||
* @author <a href="https://github.com/184759547">184759547</a>
|
* @author <a href="https://github.com/184759547">184759547</a>
|
||||||
* @since : 2021/12/28
|
* @since : 2021/12/28
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package me.chanjar.weixin.mp.bean.kefu;
|
|||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import me.chanjar.weixin.common.api.WxConsts;
|
|
||||||
import me.chanjar.weixin.mp.builder.kefu.*;
|
import me.chanjar.weixin.mp.builder.kefu.*;
|
||||||
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
import me.chanjar.weixin.mp.util.json.WxMpGsonBuilder;
|
||||||
|
|
||||||
@ -124,18 +123,18 @@ public class WxMpKefuMessage implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* 请使用
|
* 请使用
|
||||||
* {@link WxConsts.KefuMsgType#TEXT}
|
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#TEXT}
|
||||||
* {@link WxConsts.KefuMsgType#IMAGE}
|
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#IMAGE}
|
||||||
* {@link WxConsts.KefuMsgType#VOICE}
|
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#VOICE}
|
||||||
* {@link WxConsts.KefuMsgType#MUSIC}
|
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#MUSIC}
|
||||||
* {@link WxConsts.KefuMsgType#VIDEO}
|
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#VIDEO}
|
||||||
* {@link WxConsts.KefuMsgType#NEWS}
|
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#NEWS}
|
||||||
* {@link WxConsts.KefuMsgType#MPNEWS}
|
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#MPNEWS}
|
||||||
* {@link WxConsts.KefuMsgType#WXCARD}
|
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#WXCARD}
|
||||||
* {@link WxConsts.KefuMsgType#MINIPROGRAMPAGE}
|
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#MINIPROGRAMPAGE}
|
||||||
* {@link WxConsts.KefuMsgType#TASKCARD}
|
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#TASKCARD}
|
||||||
* {@link WxConsts.KefuMsgType#MSGMENU}
|
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#MSGMENU}
|
||||||
* {@link WxConsts.KefuMsgType#MP_NEWS_ARTICLE}
|
* {@link me.chanjar.weixin.common.api.WxConsts.KefuMsgType#MP_NEWS_ARTICLE}
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
public void setMsgType(String msgType) {
|
public void setMsgType(String msgType) {
|
||||||
|
|||||||
@ -1,48 +1,48 @@
|
|||||||
package me.chanjar.weixin.mp.builder.outxml;
|
package me.chanjar.weixin.mp.builder.outxml;
|
||||||
|
|
||||||
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutDeviceMessage;
|
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutDeviceMessage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备消息 Builder
|
* 设备消息 Builder
|
||||||
* @author biggates
|
* @author biggates
|
||||||
* @see https://iot.weixin.qq.com/wiki/new/index.html?page=3-4-2
|
* @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> {
|
public final class DeviceBuilder extends BaseBuilder<DeviceBuilder, WxMpXmlOutDeviceMessage> {
|
||||||
|
|
||||||
private String deviceId;
|
private String deviceId;
|
||||||
private String deviceType;
|
private String deviceType;
|
||||||
private String content;
|
private String content;
|
||||||
private String sessionId;
|
private String sessionId;
|
||||||
|
|
||||||
public DeviceBuilder deviceType(String deviceType) {
|
public DeviceBuilder deviceType(String deviceType) {
|
||||||
this.deviceType = deviceType;
|
this.deviceType = deviceType;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeviceBuilder deviceId(String deviceId) {
|
public DeviceBuilder deviceId(String deviceId) {
|
||||||
this.deviceId = deviceId;
|
this.deviceId = deviceId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeviceBuilder content(String content) {
|
public DeviceBuilder content(String content) {
|
||||||
this.content = content;
|
this.content = content;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeviceBuilder sessionId(String sessionId) {
|
public DeviceBuilder sessionId(String sessionId) {
|
||||||
this.sessionId = sessionId;
|
this.sessionId = sessionId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WxMpXmlOutDeviceMessage build() {
|
public WxMpXmlOutDeviceMessage build() {
|
||||||
WxMpXmlOutDeviceMessage m = new WxMpXmlOutDeviceMessage();
|
WxMpXmlOutDeviceMessage m = new WxMpXmlOutDeviceMessage();
|
||||||
setCommon(m);
|
setCommon(m);
|
||||||
m.setDeviceId(this.deviceId);
|
m.setDeviceId(this.deviceId);
|
||||||
m.setDeviceType(this.deviceType);
|
m.setDeviceType(this.deviceType);
|
||||||
m.setContent(this.content);
|
m.setContent(this.content);
|
||||||
m.setSessionId(this.sessionId);
|
m.setSessionId(this.sessionId);
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,8 +8,7 @@ import java.lang.reflect.Type;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author robgao
|
* @author robgao Email 315789501@qq.com
|
||||||
* @Email 315789501@qq.com
|
|
||||||
*/
|
*/
|
||||||
public class WxOpenAuthorizerListResultGsonAdapter implements JsonDeserializer<WxOpenAuthorizerListResult> {
|
public class WxOpenAuthorizerListResultGsonAdapter implements JsonDeserializer<WxOpenAuthorizerListResult> {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user