恢复微信模块,优化知识库切片功能

This commit is contained in:
ageerle
2025-09-19 11:15:37 +08:00
parent fa5dc80a93
commit afc1272ff5
39 changed files with 1356 additions and 367 deletions

View File

@@ -0,0 +1,58 @@
package org.ruoyi.domin;
import lombok.Data;
@Data
public class ReceiveMessage {
/**
* 开发者微信号
*/
private String toUserName;
/**
* 发送方账号(一个openid
*/
private String fromUserName;
/**
* 消息创建时间(整形)
*/
private String createTime;
/**
* 消息类型
*/
private String msgType;
/**
* 文本消息内容
*/
private String content;
/**
* 消息ID 64位
*/
String msgId;
/**
* 消息的数据ID 消息来自文章才有
*/
private String msgDataId;
/**
* 多图文时第几篇文章从1开始 消息如果来自文章才有
*/
private String idx;
/**
* 订阅事件 subscribe 订阅 unsbscribe 取消订阅
*/
private String event;
/**
* 扫码 - ticket
*/
private String ticket;
public String getReplyTextMsg(String msg) {
String xml = "<xml>\n"
+ " <ToUserName><![CDATA[" + getFromUserName() + "]]></ToUserName>\n"
+ " <FromUserName><![CDATA[" + getToUserName() + "]]></FromUserName>\n"
+ " <CreateTime>" + System.currentTimeMillis() + "</CreateTime>\n"
+ " <MsgType><![CDATA[text]]></MsgType>\n"
+ " <Content><![CDATA[" + msg + "]]></Content>\n"
+ " </xml>";
return xml;
}
}

View File

@@ -0,0 +1,15 @@
package org.ruoyi.domin;
import lombok.Data;
/**
* @author https://www.wdbyte.com
*/
@Data
public class WeixinQrCode {
private String ticket;
private Long expireSeconds;
private String url;
private String qrCodeUrl;
}