REQ-3045: 添加一些基础类
This commit is contained in:
parent
97d25e45b0
commit
fdea50bc17
@ -0,0 +1,21 @@
|
||||
package cn.axzo.msg.center.service.enums;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public enum CardLinkStrategy {
|
||||
|
||||
NONE("无跳转"),
|
||||
OPEN_TODO_DETAIL("打开待办详情"),
|
||||
OPEN_CUSTOM_PAGE("打开指定页面")
|
||||
|
||||
;
|
||||
|
||||
private final String desc;
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package cn.axzo.msg.center.service.enums;
|
||||
|
||||
import lombok.AccessLevel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
||||
public enum GroupType {
|
||||
|
||||
KV_VALUES("卡片信息"),
|
||||
COMPONENT_WORKER("工人卡片")
|
||||
|
||||
;
|
||||
|
||||
private final String desc;
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package cn.axzo.msg.center.dal;
|
||||
|
||||
import cn.axzo.msg.center.dal.mapper.MessageTemplateButtonV3Mapper;
|
||||
import cn.axzo.msg.center.domain.entity.MessageTemplateButtonV3;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class MessageTemplateButtonV3Dao extends ServiceImpl<MessageTemplateButtonV3Mapper, MessageTemplateButtonV3> {
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package cn.axzo.msg.center.dal;
|
||||
|
||||
import cn.axzo.msg.center.dal.mapper.MessageTemplateGroupV3Mapper;
|
||||
import cn.axzo.msg.center.domain.entity.MessageTemplateGroupV3;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class MessageTemplateGroupV3Dao extends ServiceImpl<MessageTemplateGroupV3Mapper, MessageTemplateGroupV3> {
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package cn.axzo.msg.center.dal;
|
||||
|
||||
import cn.axzo.msg.center.dal.mapper.MessageTemplateV3Mapper;
|
||||
import cn.axzo.msg.center.domain.entity.MessageTemplateV3;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class MessageTemplateV3Dao extends ServiceImpl<MessageTemplateV3Mapper, MessageTemplateV3> {
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package cn.axzo.msg.center.dal.mapper;
|
||||
|
||||
import cn.axzo.msg.center.domain.entity.MessageTemplateButtonV3;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Mapper
|
||||
public interface MessageTemplateButtonV3Mapper extends BaseMapper<MessageTemplateButtonV3> {
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package cn.axzo.msg.center.dal.mapper;
|
||||
|
||||
import cn.axzo.msg.center.domain.entity.MessageTemplateGroupV3;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Mapper
|
||||
public interface MessageTemplateGroupV3Mapper extends BaseMapper<MessageTemplateGroupV3> {
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package cn.axzo.msg.center.dal.mapper;
|
||||
|
||||
import cn.axzo.msg.center.domain.entity.MessageTemplateV3;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Mapper
|
||||
public interface MessageTemplateV3Mapper extends BaseMapper<MessageTemplateV3> {
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package cn.axzo.msg.center.domain.entity;
|
||||
|
||||
import cn.axzo.msg.center.domain.persistence.BaseEntityExt;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
public abstract class BaseEntityWithOperator<T extends Model<T>> extends BaseEntityExt<T> {
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
private Long createPersonId;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createPersonName;
|
||||
|
||||
/**
|
||||
* 更新人id
|
||||
*/
|
||||
private Long updatePersonId;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
private String updatePersonName;
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package cn.axzo.msg.center.domain.entity;
|
||||
|
||||
import cn.axzo.msg.center.domain.entity.jsondomain.LinksConfig;
|
||||
import cn.axzo.msg.center.service.enums.PresetButtonType;
|
||||
import cn.axzo.msg.center.service.enums.RouterButtonSourceEnum;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@TableName(value = "message_template_button_v3", autoResultMap = true)
|
||||
public class MessageTemplateButtonV3 extends BaseEntityWithOperator<MessageTemplateButtonV3> {
|
||||
|
||||
/**
|
||||
* 按钮名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 模板code
|
||||
*/
|
||||
private String templateCode;
|
||||
|
||||
/**
|
||||
* 预设按钮类型
|
||||
*/
|
||||
private PresetButtonType presetBtnCode;
|
||||
|
||||
/**
|
||||
* 按钮来源
|
||||
*/
|
||||
private RouterButtonSourceEnum source;
|
||||
|
||||
/**
|
||||
* 按钮链接配置
|
||||
*/
|
||||
private LinksConfig linkConfig;
|
||||
|
||||
/**
|
||||
* 按钮style配置
|
||||
*/
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private JSONArray style;
|
||||
|
||||
/**
|
||||
* 执行人可见:true 不可见:false
|
||||
*/
|
||||
private Boolean executorShow;
|
||||
|
||||
/**
|
||||
* 待办状态可见可见:true 不可见:false
|
||||
*/
|
||||
private Boolean pendingShow;
|
||||
|
||||
/**
|
||||
* 按钮优先级,数值越大优先级越低
|
||||
*/
|
||||
private Integer priority;
|
||||
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package cn.axzo.msg.center.domain.entity;
|
||||
|
||||
import cn.axzo.msg.center.domain.entity.jsondomain.GroupConfig;
|
||||
import cn.axzo.msg.center.service.enums.GroupType;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@TableName(value = "message_template_group_v3", autoResultMap = true)
|
||||
public class MessageTemplateGroupV3 extends BaseEntityWithOperator<MessageTemplateGroupV3> {
|
||||
|
||||
/**
|
||||
* 分组名称, 公共组件时为空
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 模板code
|
||||
*/
|
||||
private String templateCode;
|
||||
|
||||
/**
|
||||
* 分组类型. KV_VALUES: 卡片信息; COMPONENT_WORKER:工人卡片
|
||||
*/
|
||||
private GroupType groupType;
|
||||
|
||||
/**
|
||||
* 排列顺序
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 分组配置
|
||||
*/
|
||||
private GroupConfig groupConfig;
|
||||
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package cn.axzo.msg.center.domain.entity;
|
||||
|
||||
import cn.axzo.msg.center.domain.entity.jsondomain.CardLinkConfig;
|
||||
import cn.axzo.msg.center.domain.entity.jsondomain.LinksConfig;
|
||||
import cn.axzo.msg.center.service.enums.CardLinkStrategy;
|
||||
import cn.axzo.msg.center.service.enums.MessageCategoryEnum;
|
||||
import cn.axzo.msg.center.service.enums.StatusEnum;
|
||||
import cn.axzo.msg.center.service.enums.YesOrNo;
|
||||
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.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@TableName(value = "message_template_v3", autoResultMap = true)
|
||||
public class MessageTemplateV3 extends BaseEntityWithOperator<MessageTemplateV3> {
|
||||
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 系统自动生成的模板code
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 所属消息类型
|
||||
*/
|
||||
private MessageCategoryEnum msgCategory;
|
||||
|
||||
/**
|
||||
* 模板标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 模板类容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 消息详情样式. BIZ_COMMON: 业务待办能用, FLOW_COMMON: 审批待办能用, 其它动态配置的
|
||||
*/
|
||||
private String detailStyleCode;
|
||||
|
||||
/**
|
||||
* 模板icon
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* APP最小版本支持,可不配
|
||||
*/
|
||||
private String minAppVersion;
|
||||
|
||||
/**
|
||||
* 模板状态
|
||||
*/
|
||||
private StatusEnum status;
|
||||
|
||||
/**
|
||||
* 推送终端配置 JSON字串
|
||||
*/
|
||||
private String pushTerminal;
|
||||
|
||||
/**
|
||||
* 卡片跳转方式. NONE: 无跳转, OPEN_TODO_DETAIL: 打开待办详情, OPEN_CUSTOM_PAGE: 打开指定页面
|
||||
*/
|
||||
private CardLinkStrategy cardLinkStrategy;
|
||||
|
||||
/**
|
||||
* 卡片跳转配置. 在links的基础上再包一层, 避免以后卡片增加自己的配置
|
||||
*/
|
||||
private CardLinkConfig cardLinkConfig;
|
||||
|
||||
/**
|
||||
* IM发送优先级
|
||||
*/
|
||||
private Integer imSendPriority;
|
||||
|
||||
/**
|
||||
* push配置
|
||||
*/
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private JSONObject pushData;
|
||||
|
||||
/**
|
||||
* 是否显示在列表中. YES: 是, NO: 否
|
||||
*/
|
||||
private YesOrNo displayOnList;
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
package cn.axzo.msg.center.domain.entity.jsondomain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class CardLinkConfig {
|
||||
|
||||
/**
|
||||
* 链接配置
|
||||
*/
|
||||
private LinksConfig linksConfig;
|
||||
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package cn.axzo.msg.center.domain.entity.jsondomain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class GroupConfig {
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
package cn.axzo.msg.center.domain.entity.jsondomain;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class LinksConfig {
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user