-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat/添加pmhub-base-notice消息推送及rocketmq通用组件
- Loading branch information
1 parent
e4cdccc
commit 6130ab5
Showing
57 changed files
with
5,000 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.laigeoffer.pmhub-cloud</groupId> | ||
<artifactId>pmhub-base</artifactId> | ||
<version>0.0.1</version> | ||
</parent> | ||
|
||
<artifactId>pmhub-base-notice</artifactId> | ||
|
||
<description> | ||
pmhub-base-notice 消息队列 Rocketmq 及消息推送专属公共组件 | ||
</description> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-context</artifactId> | ||
</dependency> | ||
|
||
<!--hutool--> | ||
<dependency> | ||
<groupId>cn.hutool</groupId> | ||
<artifactId>hutool-all</artifactId> | ||
</dependency> | ||
|
||
<!--lombok--> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
</dependency> | ||
|
||
<!-- rocketmq --> | ||
<dependency> | ||
<groupId>org.apache.rocketmq</groupId> | ||
<artifactId>rocketmq-client-java</artifactId> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.apache.tomcat</groupId> | ||
<artifactId>annotations-api</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<!-- mybatis-plus 增强CRUD --> | ||
<dependency> | ||
<groupId>com.baomidou</groupId> | ||
<artifactId>mybatis-plus-boot-starter</artifactId> | ||
<version>3.5.1</version> | ||
<exclusions> | ||
<exclusion> | ||
<artifactId>jsqlparser</artifactId> | ||
<groupId>com.github.jsqlparser</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>mybatis-spring</artifactId> | ||
<groupId>org.mybatis</groupId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.baomidou</groupId> | ||
<artifactId>mybatis-plus-extension</artifactId> | ||
<version>3.5.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.laigeoffer.pmhub-cloud</groupId> | ||
<artifactId>pmhub-base-core</artifactId> | ||
<exclusions> | ||
<exclusion> | ||
<artifactId>mybatis-spring</artifactId> | ||
<groupId>org.mybatis</groupId> | ||
</exclusion> | ||
<exclusion> | ||
<artifactId>jsqlparser</artifactId> | ||
<groupId>com.github.jsqlparser</groupId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
|
||
</dependencies> | ||
|
||
|
||
<properties> | ||
<maven.compiler.source>8</maven.compiler.source> | ||
<maven.compiler.target>8</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
</project> |
279 changes: 279 additions & 0 deletions
279
...ase-notice/src/main/java/com/laigeoffer/pmhub/base/notice/consumer/OAMessageConsumer.java
Large diffs are not rendered by default.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
...-base-notice/src/main/java/com/laigeoffer/pmhub/base/notice/domain/dto/ActionListDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.laigeoffer.pmhub.base.notice.domain.dto; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* 操作列表,列表长度取值范围为 [1, 3] | ||
* TODO: 2023/2/27 此类的变量名为匹配微信接口使用按下划命名,后期安排优化 | ||
* @author canghe | ||
*/ | ||
@Data | ||
public class ActionListDTO { | ||
|
||
/** | ||
* 操作的描述文案 | ||
* */ | ||
private String text; | ||
|
||
|
||
/** | ||
* 操作key值,用户点击后,会产生回调事件将本参数作为EventKey返回,回调事件会带上该key值,最长支持1024字节,不可重复 | ||
* */ | ||
private String key; | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
...-base-notice/src/main/java/com/laigeoffer/pmhub/base/notice/domain/dto/ActionMenuDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.laigeoffer.pmhub.base.notice.domain.dto; | ||
|
||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* 卡片右上角更多操作按钮 | ||
* TODO: 2023/2/27 此类的变量名为匹配微信接口使用按下划命名,后期安排优化 | ||
* @author canghe | ||
*/ | ||
@Data | ||
public class ActionMenuDTO { | ||
|
||
/** | ||
* 更多操作界面的描述 | ||
* */ | ||
private String desc; | ||
|
||
/** | ||
* 操作列表,列表长度取值范围为 [1, 3] | ||
* */ | ||
private List<ActionListDTO> action_list; | ||
} |
47 changes: 47 additions & 0 deletions
47
...mhub-base-notice/src/main/java/com/laigeoffer/pmhub/base/notice/domain/dto/ButtonDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.laigeoffer.pmhub.base.notice.domain.dto; | ||
|
||
import com.laigeoffer.pmhub.base.notice.enums.ButtonStateEnum; | ||
import lombok.Data; | ||
|
||
/** | ||
* 按钮,列表长度不超过6 | ||
* TODO: 2023/2/27 此类的变量名为匹配微信接口使用按下划命名,后期安排优化 | ||
* @author canghe | ||
*/ | ||
@Data | ||
public class ButtonDTO { | ||
|
||
/** | ||
* 按钮点击事件类型,0 或不填代表回调点击事件,1 代表跳转url | ||
* */ | ||
private Integer type; | ||
|
||
/** | ||
* 按钮文案,建议不超过10个字 | ||
* */ | ||
private String text; | ||
|
||
|
||
/** | ||
* 按钮样式,目前可填1~4,不填或错填默认1 | ||
* */ | ||
private Integer style; | ||
|
||
/** | ||
* 按钮key值,用户点击后,会产生回调事件将本参数作为EventKey返回,回调事件会带上该key值,最长支持1024字节,不可重复,button_list.type是0时必填 | ||
* */ | ||
private String key; | ||
|
||
/** | ||
* 跳转事件的url,button_list.type是1时必填 | ||
* */ | ||
private String url; | ||
|
||
/*以下部分为更新按钮时需要的*/ | ||
|
||
/** | ||
* 需要更新的按钮的文案 | ||
* */ | ||
private ButtonStateEnum replace_name; | ||
|
||
} |
33 changes: 33 additions & 0 deletions
33
...-base-notice/src/main/java/com/laigeoffer/pmhub/base/notice/domain/dto/CardActionDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.laigeoffer.pmhub.base.notice.domain.dto; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* 整体卡片的点击跳转事件,text_notice必填本字段 | ||
* TODO: 2023/2/27 此类的变量名为匹配微信接口使用按下划命名,后期安排优化 | ||
* @author canghe | ||
*/ | ||
@Data | ||
public class CardActionDTO { | ||
|
||
/** | ||
* 跳转事件类型,1 代表跳转url,2 代表打开小程序。text_notice卡片模版中该字段取值范围为[1,2] | ||
* */ | ||
private Integer type; | ||
|
||
/** | ||
* 跳转链接的url,type是1时必填 | ||
* */ | ||
private String url; | ||
|
||
/** | ||
* 跳转链接的小程序的appid,必须是与当前应用关联的小程序,type是2时必填 | ||
* */ | ||
private String appid; | ||
|
||
/** | ||
* 跳转链接的小程序的pagepath,type是2时选填 | ||
* */ | ||
private String pagepath; | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
...-notice/src/main/java/com/laigeoffer/pmhub/base/notice/domain/dto/EmphasisContentDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.laigeoffer.pmhub.base.notice.domain.dto; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* 关键数据样式 | ||
* @author canghe | ||
*/ | ||
@Data | ||
public class EmphasisContentDTO { | ||
|
||
/** | ||
* 关键数据样式的数据内容,建议不超过14个字 | ||
* */ | ||
private String title; | ||
|
||
/** | ||
* 关键数据样式的数据描述内容,建议不超过22个字 | ||
* */ | ||
private String desc; | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
...e/src/main/java/com/laigeoffer/pmhub/base/notice/domain/dto/HorizontalContentListDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.laigeoffer.pmhub.base.notice.domain.dto; | ||
|
||
import lombok.Data; | ||
|
||
/** | ||
* 二级标题+文本列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过6 | ||
* TODO: 2023/2/27 此类的变量名为匹配微信接口使用按下划命名,后期安排优化 | ||
* @author canghe | ||
*/ | ||
@Data | ||
public class HorizontalContentListDTO { | ||
|
||
/** | ||
* 链接类型,0或不填代表不是链接,1 代表跳转url,2 代表下载附件,3 代表点击跳转成员详情 | ||
* */ | ||
private Integer type; | ||
|
||
/** | ||
* 二级标题,建议不超过5个字 | ||
* */ | ||
private String keyname; | ||
|
||
/** | ||
* 二级文本,type是2,该字段代表文件名称(要包含文件类型),建议不超过30个字,(支持id转译) | ||
* */ | ||
private String value; | ||
|
||
/** | ||
* 链接跳转的url,horizontal_content_list.type是1时必填 | ||
* */ | ||
private String url; | ||
|
||
/** | ||
* 附件的media_id,horizontal_content_list.type是2时必填 | ||
* */ | ||
private String media_id; | ||
|
||
/** | ||
* 成员详情的userid,horizontal_content_list.type是3时必填 | ||
* */ | ||
private String userid; | ||
|
||
} |
Oops, something went wrong.