Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibznotify
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibznotify
提交
bd0acfb6
提交
bd0acfb6
编写于
2月 25, 2021
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibiz4j 发布系统代码 [ibiz-notify,通知消息]
上级
50d1ec59
变更
13
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
142 行增加
和
8 行删除
+142
-8
MsgBody.java
.../src/main/java/cn/ibizlab/core/notify/domain/MsgBody.java
+18
-0
MsgOpenAccess.java
...ain/java/cn/ibizlab/core/notify/domain/MsgOpenAccess.java
+15
-0
MsgTemplate.java
.../main/java/cn/ibizlab/core/notify/domain/MsgTemplate.java
+12
-0
MsgUserAccount.java
...in/java/cn/ibizlab/core/notify/domain/MsgUserAccount.java
+8
-0
MsgBodyDTO.java
...ider-api/src/main/java/cn/ibizlab/api/dto/MsgBodyDTO.java
+18
-0
MsgOpenAccessDTO.java
...pi/src/main/java/cn/ibizlab/api/dto/MsgOpenAccessDTO.java
+15
-0
MsgTemplateDTO.java
...-api/src/main/java/cn/ibizlab/api/dto/MsgTemplateDTO.java
+12
-0
MsgUserAccountDTO.java
...i/src/main/java/cn/ibizlab/api/dto/MsgUserAccountDTO.java
+8
-0
DEFieldDefaultValueAspect.java
...ava/cn/ibizlab/util/aspect/DEFieldDefaultValueAspect.java
+14
-4
IBZUAAFallback.java
.../src/main/java/cn/ibizlab/util/client/IBZUAAFallback.java
+1
-0
IBZUAAFeignClient.java
...c/main/java/cn/ibizlab/util/client/IBZUAAFeignClient.java
+1
-0
AuthenticationUser.java
...ain/java/cn/ibizlab/util/security/AuthenticationUser.java
+10
-0
FeignRequestInterceptor.java
...ain/java/cn/ibizlab/util/web/FeignRequestInterceptor.java
+10
-4
未找到文件。
ibznotify-core/src/main/java/cn/ibizlab/core/notify/domain/MsgBody.java
浏览文件 @
bd0acfb6
...
...
@@ -24,6 +24,8 @@ import java.io.Serializable;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
cn.ibizlab.util.annotation.Audit
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
...
...
@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"IBZMSGBODY"
,
resultMap
=
"MsgBodyResultMap"
)
@ApiModel
(
"消息"
)
public
class
MsgBody
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -50,6 +53,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"iserror"
)
@JSONField
(
name
=
"is_error"
)
@JsonProperty
(
"is_error"
)
@ApiModelProperty
(
"是否出错"
)
private
Integer
isError
;
/**
* 是否发送
...
...
@@ -58,6 +62,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"issend"
)
@JSONField
(
name
=
"is_send"
)
@JsonProperty
(
"is_send"
)
@ApiModelProperty
(
"是否发送"
)
private
Integer
isSend
;
/**
* 消息标识
...
...
@@ -66,6 +71,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableId
(
value
=
"msgid"
,
type
=
IdType
.
ASSIGN_UUID
)
@JSONField
(
name
=
"msg_id"
)
@JsonProperty
(
"msg_id"
)
@ApiModelProperty
(
"消息标识"
)
private
String
msgId
;
/**
* 目标用户
...
...
@@ -73,6 +79,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"tousers"
)
@JSONField
(
name
=
"to_users"
)
@JsonProperty
(
"to_users"
)
@ApiModelProperty
(
"目标用户"
)
private
String
toUsers
;
/**
* 消息链接
...
...
@@ -80,6 +87,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"msglink"
)
@JSONField
(
name
=
"msg_link"
)
@JsonProperty
(
"msg_link"
)
@ApiModelProperty
(
"消息链接"
)
private
String
msgLink
;
/**
* 消息标题
...
...
@@ -87,6 +95,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"subject"
)
@JSONField
(
name
=
"subject"
)
@JsonProperty
(
"subject"
)
@ApiModelProperty
(
"消息标题"
)
private
String
subject
;
/**
* 消息内容
...
...
@@ -94,6 +103,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"content"
)
@JSONField
(
name
=
"content"
)
@JsonProperty
(
"content"
)
@ApiModelProperty
(
"消息内容"
)
private
String
content
;
/**
* 消息类型
...
...
@@ -101,6 +111,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"msgtype"
)
@JSONField
(
name
=
"msg_type"
)
@JsonProperty
(
"msg_type"
)
@ApiModelProperty
(
"消息类型"
)
private
Integer
msgType
;
/**
* 消息名称
...
...
@@ -108,6 +119,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"msgname"
)
@JSONField
(
name
=
"msg_name"
)
@JsonProperty
(
"msg_name"
)
@ApiModelProperty
(
"消息名称"
)
private
String
msgName
;
/**
* 消息模板标识
...
...
@@ -115,6 +127,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"templateid"
)
@JSONField
(
name
=
"template_id"
)
@JsonProperty
(
"template_id"
)
@ApiModelProperty
(
"消息模板标识"
)
private
String
templateId
;
/**
* 错误信息
...
...
@@ -122,6 +135,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"errorinfo"
)
@JSONField
(
name
=
"error_info"
)
@JsonProperty
(
"error_info"
)
@ApiModelProperty
(
"错误信息"
)
private
String
errorInfo
;
/**
* 用户数据
...
...
@@ -129,6 +143,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"userdata"
)
@JSONField
(
name
=
"user_data"
)
@JsonProperty
(
"user_data"
)
@ApiModelProperty
(
"用户数据"
)
private
String
userData
;
/**
* 消息模板参数
...
...
@@ -137,6 +152,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"templparams"
)
@JSONField
(
name
=
"template_params"
)
@JsonProperty
(
"template_params"
)
@ApiModelProperty
(
"消息模板参数"
)
private
String
templateParams
;
/**
* 用户数据2
...
...
@@ -144,6 +160,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"userdata2"
)
@JSONField
(
name
=
"user_data2"
)
@JsonProperty
(
"user_data2"
)
@ApiModelProperty
(
"用户数据2"
)
private
String
userData2
;
/**
* 消息链接(PC)
...
...
@@ -152,6 +169,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField
(
value
=
"msglink_pc"
)
@JSONField
(
name
=
"msg_link_pc"
)
@JsonProperty
(
"msg_link_pc"
)
@ApiModelProperty
(
"消息链接(PC)"
)
private
String
msgLinkPc
;
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/notify/domain/MsgOpenAccess.java
浏览文件 @
bd0acfb6
...
...
@@ -24,6 +24,8 @@ import java.io.Serializable;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
cn.ibizlab.util.annotation.Audit
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
...
...
@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"IBZOPENACCESS"
,
resultMap
=
"MsgOpenAccessResultMap"
)
@ApiModel
(
"接入开放平台"
)
public
class
MsgOpenAccess
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -50,6 +53,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableId
(
value
=
"accessid"
,
type
=
IdType
.
ASSIGN_UUID
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
@ApiModelProperty
(
"开放平台接入标识"
)
private
String
id
;
/**
* 开放平台
...
...
@@ -58,6 +62,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField
(
value
=
"accessname"
)
@JSONField
(
name
=
"name"
)
@JsonProperty
(
"name"
)
@ApiModelProperty
(
"开放平台"
)
private
String
name
;
/**
* 开放平台类型
...
...
@@ -66,6 +71,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField
(
value
=
"open_type"
)
@JSONField
(
name
=
"open_type"
)
@JsonProperty
(
"open_type"
)
@ApiModelProperty
(
"开放平台类型"
)
private
String
openType
;
/**
* AccessKey(AppId)
...
...
@@ -74,6 +80,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField
(
value
=
"access_key"
)
@JSONField
(
name
=
"access_key"
)
@JsonProperty
(
"access_key"
)
@ApiModelProperty
(
"AccessKey(AppId)"
)
private
String
accessKey
;
/**
* SecretKey(AppSecret)
...
...
@@ -82,6 +89,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField
(
value
=
"secret_key"
)
@JSONField
(
name
=
"secret_key"
)
@JsonProperty
(
"secret_key"
)
@ApiModelProperty
(
"SecretKey(AppSecret)"
)
private
String
secretKey
;
/**
* RegionId(CorpId)
...
...
@@ -90,6 +98,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField
(
value
=
"region_id"
)
@JSONField
(
name
=
"region_id"
)
@JsonProperty
(
"region_id"
)
@ApiModelProperty
(
"RegionId(CorpId)"
)
private
String
regionId
;
/**
* 管理账号token
...
...
@@ -98,6 +107,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField
(
value
=
"access_token"
)
@JSONField
(
name
=
"access_token"
)
@JsonProperty
(
"access_token"
)
@ApiModelProperty
(
"管理账号token"
)
private
String
accessToken
;
/**
* 管理账号token过期时间
...
...
@@ -107,6 +117,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"expires_time"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"expires_time"
)
@ApiModelProperty
(
"管理账号token过期时间"
)
private
Timestamp
expiresTime
;
/**
* 是否禁用
...
...
@@ -115,6 +126,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField
(
value
=
"disabled"
)
@JSONField
(
name
=
"disabled"
)
@JsonProperty
(
"disabled"
)
@ApiModelProperty
(
"是否禁用"
)
private
Integer
disabled
;
/**
* RedirectURI
...
...
@@ -123,6 +135,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField
(
value
=
"redirect_uri"
)
@JSONField
(
name
=
"redirect_uri"
)
@JsonProperty
(
"redirect_uri"
)
@ApiModelProperty
(
"RedirectURI"
)
private
String
redirectUri
;
/**
* NotifyUrl
...
...
@@ -131,6 +144,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField
(
value
=
"notify_url"
)
@JSONField
(
name
=
"notify_url"
)
@JsonProperty
(
"notify_url"
)
@ApiModelProperty
(
"NotifyUrl"
)
private
String
notifyUrl
;
/**
* AGENT_ID
...
...
@@ -139,6 +153,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField
(
value
=
"agent_id"
)
@JSONField
(
name
=
"agent_id"
)
@JsonProperty
(
"agent_id"
)
@ApiModelProperty
(
"AGENT_ID"
)
private
Long
agentId
;
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/notify/domain/MsgTemplate.java
浏览文件 @
bd0acfb6
...
...
@@ -24,6 +24,8 @@ import java.io.Serializable;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
cn.ibizlab.util.annotation.Audit
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
...
...
@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"IBZMSGTEMPL"
,
resultMap
=
"MsgTemplateResultMap"
)
@ApiModel
(
"消息模板"
)
public
class
MsgTemplate
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -50,6 +53,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableId
(
value
=
"tid"
,
type
=
IdType
.
ASSIGN_UUID
)
@JSONField
(
name
=
"tid"
)
@JsonProperty
(
"tid"
)
@ApiModelProperty
(
"模板标识"
)
private
String
tid
;
/**
* 模板标题
...
...
@@ -58,6 +62,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField
(
value
=
"template_name"
)
@JSONField
(
name
=
"template_name"
)
@JsonProperty
(
"template_name"
)
@ApiModelProperty
(
"模板标题"
)
private
String
templateName
;
/**
* 模板类型
...
...
@@ -66,6 +71,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField
(
value
=
"template_type"
)
@JSONField
(
name
=
"template_type"
)
@JsonProperty
(
"template_type"
)
@ApiModelProperty
(
"模板类型"
)
private
String
templateType
;
/**
* 模板内容
...
...
@@ -73,6 +79,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField
(
value
=
"content"
)
@JSONField
(
name
=
"content"
)
@JsonProperty
(
"content"
)
@ApiModelProperty
(
"模板内容"
)
private
String
content
;
/**
* 模板标识
...
...
@@ -81,6 +88,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField
(
value
=
"template_id"
)
@JSONField
(
name
=
"template_id"
)
@JsonProperty
(
"template_id"
)
@ApiModelProperty
(
"模板标识"
)
private
String
templateId
;
/**
* URL
...
...
@@ -89,6 +97,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField
(
value
=
"template_url"
)
@JSONField
(
name
=
"template_url"
)
@JsonProperty
(
"template_url"
)
@ApiModelProperty
(
"URL"
)
private
String
templateUrl
;
/**
* 开放平台接入标识
...
...
@@ -96,6 +105,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField
(
value
=
"accessid"
)
@JSONField
(
name
=
"access_id"
)
@JsonProperty
(
"access_id"
)
@ApiModelProperty
(
"开放平台接入标识"
)
private
String
accessId
;
/**
* 接入平台
...
...
@@ -103,6 +113,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField
(
value
=
"accessname"
)
@JSONField
(
name
=
"access_name"
)
@JsonProperty
(
"access_name"
)
@ApiModelProperty
(
"接入平台"
)
private
String
accessName
;
/**
* 接入平台类型
...
...
@@ -111,6 +122,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField
(
value
=
"open_type"
)
@JSONField
(
name
=
"open_type"
)
@JsonProperty
(
"open_type"
)
@ApiModelProperty
(
"接入平台类型"
)
private
String
openType
;
/**
...
...
ibznotify-core/src/main/java/cn/ibizlab/core/notify/domain/MsgUserAccount.java
浏览文件 @
bd0acfb6
...
...
@@ -24,6 +24,8 @@ import java.io.Serializable;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
cn.ibizlab.util.annotation.Audit
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.fasterxml.jackson.annotation.JsonIgnoreProperties
;
...
...
@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor
@JsonIgnoreProperties
(
value
=
"handler"
)
@TableName
(
value
=
"IBZUSERAUTH"
,
resultMap
=
"MsgUserAccountResultMap"
)
@ApiModel
(
"绑定消息账号"
)
public
class
MsgUserAccount
extends
EntityMP
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -50,6 +53,7 @@ public class MsgUserAccount extends EntityMP implements Serializable {
@TableId
(
value
=
"authid"
,
type
=
IdType
.
ASSIGN_UUID
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
@ApiModelProperty
(
"标识"
)
private
String
id
;
/**
* 用户标识
...
...
@@ -57,6 +61,7 @@ public class MsgUserAccount extends EntityMP implements Serializable {
@TableField
(
value
=
"userid"
)
@JSONField
(
name
=
"userid"
)
@JsonProperty
(
"userid"
)
@ApiModelProperty
(
"用户标识"
)
private
String
userid
;
/**
* 认证类型
...
...
@@ -65,6 +70,7 @@ public class MsgUserAccount extends EntityMP implements Serializable {
@TableField
(
value
=
"identity_type"
)
@JSONField
(
name
=
"identity_type"
)
@JsonProperty
(
"identity_type"
)
@ApiModelProperty
(
"认证类型"
)
private
String
identityType
;
/**
* 认证标识
...
...
@@ -72,6 +78,7 @@ public class MsgUserAccount extends EntityMP implements Serializable {
@TableField
(
value
=
"identifier"
)
@JSONField
(
name
=
"identifier"
)
@JsonProperty
(
"identifier"
)
@ApiModelProperty
(
"认证标识"
)
private
String
identifier
;
/**
* 凭据
...
...
@@ -79,6 +86,7 @@ public class MsgUserAccount extends EntityMP implements Serializable {
@TableField
(
value
=
"credential"
)
@JSONField
(
name
=
"credential"
)
@JsonProperty
(
"credential"
)
@ApiModelProperty
(
"凭据"
)
private
String
credential
;
...
...
ibznotify-provider/ibznotify-provider-api/src/main/java/cn/ibizlab/api/dto/MsgBodyDTO.java
浏览文件 @
bd0acfb6
...
...
@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import
cn.ibizlab.util.domain.DTOBase
;
import
cn.ibizlab.util.domain.DTOClient
;
import
lombok.Data
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* 服务DTO对象[MsgBodyDTO]
*/
@Data
@ApiModel
(
"消息"
)
public
class
MsgBodyDTO
extends
DTOBase
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -35,6 +38,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
*/
@JSONField
(
name
=
"is_error"
)
@JsonProperty
(
"is_error"
)
@ApiModelProperty
(
"是否出错"
)
private
Integer
isError
;
/**
...
...
@@ -43,6 +47,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
*/
@JSONField
(
name
=
"is_send"
)
@JsonProperty
(
"is_send"
)
@ApiModelProperty
(
"是否发送"
)
private
Integer
isSend
;
/**
...
...
@@ -52,6 +57,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"msg_id"
)
@JsonProperty
(
"msg_id"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"消息标识"
)
private
String
msgId
;
/**
...
...
@@ -61,6 +67,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"to_users"
)
@JsonProperty
(
"to_users"
)
@Size
(
min
=
0
,
max
=
1000
,
message
=
"内容长度必须小于等于[1000]"
)
@ApiModelProperty
(
"目标用户"
)
private
String
toUsers
;
/**
...
...
@@ -70,6 +77,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"msg_link"
)
@JsonProperty
(
"msg_link"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"消息链接"
)
private
String
msgLink
;
/**
...
...
@@ -79,6 +87,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"subject"
)
@JsonProperty
(
"subject"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"消息标题"
)
private
String
subject
;
/**
...
...
@@ -88,6 +97,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"content"
)
@JsonProperty
(
"content"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"消息内容"
)
private
String
content
;
/**
...
...
@@ -96,6 +106,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
*/
@JSONField
(
name
=
"msg_type"
)
@JsonProperty
(
"msg_type"
)
@ApiModelProperty
(
"消息类型"
)
private
Integer
msgType
;
/**
...
...
@@ -105,6 +116,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"msg_name"
)
@JsonProperty
(
"msg_name"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"消息名称"
)
private
String
msgName
;
/**
...
...
@@ -114,6 +126,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"template_id"
)
@JsonProperty
(
"template_id"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"消息模板标识"
)
private
String
templateId
;
/**
...
...
@@ -123,6 +136,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"error_info"
)
@JsonProperty
(
"error_info"
)
@Size
(
min
=
0
,
max
=
1048576
,
message
=
"内容长度必须小于等于[1048576]"
)
@ApiModelProperty
(
"错误信息"
)
private
String
errorInfo
;
/**
...
...
@@ -132,6 +146,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"user_data"
)
@JsonProperty
(
"user_data"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"用户数据"
)
private
String
userData
;
/**
...
...
@@ -141,6 +156,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"template_params"
)
@JsonProperty
(
"template_params"
)
@Size
(
min
=
0
,
max
=
1048576
,
message
=
"内容长度必须小于等于[1048576]"
)
@ApiModelProperty
(
"消息模板参数"
)
private
String
templateParams
;
/**
...
...
@@ -150,6 +166,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"user_data2"
)
@JsonProperty
(
"user_data2"
)
@Size
(
min
=
0
,
max
=
2000
,
message
=
"内容长度必须小于等于[2000]"
)
@ApiModelProperty
(
"用户数据2"
)
private
String
userData2
;
/**
...
...
@@ -159,6 +176,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"msg_link_pc"
)
@JsonProperty
(
"msg_link_pc"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"消息链接(PC)"
)
private
String
msgLinkPc
;
...
...
ibznotify-provider/ibznotify-provider-api/src/main/java/cn/ibizlab/api/dto/MsgOpenAccessDTO.java
浏览文件 @
bd0acfb6
...
...
@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import
cn.ibizlab.util.domain.DTOBase
;
import
cn.ibizlab.util.domain.DTOClient
;
import
lombok.Data
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* 服务DTO对象[MsgOpenAccessDTO]
*/
@Data
@ApiModel
(
"接入开放平台"
)
public
class
MsgOpenAccessDTO
extends
DTOBase
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -36,6 +39,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"开放平台接入标识"
)
private
String
id
;
/**
...
...
@@ -45,6 +49,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"name"
)
@JsonProperty
(
"name"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"开放平台"
)
private
String
name
;
/**
...
...
@@ -54,6 +59,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"open_type"
)
@JsonProperty
(
"open_type"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"开放平台类型"
)
private
String
openType
;
/**
...
...
@@ -63,6 +69,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"access_key"
)
@JsonProperty
(
"access_key"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"AccessKey(AppId)"
)
private
String
accessKey
;
/**
...
...
@@ -72,6 +79,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"secret_key"
)
@JsonProperty
(
"secret_key"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"SecretKey(AppSecret)"
)
private
String
secretKey
;
/**
...
...
@@ -81,6 +89,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"region_id"
)
@JsonProperty
(
"region_id"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"RegionId(CorpId)"
)
private
String
regionId
;
/**
...
...
@@ -90,6 +99,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"access_token"
)
@JsonProperty
(
"access_token"
)
@Size
(
min
=
0
,
max
=
1000
,
message
=
"内容长度必须小于等于[1000]"
)
@ApiModelProperty
(
"管理账号token"
)
private
String
accessToken
;
/**
...
...
@@ -99,6 +109,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
locale
=
"zh"
,
timezone
=
"GMT+8"
)
@JSONField
(
name
=
"expires_time"
,
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonProperty
(
"expires_time"
)
@ApiModelProperty
(
"管理账号token过期时间"
)
private
Timestamp
expiresTime
;
/**
...
...
@@ -107,6 +118,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
*/
@JSONField
(
name
=
"disabled"
)
@JsonProperty
(
"disabled"
)
@ApiModelProperty
(
"是否禁用"
)
private
Integer
disabled
;
/**
...
...
@@ -116,6 +128,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"redirect_uri"
)
@JsonProperty
(
"redirect_uri"
)
@Size
(
min
=
0
,
max
=
500
,
message
=
"内容长度必须小于等于[500]"
)
@ApiModelProperty
(
"RedirectURI"
)
private
String
redirectUri
;
/**
...
...
@@ -125,6 +138,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"notify_url"
)
@JsonProperty
(
"notify_url"
)
@Size
(
min
=
0
,
max
=
500
,
message
=
"内容长度必须小于等于[500]"
)
@ApiModelProperty
(
"NotifyUrl"
)
private
String
notifyUrl
;
/**
...
...
@@ -134,6 +148,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"agent_id"
)
@JsonProperty
(
"agent_id"
)
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
@ApiModelProperty
(
"AGENT_ID"
)
private
Long
agentId
;
...
...
ibznotify-provider/ibznotify-provider-api/src/main/java/cn/ibizlab/api/dto/MsgTemplateDTO.java
浏览文件 @
bd0acfb6
...
...
@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import
cn.ibizlab.util.domain.DTOBase
;
import
cn.ibizlab.util.domain.DTOClient
;
import
lombok.Data
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* 服务DTO对象[MsgTemplateDTO]
*/
@Data
@ApiModel
(
"消息模板"
)
public
class
MsgTemplateDTO
extends
DTOBase
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -36,6 +39,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"tid"
)
@JsonProperty
(
"tid"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"模板标识"
)
private
String
tid
;
/**
...
...
@@ -45,6 +49,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"template_name"
)
@JsonProperty
(
"template_name"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"模板标题"
)
private
String
templateName
;
/**
...
...
@@ -54,6 +59,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"template_type"
)
@JsonProperty
(
"template_type"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"模板类型"
)
private
String
templateType
;
/**
...
...
@@ -63,6 +69,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"content"
)
@JsonProperty
(
"content"
)
@Size
(
min
=
0
,
max
=
4000
,
message
=
"内容长度必须小于等于[4000]"
)
@ApiModelProperty
(
"模板内容"
)
private
String
content
;
/**
...
...
@@ -72,6 +79,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"template_id"
)
@JsonProperty
(
"template_id"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"模板标识"
)
private
String
templateId
;
/**
...
...
@@ -81,6 +89,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"template_url"
)
@JsonProperty
(
"template_url"
)
@Size
(
min
=
0
,
max
=
1000
,
message
=
"内容长度必须小于等于[1000]"
)
@ApiModelProperty
(
"URL"
)
private
String
templateUrl
;
/**
...
...
@@ -90,6 +99,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"access_id"
)
@JsonProperty
(
"access_id"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"开放平台接入标识"
)
private
String
accessId
;
/**
...
...
@@ -99,6 +109,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"access_name"
)
@JsonProperty
(
"access_name"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"接入平台"
)
private
String
accessName
;
/**
...
...
@@ -108,6 +119,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"open_type"
)
@JsonProperty
(
"open_type"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"接入平台类型"
)
private
String
openType
;
...
...
ibznotify-provider/ibznotify-provider-api/src/main/java/cn/ibizlab/api/dto/MsgUserAccountDTO.java
浏览文件 @
bd0acfb6
...
...
@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import
cn.ibizlab.util.domain.DTOBase
;
import
cn.ibizlab.util.domain.DTOClient
;
import
lombok.Data
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* 服务DTO对象[MsgUserAccountDTO]
*/
@Data
@ApiModel
(
"绑定消息账号"
)
public
class
MsgUserAccountDTO
extends
DTOBase
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -36,6 +39,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"标识"
)
private
String
id
;
/**
...
...
@@ -45,6 +49,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"userid"
)
@JsonProperty
(
"userid"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"用户标识"
)
private
String
userid
;
/**
...
...
@@ -54,6 +59,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"identity_type"
)
@JsonProperty
(
"identity_type"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"认证类型"
)
private
String
identityType
;
/**
...
...
@@ -63,6 +69,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"identifier"
)
@JsonProperty
(
"identifier"
)
@Size
(
min
=
0
,
max
=
200
,
message
=
"内容长度必须小于等于[200]"
)
@ApiModelProperty
(
"认证标识"
)
private
String
identifier
;
/**
...
...
@@ -72,6 +79,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable {
@JSONField
(
name
=
"credential"
)
@JsonProperty
(
"credential"
)
@Size
(
min
=
0
,
max
=
500
,
message
=
"内容长度必须小于等于[500]"
)
@ApiModelProperty
(
"凭据"
)
private
String
credential
;
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/aspect/DEFieldDefaultValueAspect.java
浏览文件 @
bd0acfb6
...
...
@@ -27,6 +27,16 @@ import java.util.Map;
@Component
public
class
DEFieldDefaultValueAspect
{
/**
* 操作用户标识
*/
final
static
String
TAG_PERSONID
=
"SRF_PERSONID"
;
/**
* 操作用户名称
*/
final
static
String
TAG_PERSONNAME
=
"SRF_PERSONNAME"
;
/**
* 新建数据切入点
* @param point
...
...
@@ -221,16 +231,16 @@ public class DEFieldDefaultValueAspect
switch
(
preFieldType
)
{
case
CREATEMAN:
et
.
set
(
fieldname
,
curUser
.
getUserid
());
et
.
set
(
fieldname
,
StringUtils
.
isEmpty
(
curUser
.
getUserid
())
?
et
.
get
(
TAG_PERSONID
)
:
curUser
.
getUserid
());
break
;
case
CREATEMANNAME:
et
.
set
(
fieldname
,
curUser
.
getPersonname
());
et
.
set
(
fieldname
,
StringUtils
.
isEmpty
(
curUser
.
getPersonname
())
?
et
.
get
(
TAG_PERSONNAME
)
:
curUser
.
getPersonname
());
break
;
case
UPDATEMAN:
et
.
set
(
fieldname
,
curUser
.
getUserid
());
et
.
set
(
fieldname
,
StringUtils
.
isEmpty
(
curUser
.
getUserid
())
?
et
.
get
(
TAG_PERSONID
)
:
curUser
.
getUserid
());
break
;
case
UPDATEMANNAME:
et
.
set
(
fieldname
,
curUser
.
getPersonname
());
et
.
set
(
fieldname
,
StringUtils
.
isEmpty
(
curUser
.
getPersonname
())
?
et
.
get
(
TAG_PERSONNAME
)
:
curUser
.
getPersonname
());
break
;
case
CREATEDATE:
et
.
set
(
fieldname
,
new
Timestamp
(
new
Date
().
getTime
()));
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/client/IBZUAAFallback.java
浏览文件 @
bd0acfb6
...
...
@@ -2,6 +2,7 @@ package cn.ibizlab.util.client;
import
cn.ibizlab.util.security.AuthenticationUser
;
import
cn.ibizlab.util.security.AuthorizationLogin
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.stereotype.Component
;
import
com.alibaba.fastjson.JSONObject
;
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/client/IBZUAAFeignClient.java
浏览文件 @
bd0acfb6
...
...
@@ -5,6 +5,7 @@ import cn.ibizlab.util.security.AuthorizationLogin;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.util.MultiValueMap
;
import
com.alibaba.fastjson.JSONObject
;
@FeignClient
(
value
=
"${ibiz.ref.service.uaa:ibzuaa-api}"
,
contextId
=
"uaa"
,
fallback
=
IBZUAAFallback
.
class
)
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/security/AuthenticationUser.java
浏览文件 @
bd0acfb6
...
...
@@ -7,6 +7,7 @@ import lombok.Data;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.context.SecurityContextHolder
;
import
org.springframework.security.core.authority.SimpleGrantedAuthority
;
import
org.springframework.security.authentication.UsernamePasswordAuthenticationToken
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.util.ObjectUtils
;
import
java.sql.Timestamp
;
...
...
@@ -231,6 +232,15 @@ public class AuthenticationUser implements UserDetails
return
authuserdetail
;
}
public
static
AuthenticationUser
setAuthenticationUser
(
String
userId
,
String
userName
)
{
AuthenticationUser
user
=
new
AuthenticationUser
();
user
.
setUserid
(
userId
);
user
.
setPersonname
(
userName
);
UsernamePasswordAuthenticationToken
authentication
=
new
UsernamePasswordAuthenticationToken
(
user
,
null
,
user
.
getAuthorities
());
SecurityContextHolder
.
getContext
().
setAuthentication
(
authentication
);
return
user
;
}
public
Map
<
String
,
Object
>
getSessionParams
()
{
if
(
this
.
sessionParams
==
null
)
...
...
ibznotify-util/src/main/java/cn/ibizlab/util/web/FeignRequestInterceptor.java
浏览文件 @
bd0acfb6
...
...
@@ -4,11 +4,17 @@ import feign.RequestInterceptor;
import
feign.RequestTemplate
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Enumeration
;
import
java.util.LinkedHashMap
;
/**
* feign请求拦截器
...
...
@@ -19,23 +25,23 @@ public class FeignRequestInterceptor implements RequestInterceptor {
private
final
Logger
logger
=
LoggerFactory
.
getLogger
(
getClass
());
@Override
public
void
apply
(
RequestTemplate
requestTemplate
)
{
ServletRequestAttributes
requestAttributes
=
(
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
();
if
(
requestAttributes
!=
null
)
{
if
(
requestAttributes
!=
null
)
{
HttpServletRequest
request
=
requestAttributes
.
getRequest
();
Enumeration
<
String
>
headerNames
=
request
.
getHeaderNames
();
if
(
headerNames
!=
null
)
{
while
(
headerNames
.
hasMoreElements
())
{
String
name
=
headerNames
.
nextElement
();
if
(
name
.
equalsIgnoreCase
(
"transfer-encoding"
))
{
if
(
name
.
equalsIgnoreCase
(
"transfer-encoding"
))
{
continue
;
}
String
values
=
request
.
getHeader
(
name
);
requestTemplate
.
header
(
name
,
values
);
}
logger
.
info
(
"feign interceptor header:{}"
,
requestTemplate
);
logger
.
info
(
"feign interceptor header:{}"
,
requestTemplate
);
}
}
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录