From af6a08398e2bc22f3c8a3a615cbd9e23190be906 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期四, 12 五月 2022 10:55:44 +0800 Subject: [PATCH] update 优化 文件与图片上传组件 使用id存储回显 --- ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserPost.java | 60 ++++++++++++++++++++++++------------------------------------ 1 files changed, 24 insertions(+), 36 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserPost.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserPost.java index 6e8c416..243e3c8 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserPost.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserPost.java @@ -1,46 +1,34 @@ package com.ruoyi.system.domain; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; /** * 鐢ㄦ埛鍜屽矖浣嶅叧鑱� sys_user_post - * - * @author ruoyi + * + * @author Lion Li */ -public class SysUserPost -{ - /** 鐢ㄦ埛ID */ + +@Data +@TableName("sys_user_post") +@ApiModel("鐢ㄦ埛鍜屽矖浣嶅叧鑱�") +public class SysUserPost { + + /** + * 鐢ㄦ埛ID + */ + @TableId(type = IdType.INPUT) + @ApiModelProperty(value = "鐢ㄦ埛ID") private Long userId; - - /** 宀椾綅ID */ + + /** + * 宀椾綅ID + */ + @ApiModelProperty(value = "宀椾綅ID") private Long postId; - public Long getUserId() - { - return userId; - } - - public void setUserId(Long userId) - { - this.userId = userId; - } - - public Long getPostId() - { - return postId; - } - - public void setPostId(Long postId) - { - this.postId = postId; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("userId", getUserId()) - .append("postId", getPostId()) - .toString(); - } } -- Gitblit v1.9.3