feat:(REQ-3045) 模版管理V3-templateButtonV3填充属性

This commit is contained in:
xudawei 2024-10-08 23:59:37 +08:00
parent 1432d78870
commit 568cb39911
2 changed files with 26 additions and 25 deletions

View File

@ -32,18 +32,18 @@ public class MessageTemplateButtonV3DTO implements Serializable {
private static final long serialVersionUID = -9083376003614521781L;
/**
* 按钮唯一标识
*/
private String identityCode;
/**
* 预设按钮类型
*/
private PresetButtonType presetButtonType;
private PresetButtonType presetBtnCode;
/**
* 路由描述
* 按钮来源
* SYSTEM: 系统
* CUSTOM: 自定义
*/
private String desc;
private RouterButtonSourceEnum source;
/**
* 路由分类
* JUMP: 直接跳转
@ -51,45 +51,43 @@ public class MessageTemplateButtonV3DTO implements Serializable {
* PRESET_BUTTON: 预设按钮
*/
private RouterCategoryEnum category;
/**
* 按钮来源
* SYSTEM: 系统
* CUSTOM: 自定义
* 路由按钮的跳转url配置
*/
private RouterButtonSourceEnum source;
private UrlConfig urlConfig;
/**
* 按钮样式配置
* HIGH_LIGHT: 按钮高亮展示
* OVER_CARD: 按钮显示在卡片上
*/
private List<ButtonStyleEnum> style;
/**
* 执行人可见true 不可见false
*/
private Boolean executorShow;
/**
* 待办状态可见可见true 不可见false
*/
private Boolean pendingShow;
/**
* 路由按钮的跳转url配置
*/
private UrlConfig linkConfig;
/**
* 当按钮类型为API调用时该字段有值
*/
private String apiUrl;
/**
* @see {@link MessageTemplateRouterDTO#isValid}
* 按钮优先级数值越大优先级越低
*/
private Integer priority;
/**
* <p>要改2处都要记得改
*/
public boolean isValid() {
if (RouterCategoryEnum.ACTION.equals(category)) {
return StringUtils.isNotBlank(apiUrl);
}
// if (RouterCategoryEnum.ACTION.equals(category)) {
// return StringUtils.isNotBlank(apiUrl);
// }
if (RouterCategoryEnum.PRESET_BUTTON.equals(category)) {
return presetButtonType != null;
return presetBtnCode != null;
}
//TODO
return true;

View File

@ -1,6 +1,7 @@
package cn.axzo.msg.center.domain.entity;
import cn.axzo.msg.center.service.domain.UrlConfig;
import cn.axzo.msg.center.service.enums.ButtonStyleEnum;
import cn.axzo.msg.center.service.enums.PresetButtonType;
import cn.axzo.msg.center.service.enums.RouterButtonSourceEnum;
import cn.axzo.msg.center.service.enums.RouterCategoryEnum;
@ -11,6 +12,8 @@ import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.Getter;
import lombok.Setter;
import java.util.List;
/**
* @author yanglin
*/
@ -54,7 +57,7 @@ public class MessageTemplateButtonV3 extends BaseEntityWithOperator<MessageTempl
* 按钮style配置
*/
@TableField(typeHandler = FastjsonTypeHandler.class)
private JSONArray style;
private List<ButtonStyleEnum> style;
/**
* 执行人可见true 不可见false