书签TAG表新增字段

This commit is contained in:
WangHao 2020-09-05 13:29:22 +08:00
parent 3cd2a5a3ba
commit 046bd8c032
2 changed files with 102 additions and 11 deletions

View File

@ -1,17 +1,20 @@
package com.ruoyi.bookmark.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 书签_标签对象 sq_tag
*
* @author ruoyi
* @date 2020-09-04
* @date 2020-09-05
*/
public class SqTag extends BaseEntity
public class SqTag
{
private static final long serialVersionUID = 1L;
@ -26,6 +29,26 @@ public class SqTag extends BaseEntity
@Excel(name = "引用数量")
private Integer icount;
/** 谁增加的该标签 */
@Excel(name = "谁增加的该标签")
private Long userId;
/** S系统标签,P书签标签,B便签书签 */
@Excel(name = "S系统标签,P书签标签,B便签书签")
private String tagType;
/** 链接 */
@Excel(name = "链接")
private String url;
/** 状态 */
@Excel(name = "状态")
private Integer status;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
public void setId(Long id)
{
this.id = id;
@ -53,6 +76,50 @@ public class SqTag extends BaseEntity
{
return icount;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setTagType(String tagType)
{
this.tagType = tagType;
}
public String getTagType()
{
return tagType;
}
public void setUrl(String url)
{
this.url = url;
}
public String getUrl()
{
return url;
}
public void setStatus(Integer status)
{
this.status = status;
}
public Integer getStatus()
{
return status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
@ -60,6 +127,10 @@ public class SqTag extends BaseEntity
.append("id", getId())
.append("name", getName())
.append("icount", getIcount())
.append("userId", getUserId())
.append("tagType", getTagType())
.append("url", getUrl())
.append("status", getStatus())
.append("createTime", getCreateTime())
.toString();
}

View File

@ -8,18 +8,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" />
<result property="name" column="name" />
<result property="icount" column="icount" />
<result property="userId" column="user_Id" />
<result property="tagType" column="tag_type" />
<result property="url" column="url" />
<result property="status" column="status" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectSqTagVo">
select id, name, icount, create_time from sq_tag
select id, name, icount, user_Id, tag_type, url, status, create_time from sq_tag
</sql>
<select id="selectSqTagList" parameterType="SqTag" resultMap="SqTagResult">
<include refid="selectSqTagVo"/>
<where>
<if test="name != null and name != ''"> and name = #{name}</if>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="icount != null "> and icount = #{icount}</if>
<if test="userId != null "> and user_Id = #{userId}</if>
<if test="tagType != null and tagType != ''"> and tag_type = #{tagType}</if>
<if test="url != null and url != ''"> and url = #{url}</if>
<if test="status != null "> and status = #{status}</if>
</where>
</select>
@ -33,11 +41,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="icount != null">icount,</if>
<if test="userId != null">user_Id,</if>
<if test="tagType != null">tag_type,</if>
<if test="url != null">url,</if>
<if test="status != null">status,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="icount != null">#{icount},</if>
<if test="userId != null">#{userId},</if>
<if test="tagType != null">#{tagType},</if>
<if test="url != null">#{url},</if>
<if test="status != null">#{status},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
@ -47,6 +63,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="icount != null">icount = #{icount},</if>
<if test="userId != null">user_Id = #{userId},</if>
<if test="tagType != null">tag_type = #{tagType},</if>
<if test="url != null">url = #{url},</if>
<if test="status != null">status = #{status},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}