|
|
|
|
@ -13,17 +13,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<result property="secretKey" column="secretKey" />
|
|
|
|
|
<result property="json" column="json" />
|
|
|
|
|
<result property="type" column="type" />
|
|
|
|
|
<result property="isDelete" column="is_delete" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
<sql id="selectHwWebDocumentVo">
|
|
|
|
|
select document_id, tenant_id, document_address, create_time, web_code, secretKey ,
|
|
|
|
|
json,type
|
|
|
|
|
json, type,
|
|
|
|
|
is_delete
|
|
|
|
|
from hw_web_document
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectHwWebDocumentList" parameterType="HwWebDocument" resultMap="HwWebDocumentResult">
|
|
|
|
|
<include refid="selectHwWebDocumentVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
and is_delete = '0'
|
|
|
|
|
<if test="documentId != null "> and document_id = #{documentId}</if>
|
|
|
|
|
<if test="tenantId != null "> and tenant_id = #{tenantId}</if>
|
|
|
|
|
<if test="documentAddress != null and documentAddress != ''"> and document_address = #{documentAddress}</if>
|
|
|
|
|
@ -36,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<select id="selectHwWebDocumentByDocumentId" parameterType="String" resultMap="HwWebDocumentResult">
|
|
|
|
|
<include refid="selectHwWebDocumentVo"/>
|
|
|
|
|
where document_id = #{documentId}
|
|
|
|
|
where is_delete = '0' and document_id = #{documentId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertHwWebDocument" parameterType="HwWebDocument" useGeneratedKeys="true" keyProperty="documentId">
|
|
|
|
|
@ -50,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="secretKey != null">secretKey,</if>
|
|
|
|
|
<if test="json != null">json,</if>
|
|
|
|
|
<if test="type != null">type,</if>
|
|
|
|
|
is_delete,
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="documentId != null">#{documentId},</if>
|
|
|
|
|
@ -60,6 +64,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="secretKey != null">#{secretKey},</if>
|
|
|
|
|
<if test="json != null">#{json},</if>
|
|
|
|
|
<if test="type != null">#{type},</if>
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="isDelete != null and isDelete != ''">#{isDelete},</when>
|
|
|
|
|
<otherwise>'0',</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
@ -78,14 +86,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
where document_id = #{documentId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteHwWebDocumentByDocumentId" parameterType="String">
|
|
|
|
|
delete from hw_web_document where document_id = #{documentId}
|
|
|
|
|
</delete>
|
|
|
|
|
<update id="deleteHwWebDocumentByDocumentId" parameterType="String">
|
|
|
|
|
update hw_web_document set is_delete = '1' where document_id = #{documentId}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteHwWebDocumentByDocumentIds" parameterType="String">
|
|
|
|
|
delete from hw_web_document where document_id in
|
|
|
|
|
<update id="deleteHwWebDocumentByDocumentIds" parameterType="String">
|
|
|
|
|
update hw_web_document set is_delete = '1' where document_id in
|
|
|
|
|
<foreach item="documentId" collection="array" open="(" separator="," close=")">
|
|
|
|
|
#{documentId}
|
|
|
|
|
</foreach>
|
|
|
|
|
</delete>
|
|
|
|
|
</update>
|
|
|
|
|
</mapper>
|