feat(REQ-1507): 消息路由数据模型的重构
背景: https://jira.axzo.cn/browse/REQ-1507?goToView=1 修改: 1、消息路由数据模型的重构 影响: 无
This commit is contained in:
parent
89f9864c07
commit
4810bbf1b9
@ -14,7 +14,7 @@ import java.util.Map;
|
||||
* @date 2023/9/28
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface MessageTemplateRouterService {
|
||||
public interface MessageTemplateRouterService {//TODO:[cold_blade] P0路由模型改版
|
||||
|
||||
/**
|
||||
* 根据消息模板编码查询配置的路由列表
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
package cn.axzo.msg.center.dal;
|
||||
|
||||
import cn.axzo.msg.center.dal.mapper.MessageRouteButtonMapper;
|
||||
import cn.axzo.msg.center.domain.entity.MessageRouteButton;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @author cold_blade
|
||||
* @date 2023/9/28
|
||||
* @version 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class MessageRouteButtonDao extends ServiceImpl<MessageRouteButtonMapper, MessageRouteButton> {
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package cn.axzo.msg.center.dal;
|
||||
|
||||
import cn.axzo.msg.center.dal.mapper.MessageRouterConfigMapper;
|
||||
import cn.axzo.msg.center.domain.entity.MessageRouterConfig;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* @author cold_blade
|
||||
* @date 2023/9/28
|
||||
* @version 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class MessageRouterConfigDao extends ServiceImpl<MessageRouterConfigMapper, MessageRouterConfig> {
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package cn.axzo.msg.center.dal.mapper;
|
||||
|
||||
import cn.axzo.msg.center.domain.entity.GeneralMessageRecord;
|
||||
import cn.axzo.msg.center.domain.entity.MessageRouteButton;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* 消息路由按钮表Mapper
|
||||
* @author cold_blade
|
||||
* @date 2023/9/20
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface MessageRouteButtonMapper extends BaseMapper<MessageRouteButton> {
|
||||
}
|
||||
@ -0,0 +1,14 @@
|
||||
package cn.axzo.msg.center.dal.mapper;
|
||||
|
||||
import cn.axzo.msg.center.domain.entity.MessageRouterConfig;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* 消息路由配置表Mapper
|
||||
* @author cold_blade
|
||||
* @date 2023/9/20
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface MessageRouterConfigMapper extends BaseMapper<MessageRouterConfig> {
|
||||
}
|
||||
@ -0,0 +1,65 @@
|
||||
package cn.axzo.msg.center.domain.entity;
|
||||
|
||||
import cn.axzo.msg.center.domain.persistence.BaseEntityExt;
|
||||
import cn.axzo.msg.center.service.enums.MessageCategoryEnum;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 消息路由配置
|
||||
*
|
||||
* @author cold_blade
|
||||
* @date 2023/11/7
|
||||
* @version 1.0
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("message_route_button")
|
||||
public class MessageRouteButton extends BaseEntityExt<MessageRouteButton> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 2815163121368837804L;
|
||||
|
||||
/**
|
||||
* 按钮名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 按钮唯一标识
|
||||
*/
|
||||
private String btnCode;
|
||||
/**
|
||||
* 模板code
|
||||
*/
|
||||
private String templateCode;
|
||||
/**
|
||||
* 路由类型
|
||||
*/
|
||||
private MessageCategoryEnum category;
|
||||
/**
|
||||
* API地址,仅当按钮是接口调用类型时有值
|
||||
*/
|
||||
private String apiUrl;
|
||||
/**
|
||||
* 按钮style配置
|
||||
*/
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private JSONObject style;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return JSON.toJSONString(this);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,49 @@
|
||||
package cn.axzo.msg.center.domain.entity;
|
||||
|
||||
import cn.axzo.msg.center.domain.persistence.BaseEntityExt;
|
||||
import cn.axzo.msg.center.service.enums.TerminalTypeEnum;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 消息路由配置
|
||||
*
|
||||
* @author cold_blade
|
||||
* @date 2023/11/7
|
||||
* @version 1.0
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("message_router_config")
|
||||
public class MessageRouterConfig extends BaseEntityExt<MessageRouterConfig> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 2472826034240755399L;
|
||||
|
||||
/**
|
||||
* 路由编码
|
||||
*/
|
||||
private String routerCode;
|
||||
/**
|
||||
* 路由的系统类型
|
||||
*/
|
||||
private TerminalTypeEnum terminalType;
|
||||
/**
|
||||
* 路由地址
|
||||
*/
|
||||
private String url;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return JSON.toJSONString(this);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user