Update JianshenkechengLiuyanEntity.java

王刚注释
pz2femycj 4 months ago
parent 66a4354833
commit 57b2b6b890

@ -1,243 +1,134 @@
package com.entity; package com.entity.vo;
import com.annotation.ColumnInfo; import com.entity.JianshenkechengLiuyanEntity;
import javax.validation.constraints.*; import com.baomidou.mybatisplus.annotations.TableField;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.baomidou.mybatisplus.annotations.TableName;
import java.lang.reflect.InvocationTargetException; import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable; import java.util.Date;
import java.util.*; import org.springframework.format.annotation.DateTimeFormat;
import org.apache.tools.ant.util.DateUtils;
import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils; // 健身课程留言手机端接口返回VO去除不必要字段
import com.baomidou.mybatisplus.annotations.TableField; @TableName("jianshenkecheng_liuyan")
import com.baomidou.mybatisplus.annotations.TableId; public class JianshenkechengLiuyanVO implements Serializable {
import com.baomidou.mybatisplus.annotations.TableName; private static final long serialVersionUID = 1L;
import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.enums.FieldFill; // 主键ID
import com.utils.DateUtil; @TableField(value = "id")
private Integer id;
/** // 关联的健身课程ID
* @TableField(value = "jianshenkecheng_id")
* private Integer jianshenkechengId;
* @author
* @email // 留言用户ID
*/ @TableField(value = "yonghu_id")
@TableName("jianshenkecheng_liuyan") private Integer yonghuId;
public class JianshenkechengLiuyanEntity<T> implements Serializable {
private static final long serialVersionUID = 1L; // 留言内容文本
@TableField(value = "jianshenkecheng_liuyan_text")
private String jianshenkechengLiuyanText;
public JianshenkechengLiuyanEntity() {
// 留言时间(带时区格式化)
} @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
public JianshenkechengLiuyanEntity(T t) { @TableField(value = "insert_time")
try { private Date insertTime;
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) { // 管理员回复内容
// TODO Auto-generated catch block @TableField(value = "reply_text")
e.printStackTrace(); private String replyText;
}
} // 回复时间(带时区格式化)
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
/** @TableField(value = "update_time")
* private Date updateTime;
*/
@TableId(type = IdType.AUTO) // 记录创建时间(用于特定展示场景)
@ColumnInfo(comment="主键",type="int(11)") @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@TableField(value = "id") @DateTimeFormat
@TableField(value = "create_time")
private Integer id; private Date createTime;
// 获取主键ID
/** public Integer getId() {
* return id;
*/ }
@ColumnInfo(comment="健身课程",type="int(11)")
@TableField(value = "jianshenkecheng_id") // 设置主键ID
public void setId(Integer id) {
private Integer jianshenkechengId; this.id = id;
}
/** // 获取关联课程ID
* public Integer getJianshenkechengId() {
*/ return jianshenkechengId;
@ColumnInfo(comment="用户",type="int(11)") }
@TableField(value = "yonghu_id")
// 设置关联课程ID
private Integer yonghuId; public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId;
}
/**
* // 获取留言用户ID
*/ public Integer getYonghuId() {
@ColumnInfo(comment="留言内容",type="longtext") return yonghuId;
@TableField(value = "jianshenkecheng_liuyan_text") }
private String jianshenkechengLiuyanText; // 设置留言用户ID
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
/** }
*
*/ // 获取:留言内容
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") public String getJianshenkechengLiuyanText() {
@DateTimeFormat return jianshenkechengLiuyanText;
@ColumnInfo(comment="留言时间",type="timestamp") }
@TableField(value = "insert_time",fill = FieldFill.INSERT)
// 设置:留言内容
private Date insertTime; public void setJianshenkechengLiuyanText(String jianshenkechengLiuyanText) {
this.jianshenkechengLiuyanText = jianshenkechengLiuyanText;
}
/**
* // 获取:留言时间
*/ public Date getInsertTime() {
@ColumnInfo(comment="回复内容",type="longtext") return insertTime;
@TableField(value = "reply_text") }
private String replyText; // 设置:留言时间
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
/** }
*
*/ // 获取:回复内容
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") public String getReplyText() {
@DateTimeFormat return replyText;
@ColumnInfo(comment="回复时间",type="timestamp") }
@TableField(value = "update_time",fill = FieldFill.UPDATE)
// 设置:回复内容
private Date updateTime; public void setReplyText(String replyText) {
this.replyText = replyText;
}
/**
* listShow // 获取:回复时间
*/ public Date getUpdateTime() {
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss") return updateTime;
@DateTimeFormat }
@ColumnInfo(comment="创建时间",type="timestamp")
@TableField(value = "create_time",fill = FieldFill.INSERT) // 设置:回复时间
public void setUpdateTime(Date updateTime) {
private Date createTime; this.updateTime = updateTime;
}
/** // 获取:创建时间(展示用)
* public Date getCreateTime() {
*/ return createTime;
public Integer getId() { }
return id;
} // 设置:创建时间(展示用)
/** public void setCreateTime(Date createTime) {
* this.createTime = createTime;
*/ }
}
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public Integer getJianshenkechengId() {
return jianshenkechengId;
}
/**
*
*/
public void setJianshenkechengId(Integer jianshenkechengId) {
this.jianshenkechengId = jianshenkechengId;
}
/**
*
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
*
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
*
*/
public String getJianshenkechengLiuyanText() {
return jianshenkechengLiuyanText;
}
/**
*
*/
public void setJianshenkechengLiuyanText(String jianshenkechengLiuyanText) {
this.jianshenkechengLiuyanText = jianshenkechengLiuyanText;
}
/**
*
*/
public Date getInsertTime() {
return insertTime;
}
/**
*
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
*
*/
public String getReplyText() {
return replyText;
}
/**
*
*/
public void setReplyText(String replyText) {
this.replyText = replyText;
}
/**
*
*/
public Date getUpdateTime() {
return updateTime;
}
/**
*
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
* listShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* listShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "JianshenkechengLiuyan{" +
", id=" + id +
", jianshenkechengId=" + jianshenkechengId +
", yonghuId=" + yonghuId +
", jianshenkechengLiuyanText=" + jianshenkechengLiuyanText +
", insertTime=" + DateUtil.convertString(insertTime,"yyyy-MM-dd") +
", replyText=" + replyText +
", updateTime=" + DateUtil.convertString(updateTime,"yyyy-MM-dd") +
", createTime=" + DateUtil.convertString(createTime,"yyyy-MM-dd") +
"}";
}
}
Loading…
Cancel
Save