REQ-3201: 添加entity
This commit is contained in:
parent
ec17d1384e
commit
4c086930c3
@ -0,0 +1,26 @@
|
||||
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 CardElementType implements CodeDefinition<String> {
|
||||
|
||||
TEXT("文本"),
|
||||
ICON("图标"),
|
||||
IMAGE("图片"),
|
||||
;
|
||||
|
||||
private final String description;
|
||||
|
||||
@Override
|
||||
public String getCode() {
|
||||
return name();
|
||||
}
|
||||
|
||||
}
|
||||
@ -14,7 +14,8 @@ import lombok.Getter;
|
||||
public enum PresetButtonType implements CodeDefinition<String> {
|
||||
|
||||
AGREE("同意"),
|
||||
REJECT("驳回");
|
||||
REJECT("驳回"),
|
||||
REVOKE("撤销"),;
|
||||
|
||||
private final String desc;
|
||||
|
||||
|
||||
@ -0,0 +1,30 @@
|
||||
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 StateImageType implements CodeDefinition<String> {
|
||||
|
||||
PENDING("待处理", ""),
|
||||
AGREED("已同意", "https://static.axzo.cn/fe-static/uni-icon/public/seal-4%23_%241699341908374.png"),
|
||||
REJECTED("已拒绝", "https://static.axzo.cn/fe-static/uni-icon/public/seal-2%23_%241699341908381.png"),
|
||||
REVOKED("已撤销", "https://static.axzo.cn/fe-static/uni-icon/native/%E5%8E%9F%E7%A8%BF%23_%241711338477975.png"),
|
||||
ABORTED("已中止", "https://axzo-public.oss-cn-chengdu.aliyuncs.com/%E5%8D%B0%E7%AB%A0-%E8%AF%A6%E6%83%85end.png"),
|
||||
COMPLETED("已处理", "https://static.axzo.cn/fe-static/uni-icon/public/seal-1%23_%241699341908382.png"),
|
||||
END("已完结", ""),
|
||||
;
|
||||
|
||||
private final String description;
|
||||
private final String defaultImageUrl;
|
||||
|
||||
@Override
|
||||
public String getCode() {
|
||||
return name();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package cn.axzo.msg.center.dal;
|
||||
|
||||
import cn.axzo.msg.center.dal.mapper.CardStyleMapper;
|
||||
import cn.axzo.msg.center.domain.entity.CardStyle;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class CardStyleDao extends ServiceImpl<CardStyleMapper, CardStyle> {
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
package cn.axzo.msg.center.dal.mapper;
|
||||
|
||||
import cn.axzo.msg.center.domain.entity.CardStyle;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
public interface CardStyleMapper extends BaseMapper<CardStyle> {
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package cn.axzo.msg.center.domain.entity;
|
||||
|
||||
import cn.axzo.msg.center.service.enums.PushTerminalEnum;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class AppVersionConfig {
|
||||
|
||||
/**
|
||||
* 端类型
|
||||
*/
|
||||
private PushTerminalEnum appType;
|
||||
|
||||
/**
|
||||
* 最低版本
|
||||
*/
|
||||
private String minVersion;
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package cn.axzo.msg.center.domain.entity;
|
||||
|
||||
import cn.axzo.msg.center.service.enums.CardElementType;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class CardElementConfig {
|
||||
|
||||
/**
|
||||
* 元素类型
|
||||
*/
|
||||
private CardElementType type;
|
||||
|
||||
/**
|
||||
* 元素名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 元素编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 元素值
|
||||
*/
|
||||
private String value;
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package cn.axzo.msg.center.domain.entity;
|
||||
|
||||
import cn.axzo.msg.center.service.enums.CardElementType;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class CardExtField {
|
||||
|
||||
/**
|
||||
* 元素类型
|
||||
*/
|
||||
private CardElementType type;
|
||||
|
||||
/**
|
||||
* 元素名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 元素编码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 元素值
|
||||
*/
|
||||
private String value;
|
||||
|
||||
}
|
||||
@ -0,0 +1,43 @@
|
||||
package cn.axzo.msg.center.domain.entity;
|
||||
|
||||
import cn.axzo.msg.center.domain.persistence.BaseEntityExt;
|
||||
import cn.axzo.msg.center.domain.utils.StringListTypeHandler;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "card_style", autoResultMap = true)
|
||||
public class CardStyle extends BaseEntityExt<CardStyle> {
|
||||
|
||||
/**
|
||||
* 样式名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 样式code, 唯一
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 预览大图
|
||||
*/
|
||||
@TableField(typeHandler = StringListTypeHandler.class)
|
||||
private List<String> previewImages;
|
||||
|
||||
/**
|
||||
* 卡片元素配置
|
||||
*/
|
||||
private List<CardElementConfig> elementConfigs;
|
||||
|
||||
}
|
||||
@ -26,6 +26,11 @@ public class MessageTemplateButtonV3 extends BaseEntityWithOperator<MessageTempl
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 按钮动作完成名称(失效名称)
|
||||
*/
|
||||
private String actionPerformedName;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package cn.axzo.msg.center.domain.entity;
|
||||
|
||||
import cn.axzo.foundation.dao.support.mysql.type.BaseListTypeHandler;
|
||||
import cn.axzo.im.center.api.feign.SendPriority;
|
||||
import cn.axzo.msg.center.domain.utils.IgnorePropsJsonTypeHandler;
|
||||
import cn.axzo.msg.center.push.PushData;
|
||||
@ -108,6 +109,29 @@ public class MessageTemplateV3 extends BaseEntityWithOperator<MessageTemplateV3>
|
||||
*/
|
||||
private YesOrNo displayOnList;
|
||||
|
||||
/**
|
||||
* app最低版本控制
|
||||
*/
|
||||
@TableField(typeHandler = AppVersionConfigsTypeHandler.class)
|
||||
private List<AppVersionConfig> appVersionConfigs;
|
||||
|
||||
/**
|
||||
* 卡片样式编码
|
||||
*/
|
||||
private String cardStyleCode;
|
||||
|
||||
/**
|
||||
* 卡片样式扩展字段
|
||||
*/
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private List<CardExtField> cardExtFields;
|
||||
|
||||
/**
|
||||
* 卡片状态图片配置
|
||||
*/
|
||||
@TableField(typeHandler = StateImageConfigConfigsTypeHandler.class)
|
||||
private List<StateImageConfig> stateImageConfigs;
|
||||
|
||||
/**
|
||||
* 扩展字段
|
||||
*/
|
||||
@ -143,4 +167,11 @@ public class MessageTemplateV3 extends BaseEntityWithOperator<MessageTemplateV3>
|
||||
private Boolean isSyncedForTest;
|
||||
}
|
||||
|
||||
// @formatter:off
|
||||
public static class AppVersionConfigsTypeHandler
|
||||
extends BaseListTypeHandler<AppVersionConfig> {}
|
||||
public static class StateImageConfigConfigsTypeHandler
|
||||
extends BaseListTypeHandler<StateImageConfig> {}
|
||||
// @formatter:on
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package cn.axzo.msg.center.domain.entity;
|
||||
|
||||
import cn.axzo.msg.center.service.enums.StateImageType;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
@Setter
|
||||
@Getter
|
||||
public class StateImageConfig {
|
||||
|
||||
/**
|
||||
* 状态类型
|
||||
*/
|
||||
private StateImageType stateImageType;
|
||||
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
private String imageUrl;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Boolean enabled;
|
||||
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package cn.axzo.msg.center.domain.utils;
|
||||
|
||||
import cn.axzo.foundation.dao.support.mysql.type.BaseListTypeHandler;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
public class LongListTypeHandler extends BaseListTypeHandler<Long> {
|
||||
}
|
||||
@ -0,0 +1,9 @@
|
||||
package cn.axzo.msg.center.domain.utils;
|
||||
|
||||
import cn.axzo.foundation.dao.support.mysql.type.BaseListTypeHandler;
|
||||
|
||||
/**
|
||||
* @author yanglin
|
||||
*/
|
||||
public class StringListTypeHandler extends BaseListTypeHandler<String> {
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user