1. 替换原始 code 签名
2. 服务与模块生成器,支持指定起始端口批量端口分配
(cherry picked from commit e99da38fd4)
This commit is contained in:
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
/**
|
||||
* 公众号消息自动回复的匹配模式
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
/**
|
||||
* 公众号消息自动回复的类型
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -6,7 +6,7 @@ import lombok.Getter;
|
||||
/**
|
||||
* 微信公众号消息的发送来源
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -10,7 +10,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
* 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
|
||||
* 如果你碰到启动的问题,请认真阅读 https://cloud.iocoder.cn/quick-start/ 文章
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class MpServerApplication {
|
||||
|
||||
@@ -9,7 +9,7 @@ import lombok.*;
|
||||
/**
|
||||
* 公众号账号 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName("mp_account")
|
||||
@KeySequence("mp_account_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -14,7 +14,7 @@ import me.chanjar.weixin.common.api.WxConsts;
|
||||
* 1. <a href="https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/New_temporary_materials.html">临时素材</a>
|
||||
* 2. <a href="https://developers.weixin.qq.com/doc/offiaccount/Asset_Management/Adding_Permanent_Assets.html">永久素材</a>
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName("mp_material")
|
||||
@KeySequence("mp_material_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.List;
|
||||
/**
|
||||
* 公众号菜单 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName(value = "mp_menu", autoResultMap = true)
|
||||
@KeySequence("mp_menu_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.Set;
|
||||
/**
|
||||
* 公众号消息自动回复 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName(value = "mp_auto_reply", autoResultMap = true)
|
||||
@KeySequence("mp_auto_reply_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
/**
|
||||
* 公众号消息 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName(value = "mp_message", autoResultMap = true)
|
||||
@KeySequence("mp_message_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -10,7 +10,7 @@ import me.chanjar.weixin.mp.bean.tag.WxUserTag;
|
||||
/**
|
||||
* 公众号标签 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName("mp_tag")
|
||||
@KeySequence("mp_tag_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.List;
|
||||
/**
|
||||
* 微信公众号粉丝 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@TableName(value = "mp_user", autoResultMap = true)
|
||||
@KeySequence("mp_user_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
|
||||
@@ -21,7 +21,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
/**
|
||||
* 微信公众号的配置类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Configuration
|
||||
public class MpConfiguration {
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 默认的 {@link MpServiceFactory} 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
/**
|
||||
* {@link WxMpService} 工厂接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface MpServiceFactory {
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import me.chanjar.weixin.mp.api.WxMpMessageHandler;
|
||||
*
|
||||
* @see cn.iocoder.yudao.module.mp.controller.admin.open.MpOpenController#handleMessage(String, String, MpOpenHandleMessageReqVO)
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public class MpContextHolder {
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import jakarta.validation.Validator;
|
||||
/**
|
||||
* 公众号工具类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Slf4j
|
||||
public class MpUtils {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* 属于 mp 模块的 framework 封装
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
package cn.iocoder.yudao.module.mp.framework;
|
||||
|
||||
@@ -15,7 +15,7 @@ import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.ACCOUNT_NOT_EX
|
||||
/**
|
||||
* 公众号账号 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface MpAccountService {
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.Map;
|
||||
*
|
||||
* 逻辑:粉丝点击菜单时,触发对应的回复
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
public class MenuHandler implements WxMpMessageHandler {
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 自动回复消息的事件处理器
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 保存微信消息的事件处理器
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
|
||||
@@ -12,7 +12,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 接收客服会话管理的事件处理器
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
public class KfSessionHandler implements WxMpMessageHandler {
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.Map;
|
||||
*
|
||||
* 逻辑:粉丝上传地理位置时,也可以触发自动回复
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
|
||||
@@ -19,7 +19,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 关注的事件处理器
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
|
||||
@@ -17,7 +17,7 @@ import java.util.Map;
|
||||
/**
|
||||
* 取消关注的事件处理器
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Component
|
||||
@Slf4j
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
/**
|
||||
* 公众号素材 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface MpMaterialService {
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 公众号素材 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
/**
|
||||
* 公众号菜单 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface MpMenuService {
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.MENU_SAVE_FAIL
|
||||
/**
|
||||
* 公众号菜单 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -11,7 +11,7 @@ import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
|
||||
/**
|
||||
* 公众号的自动回复 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface MpAutoReplyService {
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 公众号的自动回复 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -14,7 +14,7 @@ import jakarta.validation.Valid;
|
||||
/**
|
||||
* 公众号消息 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface MpMessageService {
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.MESSAGE_SEND_F
|
||||
/**
|
||||
* 粉丝消息 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
*
|
||||
* 为什么要有该 BO 呢?在自动回复、客服消息、菜单回复消息等场景,都涉及到 MP 给粉丝发送消息,所以使用该 BO 统一承接
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Data
|
||||
public class MpMessageSendOutReqBO {
|
||||
|
||||
@@ -11,7 +11,7 @@ import java.util.List;
|
||||
/**
|
||||
* 公众号统计 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface MpStatisticsService {
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.*;
|
||||
/**
|
||||
* 公众号统计 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
public class MpStatisticsServiceImpl implements MpStatisticsService {
|
||||
|
||||
@@ -15,7 +15,7 @@ import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.USER_NOT_EXIST
|
||||
/**
|
||||
* 公众号粉丝 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
public interface MpUserService {
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ import static cn.iocoder.yudao.module.mp.enums.ErrorCodeConstants.USER_UPDATE_TA
|
||||
/**
|
||||
* 微信公众号粉丝 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
* @author ZT
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
|
||||
Reference in New Issue
Block a user