代码调整

This commit is contained in:
tiger_zhou 2023-09-19 15:54:58 +08:00
parent fe7fa3da8a
commit 54753177dd
2 changed files with 21 additions and 19 deletions

View File

@ -26,8 +26,8 @@ public class AlertTipTimeConfig {
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Long id;
@Schema(description = "名称") // @Schema(description = "名称")
private String timeName; // private String timeName;
@Schema(description = "开始小时数") @Schema(description = "开始小时数")
private Byte startHour; private Byte startHour;
@ -43,7 +43,7 @@ public class AlertTipTimeConfig {
public static final String ID = "id"; public static final String ID = "id";
public static final String TIME_NAME = "time_name"; // public static final String TIME_NAME = "time_name";
public static final String START_HOUR = "start_hour"; public static final String START_HOUR = "start_hour";

View File

@ -70,6 +70,8 @@ public class AlertTipService {
entity.setId(saveDTO.getId()); entity.setId(saveDTO.getId());
if (CollectionUtils.isNotEmpty(saveDTO.getTipTimeIds())) { if (CollectionUtils.isNotEmpty(saveDTO.getTipTimeIds())) {
entity.setTipTimeRef(Joiner.on(",").skipNulls().join(saveDTO.getTipTimeIds())); entity.setTipTimeRef(Joiner.on(",").skipNulls().join(saveDTO.getTipTimeIds()));
} else {
entity.setTipTimeRef(null);
} }
return entity; return entity;
} }