添加标签name

main
hansha 2 years ago
parent 9f455a44e1
commit d6bb542f57

@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* szxc_jm_tag
*
* @author hs
* @date 2024-03-16
* @date 2024-03-21
*/
public class SzxcJmTag extends BaseEntity
{
@ -21,6 +21,10 @@ public class SzxcJmTag extends BaseEntity
/** 标签id */
private Long tagId;
/** 标签名称 */
@Excel(name = "标签名称")
private String tagName;
public void setJmId(Long jmId)
{
this.jmId = jmId;
@ -39,12 +43,22 @@ public class SzxcJmTag extends BaseEntity
{
return tagId;
}
public void setTagName(String tagName)
{
this.tagName = tagName;
}
public String getTagName()
{
return tagName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("jmId", getJmId())
.append("tagId", getTagId())
.append("tagName", getTagName())
.toString();
}
}

@ -7,15 +7,17 @@
<resultMap type="SzxcJmTag" id="SzxcJmTagResult">
<result property="jmId" column="jm_id" />
<result property="tagId" column="tag_id" />
<result property="tagName" column="tag_name" />
</resultMap>
<sql id="selectSzxcJmTagVo">
select jm_id, tag_id from szxc_jm_tag
select jm_id, tag_id, tag_name from szxc_jm_tag
</sql>
<select id="selectSzxcJmTagList" parameterType="SzxcJmTag" resultMap="SzxcJmTagResult">
<include refid="selectSzxcJmTagVo"/>
<where>
<if test="tagName != null and tagName != ''"> and tag_name like concat('%', #{tagName}, '%')</if>
</where>
</select>
@ -29,10 +31,12 @@
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="jmId != null">jm_id,</if>
<if test="tagId != null">tag_id,</if>
<if test="tagName != null">tag_name,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jmId != null">#{jmId},</if>
<if test="tagId != null">#{tagId},</if>
<if test="tagName != null">#{tagName},</if>
</trim>
</insert>
@ -40,6 +44,7 @@
update szxc_jm_tag
<trim prefix="SET" suffixOverrides=",">
<if test="tagId != null">tag_id = #{tagId},</if>
<if test="tagName != null">tag_name = #{tagName},</if>
</trim>
where jm_id = #{jmId}
</update>

@ -1,6 +1,14 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="标签名称" prop="tagName">
<el-input
v-model="queryParams.tagName"
placeholder="请输入标签名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -57,6 +65,7 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="居民id" align="center" prop="jmId" />
<el-table-column label="标签id" align="center" prop="tagId" />
<el-table-column label="标签名称" align="center" prop="tagName" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -88,6 +97,9 @@
<!-- 添加或修改居民标签关联对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="标签名称" prop="tagName">
<el-input v-model="form.tagName" placeholder="请输入标签名称" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -126,6 +138,7 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
tagName: null
},
//
form: {},
@ -156,7 +169,8 @@ export default {
reset() {
this.form = {
jmId: null,
tagId: null
tagId: null,
tagName: null
};
this.resetForm("form");
},

Loading…
Cancel
Save