提交 bd0acfb6 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码 [ibiz-notify,通知消息]

上级 50d1ec59
...@@ -24,6 +24,8 @@ import java.io.Serializable; ...@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*; import lombok.*;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit; import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
...@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZMSGBODY", resultMap = "MsgBodyResultMap") @TableName(value = "IBZMSGBODY", resultMap = "MsgBodyResultMap")
@ApiModel("消息")
public class MsgBody extends EntityMP implements Serializable { public class MsgBody extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -50,6 +53,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -50,6 +53,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "iserror") @TableField(value = "iserror")
@JSONField(name = "is_error") @JSONField(name = "is_error")
@JsonProperty("is_error") @JsonProperty("is_error")
@ApiModelProperty("是否出错")
private Integer isError; private Integer isError;
/** /**
* 是否发送 * 是否发送
...@@ -58,6 +62,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -58,6 +62,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "issend") @TableField(value = "issend")
@JSONField(name = "is_send") @JSONField(name = "is_send")
@JsonProperty("is_send") @JsonProperty("is_send")
@ApiModelProperty("是否发送")
private Integer isSend; private Integer isSend;
/** /**
* 消息标识 * 消息标识
...@@ -66,6 +71,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -66,6 +71,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableId(value = "msgid", type = IdType.ASSIGN_UUID) @TableId(value = "msgid", type = IdType.ASSIGN_UUID)
@JSONField(name = "msg_id") @JSONField(name = "msg_id")
@JsonProperty("msg_id") @JsonProperty("msg_id")
@ApiModelProperty("消息标识")
private String msgId; private String msgId;
/** /**
* 目标用户 * 目标用户
...@@ -73,6 +79,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -73,6 +79,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "tousers") @TableField(value = "tousers")
@JSONField(name = "to_users") @JSONField(name = "to_users")
@JsonProperty("to_users") @JsonProperty("to_users")
@ApiModelProperty("目标用户")
private String toUsers; private String toUsers;
/** /**
* 消息链接 * 消息链接
...@@ -80,6 +87,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -80,6 +87,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "msglink") @TableField(value = "msglink")
@JSONField(name = "msg_link") @JSONField(name = "msg_link")
@JsonProperty("msg_link") @JsonProperty("msg_link")
@ApiModelProperty("消息链接")
private String msgLink; private String msgLink;
/** /**
* 消息标题 * 消息标题
...@@ -87,6 +95,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -87,6 +95,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "subject") @TableField(value = "subject")
@JSONField(name = "subject") @JSONField(name = "subject")
@JsonProperty("subject") @JsonProperty("subject")
@ApiModelProperty("消息标题")
private String subject; private String subject;
/** /**
* 消息内容 * 消息内容
...@@ -94,6 +103,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -94,6 +103,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "content") @TableField(value = "content")
@JSONField(name = "content") @JSONField(name = "content")
@JsonProperty("content") @JsonProperty("content")
@ApiModelProperty("消息内容")
private String content; private String content;
/** /**
* 消息类型 * 消息类型
...@@ -101,6 +111,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -101,6 +111,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "msgtype") @TableField(value = "msgtype")
@JSONField(name = "msg_type") @JSONField(name = "msg_type")
@JsonProperty("msg_type") @JsonProperty("msg_type")
@ApiModelProperty("消息类型")
private Integer msgType; private Integer msgType;
/** /**
* 消息名称 * 消息名称
...@@ -108,6 +119,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -108,6 +119,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "msgname") @TableField(value = "msgname")
@JSONField(name = "msg_name") @JSONField(name = "msg_name")
@JsonProperty("msg_name") @JsonProperty("msg_name")
@ApiModelProperty("消息名称")
private String msgName; private String msgName;
/** /**
* 消息模板标识 * 消息模板标识
...@@ -115,6 +127,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -115,6 +127,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "templateid") @TableField(value = "templateid")
@JSONField(name = "template_id") @JSONField(name = "template_id")
@JsonProperty("template_id") @JsonProperty("template_id")
@ApiModelProperty("消息模板标识")
private String templateId; private String templateId;
/** /**
* 错误信息 * 错误信息
...@@ -122,6 +135,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -122,6 +135,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "errorinfo") @TableField(value = "errorinfo")
@JSONField(name = "error_info") @JSONField(name = "error_info")
@JsonProperty("error_info") @JsonProperty("error_info")
@ApiModelProperty("错误信息")
private String errorInfo; private String errorInfo;
/** /**
* 用户数据 * 用户数据
...@@ -129,6 +143,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -129,6 +143,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "userdata") @TableField(value = "userdata")
@JSONField(name = "user_data") @JSONField(name = "user_data")
@JsonProperty("user_data") @JsonProperty("user_data")
@ApiModelProperty("用户数据")
private String userData; private String userData;
/** /**
* 消息模板参数 * 消息模板参数
...@@ -137,6 +152,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -137,6 +152,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "templparams") @TableField(value = "templparams")
@JSONField(name = "template_params") @JSONField(name = "template_params")
@JsonProperty("template_params") @JsonProperty("template_params")
@ApiModelProperty("消息模板参数")
private String templateParams; private String templateParams;
/** /**
* 用户数据2 * 用户数据2
...@@ -144,6 +160,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -144,6 +160,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "userdata2") @TableField(value = "userdata2")
@JSONField(name = "user_data2") @JSONField(name = "user_data2")
@JsonProperty("user_data2") @JsonProperty("user_data2")
@ApiModelProperty("用户数据2")
private String userData2; private String userData2;
/** /**
* 消息链接(PC) * 消息链接(PC)
...@@ -152,6 +169,7 @@ public class MsgBody extends EntityMP implements Serializable { ...@@ -152,6 +169,7 @@ public class MsgBody extends EntityMP implements Serializable {
@TableField(value = "msglink_pc") @TableField(value = "msglink_pc")
@JSONField(name = "msg_link_pc") @JSONField(name = "msg_link_pc")
@JsonProperty("msg_link_pc") @JsonProperty("msg_link_pc")
@ApiModelProperty("消息链接(PC)")
private String msgLinkPc; private String msgLinkPc;
......
...@@ -24,6 +24,8 @@ import java.io.Serializable; ...@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*; import lombok.*;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit; import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
...@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZOPENACCESS", resultMap = "MsgOpenAccessResultMap") @TableName(value = "IBZOPENACCESS", resultMap = "MsgOpenAccessResultMap")
@ApiModel("接入开放平台")
public class MsgOpenAccess extends EntityMP implements Serializable { public class MsgOpenAccess extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -50,6 +53,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable { ...@@ -50,6 +53,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableId(value = "accessid", type = IdType.ASSIGN_UUID) @TableId(value = "accessid", type = IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
@ApiModelProperty("开放平台接入标识")
private String id; private String id;
/** /**
* 开放平台 * 开放平台
...@@ -58,6 +62,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable { ...@@ -58,6 +62,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField(value = "accessname") @TableField(value = "accessname")
@JSONField(name = "name") @JSONField(name = "name")
@JsonProperty("name") @JsonProperty("name")
@ApiModelProperty("开放平台")
private String name; private String name;
/** /**
* 开放平台类型 * 开放平台类型
...@@ -66,6 +71,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable { ...@@ -66,6 +71,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField(value = "open_type") @TableField(value = "open_type")
@JSONField(name = "open_type") @JSONField(name = "open_type")
@JsonProperty("open_type") @JsonProperty("open_type")
@ApiModelProperty("开放平台类型")
private String openType; private String openType;
/** /**
* AccessKey(AppId) * AccessKey(AppId)
...@@ -74,6 +80,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable { ...@@ -74,6 +80,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField(value = "access_key") @TableField(value = "access_key")
@JSONField(name = "access_key") @JSONField(name = "access_key")
@JsonProperty("access_key") @JsonProperty("access_key")
@ApiModelProperty("AccessKey(AppId)")
private String accessKey; private String accessKey;
/** /**
* SecretKey(AppSecret) * SecretKey(AppSecret)
...@@ -82,6 +89,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable { ...@@ -82,6 +89,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField(value = "secret_key") @TableField(value = "secret_key")
@JSONField(name = "secret_key") @JSONField(name = "secret_key")
@JsonProperty("secret_key") @JsonProperty("secret_key")
@ApiModelProperty("SecretKey(AppSecret)")
private String secretKey; private String secretKey;
/** /**
* RegionId(CorpId) * RegionId(CorpId)
...@@ -90,6 +98,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable { ...@@ -90,6 +98,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField(value = "region_id") @TableField(value = "region_id")
@JSONField(name = "region_id") @JSONField(name = "region_id")
@JsonProperty("region_id") @JsonProperty("region_id")
@ApiModelProperty("RegionId(CorpId)")
private String regionId; private String regionId;
/** /**
* 管理账号token * 管理账号token
...@@ -98,6 +107,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable { ...@@ -98,6 +107,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField(value = "access_token") @TableField(value = "access_token")
@JSONField(name = "access_token") @JSONField(name = "access_token")
@JsonProperty("access_token") @JsonProperty("access_token")
@ApiModelProperty("管理账号token")
private String accessToken; private String accessToken;
/** /**
* 管理账号token过期时间 * 管理账号token过期时间
...@@ -107,6 +117,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable { ...@@ -107,6 +117,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
@JSONField(name = "expires_time", format = "yyyy-MM-dd HH:mm:ss") @JSONField(name = "expires_time", format = "yyyy-MM-dd HH:mm:ss")
@JsonProperty("expires_time") @JsonProperty("expires_time")
@ApiModelProperty("管理账号token过期时间")
private Timestamp expiresTime; private Timestamp expiresTime;
/** /**
* 是否禁用 * 是否禁用
...@@ -115,6 +126,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable { ...@@ -115,6 +126,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField(value = "disabled") @TableField(value = "disabled")
@JSONField(name = "disabled") @JSONField(name = "disabled")
@JsonProperty("disabled") @JsonProperty("disabled")
@ApiModelProperty("是否禁用")
private Integer disabled; private Integer disabled;
/** /**
* RedirectURI * RedirectURI
...@@ -123,6 +135,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable { ...@@ -123,6 +135,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField(value = "redirect_uri") @TableField(value = "redirect_uri")
@JSONField(name = "redirect_uri") @JSONField(name = "redirect_uri")
@JsonProperty("redirect_uri") @JsonProperty("redirect_uri")
@ApiModelProperty("RedirectURI")
private String redirectUri; private String redirectUri;
/** /**
* NotifyUrl * NotifyUrl
...@@ -131,6 +144,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable { ...@@ -131,6 +144,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField(value = "notify_url") @TableField(value = "notify_url")
@JSONField(name = "notify_url") @JSONField(name = "notify_url")
@JsonProperty("notify_url") @JsonProperty("notify_url")
@ApiModelProperty("NotifyUrl")
private String notifyUrl; private String notifyUrl;
/** /**
* AGENT_ID * AGENT_ID
...@@ -139,6 +153,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable { ...@@ -139,6 +153,7 @@ public class MsgOpenAccess extends EntityMP implements Serializable {
@TableField(value = "agent_id") @TableField(value = "agent_id")
@JSONField(name = "agent_id") @JSONField(name = "agent_id")
@JsonProperty("agent_id") @JsonProperty("agent_id")
@ApiModelProperty("AGENT_ID")
private Long agentId; private Long agentId;
......
...@@ -24,6 +24,8 @@ import java.io.Serializable; ...@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*; import lombok.*;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit; import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
...@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZMSGTEMPL", resultMap = "MsgTemplateResultMap") @TableName(value = "IBZMSGTEMPL", resultMap = "MsgTemplateResultMap")
@ApiModel("消息模板")
public class MsgTemplate extends EntityMP implements Serializable { public class MsgTemplate extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -50,6 +53,7 @@ public class MsgTemplate extends EntityMP implements Serializable { ...@@ -50,6 +53,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableId(value = "tid", type = IdType.ASSIGN_UUID) @TableId(value = "tid", type = IdType.ASSIGN_UUID)
@JSONField(name = "tid") @JSONField(name = "tid")
@JsonProperty("tid") @JsonProperty("tid")
@ApiModelProperty("模板标识")
private String tid; private String tid;
/** /**
* 模板标题 * 模板标题
...@@ -58,6 +62,7 @@ public class MsgTemplate extends EntityMP implements Serializable { ...@@ -58,6 +62,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField(value = "template_name") @TableField(value = "template_name")
@JSONField(name = "template_name") @JSONField(name = "template_name")
@JsonProperty("template_name") @JsonProperty("template_name")
@ApiModelProperty("模板标题")
private String templateName; private String templateName;
/** /**
* 模板类型 * 模板类型
...@@ -66,6 +71,7 @@ public class MsgTemplate extends EntityMP implements Serializable { ...@@ -66,6 +71,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField(value = "template_type") @TableField(value = "template_type")
@JSONField(name = "template_type") @JSONField(name = "template_type")
@JsonProperty("template_type") @JsonProperty("template_type")
@ApiModelProperty("模板类型")
private String templateType; private String templateType;
/** /**
* 模板内容 * 模板内容
...@@ -73,6 +79,7 @@ public class MsgTemplate extends EntityMP implements Serializable { ...@@ -73,6 +79,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField(value = "content") @TableField(value = "content")
@JSONField(name = "content") @JSONField(name = "content")
@JsonProperty("content") @JsonProperty("content")
@ApiModelProperty("模板内容")
private String content; private String content;
/** /**
* 模板标识 * 模板标识
...@@ -81,6 +88,7 @@ public class MsgTemplate extends EntityMP implements Serializable { ...@@ -81,6 +88,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField(value = "template_id") @TableField(value = "template_id")
@JSONField(name = "template_id") @JSONField(name = "template_id")
@JsonProperty("template_id") @JsonProperty("template_id")
@ApiModelProperty("模板标识")
private String templateId; private String templateId;
/** /**
* URL * URL
...@@ -89,6 +97,7 @@ public class MsgTemplate extends EntityMP implements Serializable { ...@@ -89,6 +97,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField(value = "template_url") @TableField(value = "template_url")
@JSONField(name = "template_url") @JSONField(name = "template_url")
@JsonProperty("template_url") @JsonProperty("template_url")
@ApiModelProperty("URL")
private String templateUrl; private String templateUrl;
/** /**
* 开放平台接入标识 * 开放平台接入标识
...@@ -96,6 +105,7 @@ public class MsgTemplate extends EntityMP implements Serializable { ...@@ -96,6 +105,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField(value = "accessid") @TableField(value = "accessid")
@JSONField(name = "access_id") @JSONField(name = "access_id")
@JsonProperty("access_id") @JsonProperty("access_id")
@ApiModelProperty("开放平台接入标识")
private String accessId; private String accessId;
/** /**
* 接入平台 * 接入平台
...@@ -103,6 +113,7 @@ public class MsgTemplate extends EntityMP implements Serializable { ...@@ -103,6 +113,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField(value = "accessname") @TableField(value = "accessname")
@JSONField(name = "access_name") @JSONField(name = "access_name")
@JsonProperty("access_name") @JsonProperty("access_name")
@ApiModelProperty("接入平台")
private String accessName; private String accessName;
/** /**
* 接入平台类型 * 接入平台类型
...@@ -111,6 +122,7 @@ public class MsgTemplate extends EntityMP implements Serializable { ...@@ -111,6 +122,7 @@ public class MsgTemplate extends EntityMP implements Serializable {
@TableField(value = "open_type") @TableField(value = "open_type")
@JSONField(name = "open_type") @JSONField(name = "open_type")
@JsonProperty("open_type") @JsonProperty("open_type")
@ApiModelProperty("接入平台类型")
private String openType; private String openType;
/** /**
......
...@@ -24,6 +24,8 @@ import java.io.Serializable; ...@@ -24,6 +24,8 @@ import java.io.Serializable;
import lombok.*; import lombok.*;
import org.springframework.data.annotation.Transient; import org.springframework.data.annotation.Transient;
import cn.ibizlab.util.annotation.Audit; import cn.ibizlab.util.annotation.Audit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
...@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; ...@@ -39,6 +41,7 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
@NoArgsConstructor @NoArgsConstructor
@JsonIgnoreProperties(value = "handler") @JsonIgnoreProperties(value = "handler")
@TableName(value = "IBZUSERAUTH", resultMap = "MsgUserAccountResultMap") @TableName(value = "IBZUSERAUTH", resultMap = "MsgUserAccountResultMap")
@ApiModel("绑定消息账号")
public class MsgUserAccount extends EntityMP implements Serializable { public class MsgUserAccount extends EntityMP implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -50,6 +53,7 @@ public class MsgUserAccount extends EntityMP implements Serializable { ...@@ -50,6 +53,7 @@ public class MsgUserAccount extends EntityMP implements Serializable {
@TableId(value = "authid", type = IdType.ASSIGN_UUID) @TableId(value = "authid", type = IdType.ASSIGN_UUID)
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
@ApiModelProperty("标识")
private String id; private String id;
/** /**
* 用户标识 * 用户标识
...@@ -57,6 +61,7 @@ public class MsgUserAccount extends EntityMP implements Serializable { ...@@ -57,6 +61,7 @@ public class MsgUserAccount extends EntityMP implements Serializable {
@TableField(value = "userid") @TableField(value = "userid")
@JSONField(name = "userid") @JSONField(name = "userid")
@JsonProperty("userid") @JsonProperty("userid")
@ApiModelProperty("用户标识")
private String userid; private String userid;
/** /**
* 认证类型 * 认证类型
...@@ -65,6 +70,7 @@ public class MsgUserAccount extends EntityMP implements Serializable { ...@@ -65,6 +70,7 @@ public class MsgUserAccount extends EntityMP implements Serializable {
@TableField(value = "identity_type") @TableField(value = "identity_type")
@JSONField(name = "identity_type") @JSONField(name = "identity_type")
@JsonProperty("identity_type") @JsonProperty("identity_type")
@ApiModelProperty("认证类型")
private String identityType; private String identityType;
/** /**
* 认证标识 * 认证标识
...@@ -72,6 +78,7 @@ public class MsgUserAccount extends EntityMP implements Serializable { ...@@ -72,6 +78,7 @@ public class MsgUserAccount extends EntityMP implements Serializable {
@TableField(value = "identifier") @TableField(value = "identifier")
@JSONField(name = "identifier") @JSONField(name = "identifier")
@JsonProperty("identifier") @JsonProperty("identifier")
@ApiModelProperty("认证标识")
private String identifier; private String identifier;
/** /**
* 凭据 * 凭据
...@@ -79,6 +86,7 @@ public class MsgUserAccount extends EntityMP implements Serializable { ...@@ -79,6 +86,7 @@ public class MsgUserAccount extends EntityMP implements Serializable {
@TableField(value = "credential") @TableField(value = "credential")
@JSONField(name = "credential") @JSONField(name = "credential")
@JsonProperty("credential") @JsonProperty("credential")
@ApiModelProperty("凭据")
private String credential; private String credential;
......
...@@ -20,11 +20,14 @@ import javax.validation.constraints.Size; ...@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase; import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient; import cn.ibizlab.util.domain.DTOClient;
import lombok.Data; import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/** /**
* 服务DTO对象[MsgBodyDTO] * 服务DTO对象[MsgBodyDTO]
*/ */
@Data @Data
@ApiModel("消息")
public class MsgBodyDTO extends DTOBase implements Serializable { public class MsgBodyDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -35,6 +38,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -35,6 +38,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
*/ */
@JSONField(name = "is_error") @JSONField(name = "is_error")
@JsonProperty("is_error") @JsonProperty("is_error")
@ApiModelProperty("是否出错")
private Integer isError; private Integer isError;
/** /**
...@@ -43,6 +47,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -43,6 +47,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
*/ */
@JSONField(name = "is_send") @JSONField(name = "is_send")
@JsonProperty("is_send") @JsonProperty("is_send")
@ApiModelProperty("是否发送")
private Integer isSend; private Integer isSend;
/** /**
...@@ -52,6 +57,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -52,6 +57,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField(name = "msg_id") @JSONField(name = "msg_id")
@JsonProperty("msg_id") @JsonProperty("msg_id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("消息标识")
private String msgId; private String msgId;
/** /**
...@@ -61,6 +67,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -61,6 +67,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField(name = "to_users") @JSONField(name = "to_users")
@JsonProperty("to_users") @JsonProperty("to_users")
@Size(min = 0, max = 1000, message = "内容长度必须小于等于[1000]") @Size(min = 0, max = 1000, message = "内容长度必须小于等于[1000]")
@ApiModelProperty("目标用户")
private String toUsers; private String toUsers;
/** /**
...@@ -70,6 +77,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -70,6 +77,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField(name = "msg_link") @JSONField(name = "msg_link")
@JsonProperty("msg_link") @JsonProperty("msg_link")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("消息链接")
private String msgLink; private String msgLink;
/** /**
...@@ -79,6 +87,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -79,6 +87,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField(name = "subject") @JSONField(name = "subject")
@JsonProperty("subject") @JsonProperty("subject")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("消息标题")
private String subject; private String subject;
/** /**
...@@ -88,6 +97,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -88,6 +97,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField(name = "content") @JSONField(name = "content")
@JsonProperty("content") @JsonProperty("content")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("消息内容")
private String content; private String content;
/** /**
...@@ -96,6 +106,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -96,6 +106,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
*/ */
@JSONField(name = "msg_type") @JSONField(name = "msg_type")
@JsonProperty("msg_type") @JsonProperty("msg_type")
@ApiModelProperty("消息类型")
private Integer msgType; private Integer msgType;
/** /**
...@@ -105,6 +116,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -105,6 +116,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField(name = "msg_name") @JSONField(name = "msg_name")
@JsonProperty("msg_name") @JsonProperty("msg_name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("消息名称")
private String msgName; private String msgName;
/** /**
...@@ -114,6 +126,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -114,6 +126,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField(name = "template_id") @JSONField(name = "template_id")
@JsonProperty("template_id") @JsonProperty("template_id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("消息模板标识")
private String templateId; private String templateId;
/** /**
...@@ -123,6 +136,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -123,6 +136,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField(name = "error_info") @JSONField(name = "error_info")
@JsonProperty("error_info") @JsonProperty("error_info")
@Size(min = 0, max = 1048576, message = "内容长度必须小于等于[1048576]") @Size(min = 0, max = 1048576, message = "内容长度必须小于等于[1048576]")
@ApiModelProperty("错误信息")
private String errorInfo; private String errorInfo;
/** /**
...@@ -132,6 +146,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -132,6 +146,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField(name = "user_data") @JSONField(name = "user_data")
@JsonProperty("user_data") @JsonProperty("user_data")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("用户数据")
private String userData; private String userData;
/** /**
...@@ -141,6 +156,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -141,6 +156,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField(name = "template_params") @JSONField(name = "template_params")
@JsonProperty("template_params") @JsonProperty("template_params")
@Size(min = 0, max = 1048576, message = "内容长度必须小于等于[1048576]") @Size(min = 0, max = 1048576, message = "内容长度必须小于等于[1048576]")
@ApiModelProperty("消息模板参数")
private String templateParams; private String templateParams;
/** /**
...@@ -150,6 +166,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -150,6 +166,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField(name = "user_data2") @JSONField(name = "user_data2")
@JsonProperty("user_data2") @JsonProperty("user_data2")
@Size(min = 0, max = 2000, message = "内容长度必须小于等于[2000]") @Size(min = 0, max = 2000, message = "内容长度必须小于等于[2000]")
@ApiModelProperty("用户数据2")
private String userData2; private String userData2;
/** /**
...@@ -159,6 +176,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable { ...@@ -159,6 +176,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
@JSONField(name = "msg_link_pc") @JSONField(name = "msg_link_pc")
@JsonProperty("msg_link_pc") @JsonProperty("msg_link_pc")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("消息链接(PC)")
private String msgLinkPc; private String msgLinkPc;
......
...@@ -20,11 +20,14 @@ import javax.validation.constraints.Size; ...@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase; import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient; import cn.ibizlab.util.domain.DTOClient;
import lombok.Data; import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/** /**
* 服务DTO对象[MsgOpenAccessDTO] * 服务DTO对象[MsgOpenAccessDTO]
*/ */
@Data @Data
@ApiModel("接入开放平台")
public class MsgOpenAccessDTO extends DTOBase implements Serializable { public class MsgOpenAccessDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -36,6 +39,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable { ...@@ -36,6 +39,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("开放平台接入标识")
private String id; private String id;
/** /**
...@@ -45,6 +49,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable { ...@@ -45,6 +49,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField(name = "name") @JSONField(name = "name")
@JsonProperty("name") @JsonProperty("name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("开放平台")
private String name; private String name;
/** /**
...@@ -54,6 +59,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable { ...@@ -54,6 +59,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField(name = "open_type") @JSONField(name = "open_type")
@JsonProperty("open_type") @JsonProperty("open_type")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("开放平台类型")
private String openType; private String openType;
/** /**
...@@ -63,6 +69,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable { ...@@ -63,6 +69,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField(name = "access_key") @JSONField(name = "access_key")
@JsonProperty("access_key") @JsonProperty("access_key")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("AccessKey(AppId)")
private String accessKey; private String accessKey;
/** /**
...@@ -72,6 +79,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable { ...@@ -72,6 +79,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField(name = "secret_key") @JSONField(name = "secret_key")
@JsonProperty("secret_key") @JsonProperty("secret_key")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("SecretKey(AppSecret)")
private String secretKey; private String secretKey;
/** /**
...@@ -81,6 +89,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable { ...@@ -81,6 +89,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField(name = "region_id") @JSONField(name = "region_id")
@JsonProperty("region_id") @JsonProperty("region_id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("RegionId(CorpId)")
private String regionId; private String regionId;
/** /**
...@@ -90,6 +99,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable { ...@@ -90,6 +99,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField(name = "access_token") @JSONField(name = "access_token")
@JsonProperty("access_token") @JsonProperty("access_token")
@Size(min = 0, max = 1000, message = "内容长度必须小于等于[1000]") @Size(min = 0, max = 1000, message = "内容长度必须小于等于[1000]")
@ApiModelProperty("管理账号token")
private String accessToken; private String accessToken;
/** /**
...@@ -99,6 +109,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable { ...@@ -99,6 +109,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "expires_time" , format="yyyy-MM-dd HH:mm:ss") @JSONField(name = "expires_time" , format="yyyy-MM-dd HH:mm:ss")
@JsonProperty("expires_time") @JsonProperty("expires_time")
@ApiModelProperty("管理账号token过期时间")
private Timestamp expiresTime; private Timestamp expiresTime;
/** /**
...@@ -107,6 +118,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable { ...@@ -107,6 +118,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
*/ */
@JSONField(name = "disabled") @JSONField(name = "disabled")
@JsonProperty("disabled") @JsonProperty("disabled")
@ApiModelProperty("是否禁用")
private Integer disabled; private Integer disabled;
/** /**
...@@ -116,6 +128,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable { ...@@ -116,6 +128,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField(name = "redirect_uri") @JSONField(name = "redirect_uri")
@JsonProperty("redirect_uri") @JsonProperty("redirect_uri")
@Size(min = 0, max = 500, message = "内容长度必须小于等于[500]") @Size(min = 0, max = 500, message = "内容长度必须小于等于[500]")
@ApiModelProperty("RedirectURI")
private String redirectUri; private String redirectUri;
/** /**
...@@ -125,6 +138,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable { ...@@ -125,6 +138,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField(name = "notify_url") @JSONField(name = "notify_url")
@JsonProperty("notify_url") @JsonProperty("notify_url")
@Size(min = 0, max = 500, message = "内容长度必须小于等于[500]") @Size(min = 0, max = 500, message = "内容长度必须小于等于[500]")
@ApiModelProperty("NotifyUrl")
private String notifyUrl; private String notifyUrl;
/** /**
...@@ -134,6 +148,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable { ...@@ -134,6 +148,7 @@ public class MsgOpenAccessDTO extends DTOBase implements Serializable {
@JSONField(name = "agent_id") @JSONField(name = "agent_id")
@JsonProperty("agent_id") @JsonProperty("agent_id")
@JsonSerialize(using = ToStringSerializer.class) @JsonSerialize(using = ToStringSerializer.class)
@ApiModelProperty("AGENT_ID")
private Long agentId; private Long agentId;
......
...@@ -20,11 +20,14 @@ import javax.validation.constraints.Size; ...@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase; import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient; import cn.ibizlab.util.domain.DTOClient;
import lombok.Data; import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/** /**
* 服务DTO对象[MsgTemplateDTO] * 服务DTO对象[MsgTemplateDTO]
*/ */
@Data @Data
@ApiModel("消息模板")
public class MsgTemplateDTO extends DTOBase implements Serializable { public class MsgTemplateDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -36,6 +39,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable { ...@@ -36,6 +39,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField(name = "tid") @JSONField(name = "tid")
@JsonProperty("tid") @JsonProperty("tid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("模板标识")
private String tid; private String tid;
/** /**
...@@ -45,6 +49,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable { ...@@ -45,6 +49,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField(name = "template_name") @JSONField(name = "template_name")
@JsonProperty("template_name") @JsonProperty("template_name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("模板标题")
private String templateName; private String templateName;
/** /**
...@@ -54,6 +59,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable { ...@@ -54,6 +59,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField(name = "template_type") @JSONField(name = "template_type")
@JsonProperty("template_type") @JsonProperty("template_type")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("模板类型")
private String templateType; private String templateType;
/** /**
...@@ -63,6 +69,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable { ...@@ -63,6 +69,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField(name = "content") @JSONField(name = "content")
@JsonProperty("content") @JsonProperty("content")
@Size(min = 0, max = 4000, message = "内容长度必须小于等于[4000]") @Size(min = 0, max = 4000, message = "内容长度必须小于等于[4000]")
@ApiModelProperty("模板内容")
private String content; private String content;
/** /**
...@@ -72,6 +79,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable { ...@@ -72,6 +79,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField(name = "template_id") @JSONField(name = "template_id")
@JsonProperty("template_id") @JsonProperty("template_id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("模板标识")
private String templateId; private String templateId;
/** /**
...@@ -81,6 +89,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable { ...@@ -81,6 +89,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField(name = "template_url") @JSONField(name = "template_url")
@JsonProperty("template_url") @JsonProperty("template_url")
@Size(min = 0, max = 1000, message = "内容长度必须小于等于[1000]") @Size(min = 0, max = 1000, message = "内容长度必须小于等于[1000]")
@ApiModelProperty("URL")
private String templateUrl; private String templateUrl;
/** /**
...@@ -90,6 +99,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable { ...@@ -90,6 +99,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField(name = "access_id") @JSONField(name = "access_id")
@JsonProperty("access_id") @JsonProperty("access_id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("开放平台接入标识")
private String accessId; private String accessId;
/** /**
...@@ -99,6 +109,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable { ...@@ -99,6 +109,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField(name = "access_name") @JSONField(name = "access_name")
@JsonProperty("access_name") @JsonProperty("access_name")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("接入平台")
private String accessName; private String accessName;
/** /**
...@@ -108,6 +119,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable { ...@@ -108,6 +119,7 @@ public class MsgTemplateDTO extends DTOBase implements Serializable {
@JSONField(name = "open_type") @JSONField(name = "open_type")
@JsonProperty("open_type") @JsonProperty("open_type")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("接入平台类型")
private String openType; private String openType;
......
...@@ -20,11 +20,14 @@ import javax.validation.constraints.Size; ...@@ -20,11 +20,14 @@ import javax.validation.constraints.Size;
import cn.ibizlab.util.domain.DTOBase; import cn.ibizlab.util.domain.DTOBase;
import cn.ibizlab.util.domain.DTOClient; import cn.ibizlab.util.domain.DTOClient;
import lombok.Data; import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/** /**
* 服务DTO对象[MsgUserAccountDTO] * 服务DTO对象[MsgUserAccountDTO]
*/ */
@Data @Data
@ApiModel("绑定消息账号")
public class MsgUserAccountDTO extends DTOBase implements Serializable { public class MsgUserAccountDTO extends DTOBase implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -36,6 +39,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable { ...@@ -36,6 +39,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable {
@JSONField(name = "id") @JSONField(name = "id")
@JsonProperty("id") @JsonProperty("id")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("标识")
private String id; private String id;
/** /**
...@@ -45,6 +49,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable { ...@@ -45,6 +49,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable {
@JSONField(name = "userid") @JSONField(name = "userid")
@JsonProperty("userid") @JsonProperty("userid")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("用户标识")
private String userid; private String userid;
/** /**
...@@ -54,6 +59,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable { ...@@ -54,6 +59,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable {
@JSONField(name = "identity_type") @JSONField(name = "identity_type")
@JsonProperty("identity_type") @JsonProperty("identity_type")
@Size(min = 0, max = 100, message = "内容长度必须小于等于[100]") @Size(min = 0, max = 100, message = "内容长度必须小于等于[100]")
@ApiModelProperty("认证类型")
private String identityType; private String identityType;
/** /**
...@@ -63,6 +69,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable { ...@@ -63,6 +69,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable {
@JSONField(name = "identifier") @JSONField(name = "identifier")
@JsonProperty("identifier") @JsonProperty("identifier")
@Size(min = 0, max = 200, message = "内容长度必须小于等于[200]") @Size(min = 0, max = 200, message = "内容长度必须小于等于[200]")
@ApiModelProperty("认证标识")
private String identifier; private String identifier;
/** /**
...@@ -72,6 +79,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable { ...@@ -72,6 +79,7 @@ public class MsgUserAccountDTO extends DTOBase implements Serializable {
@JSONField(name = "credential") @JSONField(name = "credential")
@JsonProperty("credential") @JsonProperty("credential")
@Size(min = 0, max = 500, message = "内容长度必须小于等于[500]") @Size(min = 0, max = 500, message = "内容长度必须小于等于[500]")
@ApiModelProperty("凭据")
private String credential; private String credential;
......
...@@ -27,6 +27,16 @@ import java.util.Map; ...@@ -27,6 +27,16 @@ import java.util.Map;
@Component @Component
public class DEFieldDefaultValueAspect public class DEFieldDefaultValueAspect
{ {
/**
* 操作用户标识
*/
final static String TAG_PERSONID = "SRF_PERSONID";
/**
* 操作用户名称
*/
final static String TAG_PERSONNAME = "SRF_PERSONNAME";
/** /**
* 新建数据切入点 * 新建数据切入点
* @param point * @param point
...@@ -221,16 +231,16 @@ public class DEFieldDefaultValueAspect ...@@ -221,16 +231,16 @@ public class DEFieldDefaultValueAspect
switch(preFieldType) { switch(preFieldType) {
case CREATEMAN: case CREATEMAN:
et.set(fieldname, curUser.getUserid()); et.set(fieldname, StringUtils.isEmpty(curUser.getUserid()) ? et.get(TAG_PERSONID) : curUser.getUserid());
break; break;
case CREATEMANNAME: case CREATEMANNAME:
et.set(fieldname, curUser.getPersonname()); et.set(fieldname, StringUtils.isEmpty(curUser.getPersonname()) ? et.get(TAG_PERSONNAME) : curUser.getPersonname());
break; break;
case UPDATEMAN: case UPDATEMAN:
et.set(fieldname, curUser.getUserid()); et.set(fieldname, StringUtils.isEmpty(curUser.getUserid()) ? et.get(TAG_PERSONID) : curUser.getUserid());
break; break;
case UPDATEMANNAME: case UPDATEMANNAME:
et.set(fieldname, curUser.getPersonname()); et.set(fieldname, StringUtils.isEmpty(curUser.getPersonname()) ? et.get(TAG_PERSONNAME) : curUser.getPersonname());
break; break;
case CREATEDATE: case CREATEDATE:
et.set(fieldname, new Timestamp(new Date().getTime())); et.set(fieldname, new Timestamp(new Date().getTime()));
......
...@@ -2,6 +2,7 @@ package cn.ibizlab.util.client; ...@@ -2,6 +2,7 @@ package cn.ibizlab.util.client;
import cn.ibizlab.util.security.AuthenticationUser; import cn.ibizlab.util.security.AuthenticationUser;
import cn.ibizlab.util.security.AuthorizationLogin; import cn.ibizlab.util.security.AuthorizationLogin;
import org.springframework.util.MultiValueMap;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
......
...@@ -5,6 +5,7 @@ import cn.ibizlab.util.security.AuthorizationLogin; ...@@ -5,6 +5,7 @@ import cn.ibizlab.util.security.AuthorizationLogin;
import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Cacheable;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.util.MultiValueMap;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@FeignClient(value = "${ibiz.ref.service.uaa:ibzuaa-api}",contextId = "uaa",fallback = IBZUAAFallback.class) @FeignClient(value = "${ibiz.ref.service.uaa:ibzuaa-api}",contextId = "uaa",fallback = IBZUAAFallback.class)
......
...@@ -7,6 +7,7 @@ import lombok.Data; ...@@ -7,6 +7,7 @@ import lombok.Data;
import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import java.sql.Timestamp; import java.sql.Timestamp;
...@@ -231,6 +232,15 @@ public class AuthenticationUser implements UserDetails ...@@ -231,6 +232,15 @@ public class AuthenticationUser implements UserDetails
return authuserdetail; 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() public Map <String,Object> getSessionParams()
{ {
if(this.sessionParams==null) if(this.sessionParams==null)
......
...@@ -4,11 +4,17 @@ import feign.RequestInterceptor; ...@@ -4,11 +4,17 @@ import feign.RequestInterceptor;
import feign.RequestTemplate; import feign.RequestTemplate;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; 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.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.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.LinkedHashMap;
/** /**
* feign请求拦截器 * feign请求拦截器
...@@ -19,23 +25,23 @@ public class FeignRequestInterceptor implements RequestInterceptor { ...@@ -19,23 +25,23 @@ public class FeignRequestInterceptor implements RequestInterceptor {
private final Logger logger = LoggerFactory.getLogger(getClass()); private final Logger logger = LoggerFactory.getLogger(getClass());
@Override @Override
public void apply(RequestTemplate requestTemplate) { public void apply(RequestTemplate requestTemplate) {
ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
if(requestAttributes!=null){ if (requestAttributes != null) {
HttpServletRequest request = requestAttributes.getRequest(); HttpServletRequest request = requestAttributes.getRequest();
Enumeration<String> headerNames = request.getHeaderNames(); Enumeration<String> headerNames = request.getHeaderNames();
if (headerNames != null) { if (headerNames != null) {
while (headerNames.hasMoreElements()) { while (headerNames.hasMoreElements()) {
String name = headerNames.nextElement(); String name = headerNames.nextElement();
if(name.equalsIgnoreCase("transfer-encoding")){ if (name.equalsIgnoreCase("transfer-encoding")) {
continue; continue;
} }
String values = request.getHeader(name); String values = request.getHeader(name);
requestTemplate.header(name, values); requestTemplate.header(name, values);
} }
logger.info("feign interceptor header:{}",requestTemplate); logger.info("feign interceptor header:{}", requestTemplate);
} }
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册