feat(hw-portal):为HwWebDocument添加json和type字段支持

新增了json和type两个字段,用于扩展hw_web_document表的存储能力。
同时更新了对应的Java实体类、Mapper XML文件,以支持新字段的读取与持久化操作。
master
zangch@mesnac.com 3 months ago
parent 57de3c5e04
commit a1894210d5

@ -111,4 +111,5 @@ public class HwWebController extends BaseController
{
return success(hwWebService.selectHwWebList(HwWeb)) ;
}
}

@ -34,6 +34,12 @@ public class HwWebDocument extends BaseEntity
@Excel(name = "密钥")
private String secretKey;
/** json */
private String json;
/** 文件类型 */
private String type;
public void setDocumentId(String documentId)
{
this.documentId = documentId;
@ -80,6 +86,22 @@ public class HwWebDocument extends BaseEntity
return secretKey;
}
public String getJson() {
return json;
}
public void setJson(String json) {
this.json = json;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -89,6 +111,8 @@ public class HwWebDocument extends BaseEntity
.append("createTime", getCreateTime())
.append("webCode", getWebCode())
.append("secretKey", getSecretKey())
.append("json", getJson())
.append("type", getType())
.toString();
}
}

@ -11,10 +11,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" />
<result property="webCode" column="web_code" />
<result property="secretKey" column="secretKey" />
<result property="json" column="json" />
<result property="type" column="type" />
</resultMap>
<sql id="selectHwWebDocumentVo">
select document_id, tenant_id, document_address, create_time, web_code, secretKey from hw_web_document
select document_id, tenant_id, document_address, create_time, web_code, secretKey ,
json,type
from hw_web_document
</sql>
<select id="selectHwWebDocumentList" parameterType="HwWebDocument" resultMap="HwWebDocumentResult">
@ -25,6 +29,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="documentAddress != null and documentAddress != ''"> and document_address = #{documentAddress}</if>
<if test="webCode != null and webCode != ''"> and web_code = #{webCode}</if>
<if test="secretKey != null and secretKey != ''"> and secretKey = #{secretKey}</if>
<if test="json != null and json != ''"> and json = #{json}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
</where>
</select>
@ -42,6 +48,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="webCode != null">web_code,</if>
<if test="secretKey != null">secretKey,</if>
<if test="json != null">json,</if>
<if test="type != null">type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="documentId != null">#{documentId},</if>
@ -50,6 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="webCode != null">#{webCode},</if>
<if test="secretKey != null">#{secretKey},</if>
<if test="json != null">#{json},</if>
<if test="type != null">#{type},</if>
</trim>
</insert>
@ -62,6 +72,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time = #{createTime},</if>
<if test="webCode != null">web_code = #{webCode},</if>
<if test="secretKey != null">secretKey = #{secretKey},</if>
<if test="json != null">json = #{json},</if>
<if test="type != null">type = #{type},</if>
</trim>
where document_id = #{documentId}
</update>

Loading…
Cancel
Save