|
@@ -6,6 +6,7 @@ import com.miaxis.feign.dto.WxGzhBatchUser;
|
|
|
import com.miaxis.feign.dto.WxMessageCusom;
|
|
|
import com.miaxis.feign.dto.WxMessageTemplate;
|
|
|
import com.miaxis.feign.dto.WxQrTicket;
|
|
|
+import com.miaxis.wx.dto.WxStableTokenDTO;
|
|
|
import feign.Headers;
|
|
|
import feign.Param;
|
|
|
import feign.form.FormData;
|
|
@@ -18,23 +19,22 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
/**
|
|
|
* 微信公众号接口
|
|
|
+ *
|
|
|
* @author wwl
|
|
|
* @version 1.0
|
|
|
* @date 2021/10/20 14:59
|
|
|
*/
|
|
|
-@FeignClient(name="wxSendService",
|
|
|
- url = "https://api.weixin.qq.com/cgi-bin",configuration = FeignConfig.class)
|
|
|
+@FeignClient(name = "wxSendService",
|
|
|
+ url = "https://api.weixin.qq.com/cgi-bin", configuration = FeignConfig.class)
|
|
|
public interface IWxSendService {
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
- * 获取token
|
|
|
+ * 获取token
|
|
|
+ *
|
|
|
* @param grant_type
|
|
|
- * @param appid 第三方用户唯一凭证
|
|
|
- * @param secret 第三方用户唯一凭证密钥,即appsecret
|
|
|
+ * @param appid 第三方用户唯一凭证
|
|
|
+ * @param secret 第三方用户唯一凭证密钥,即appsecret
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping(value = "/token")
|
|
@@ -43,9 +43,18 @@ public interface IWxSendService {
|
|
|
@RequestParam("secret") String secret);
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 获取微信静态token
|
|
|
+ * @param wxStableTokenDTO
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping(value = "/stable_token")
|
|
|
+ String getStableAccessToken(WxStableTokenDTO wxStableTokenDTO);
|
|
|
+
|
|
|
/**
|
|
|
* 生成带参数二维码接口
|
|
|
- * -文档链接:https://developers.weixin.qq.com/doc/offiaccount/Account_Management/Generating_a_Parametric_QR_Code.html
|
|
|
+ * -文档链接:https://developers.weixin.qq.com/doc/offiaccount/Account_Management/Generating_a_Parametric_QR_Code.html
|
|
|
+ *
|
|
|
* @param accessToken
|
|
|
* @param wxQrTicket:二维码参数
|
|
|
* @return
|
|
@@ -56,9 +65,10 @@ public interface IWxSendService {
|
|
|
|
|
|
/**
|
|
|
* 创建菜单接口
|
|
|
- * -文档链接:https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Creating_Custom-Defined_Menu.html
|
|
|
+ * -文档链接:https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Creating_Custom-Defined_Menu.html
|
|
|
+ *
|
|
|
* @param accessToken
|
|
|
- * @param jsonObject json
|
|
|
+ * @param jsonObject json
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping(value = "/menu/create")
|
|
@@ -66,10 +76,10 @@ public interface IWxSendService {
|
|
|
String createMenu(@RequestParam("access_token") String accessToken, JSONObject jsonObject);
|
|
|
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 创建菜单接口
|
|
|
- * -文档链接:https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Querying_Custom_Menus.html
|
|
|
+ * -文档链接:https://developers.weixin.qq.com/doc/offiaccount/Custom_Menus/Querying_Custom_Menus.html
|
|
|
+ *
|
|
|
* @param accessToken
|
|
|
* @return
|
|
|
*/
|
|
@@ -79,9 +89,10 @@ public interface IWxSendService {
|
|
|
|
|
|
/**
|
|
|
* 新增永久图文素材
|
|
|
- * -文档链接:https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html
|
|
|
+ * -文档链接:https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html
|
|
|
+ *
|
|
|
* @param accessToken
|
|
|
- * @param jsonObject json
|
|
|
+ * @param jsonObject json
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping(value = "/material/add_news")
|
|
@@ -91,10 +102,11 @@ public interface IWxSendService {
|
|
|
|
|
|
/**
|
|
|
* 新增其他类型永久素材
|
|
|
- * -文档链接:https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html
|
|
|
+ * -文档链接:https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html
|
|
|
+ *
|
|
|
* @param accessToken
|
|
|
- * @param type 媒体文件类型,分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb)
|
|
|
- * @param media form-data中媒体文件标识,有filename、filelength、content-type等信息
|
|
|
+ * @param type 媒体文件类型,分别有图片(image)、语音(voice)、视频(video)和缩略图(thumb)
|
|
|
+ * @param media form-data中媒体文件标识,有filename、filelength、content-type等信息
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping(value = "/material/add_material")
|
|
@@ -104,9 +116,10 @@ public interface IWxSendService {
|
|
|
|
|
|
/**
|
|
|
* 获取用户信息
|
|
|
- * @param token 调用接口凭证
|
|
|
+ *
|
|
|
+ * @param token 调用接口凭证
|
|
|
* @param openid 普通用户的标识,对当前公众号唯一
|
|
|
- * @param lang 返回国家地区语言版本,zh_CN 简体,zh_TW 繁体,en 英语
|
|
|
+ * @param lang 返回国家地区语言版本,zh_CN 简体,zh_TW 繁体,en 英语
|
|
|
* @return
|
|
|
*/
|
|
|
@GetMapping(value = "/user/info")
|
|
@@ -117,6 +130,7 @@ public interface IWxSendService {
|
|
|
|
|
|
/**
|
|
|
* 批量获取用户信息
|
|
|
+ *
|
|
|
* @param token 调用接口凭证
|
|
|
* @return
|
|
|
*/
|
|
@@ -125,6 +139,7 @@ public interface IWxSendService {
|
|
|
|
|
|
/**
|
|
|
* 发送客服消息
|
|
|
+ *
|
|
|
* @param accessToken
|
|
|
* @param messageCusom
|
|
|
* @return
|
|
@@ -135,6 +150,7 @@ public interface IWxSendService {
|
|
|
|
|
|
/**
|
|
|
* 发送模板消息
|
|
|
+ *
|
|
|
* @param accessToken
|
|
|
* @param messageTemplate
|
|
|
* @return
|
|
@@ -144,5 +160,4 @@ public interface IWxSendService {
|
|
|
WxMessageTemplate messageTemplate);
|
|
|
|
|
|
|
|
|
-
|
|
|
}
|