diff --git a/renren-admin/src/main/java/io/renren/modules/demandComment/dto/TDemandCommentDTO.java b/renren-admin/src/main/java/io/renren/modules/demandComment/dto/TDemandCommentDTO.java index 5eab5c44..a55b9cf7 100644 --- a/renren-admin/src/main/java/io/renren/modules/demandComment/dto/TDemandCommentDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/demandComment/dto/TDemandCommentDTO.java @@ -2,12 +2,14 @@ package io.renren.modules.demandComment.dto; import io.renren.common.dto.AuditingBaseDTO; import io.renren.modules.demanData.dto.TDemandDataDTO; +import io.renren.modules.demandComment.entity.TDemandCommentEntityDelFlag; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; import java.util.Date; +import java.util.Optional; /** * 需求评论 @@ -45,6 +47,8 @@ public class TDemandCommentDTO extends AuditingBaseDTO implements Serializable { private String note5; @ApiModelProperty(value = "删除标志:0:正常;1:已删除;2:待审核;3:审核中;9其他") private Integer delFlag; + @ApiModelProperty(value = "删除标志tip:0:正常;1:已删除;2:待审核;3:审核中;9其他") + private String delFlagTip; @ApiModelProperty(value = "评论所属需求主题") private TDemandDataDTO demandDataDTO; @@ -52,4 +56,14 @@ public class TDemandCommentDTO extends AuditingBaseDTO implements Serializable { @ApiModelProperty(value = "申请单号") private String applyNumber; + public String getDelFlagTip() { + if (this.delFlag != null) { + Optional resourceEntityDelFlagOptional = Optional.ofNullable(TDemandCommentEntityDelFlag.getByFlag(this.delFlag)); + if (resourceEntityDelFlagOptional.isPresent()) { + return resourceEntityDelFlagOptional.get().getTip(); + } + } + return ""; + + } } \ No newline at end of file