You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
3.4 KiB
75 lines
3.4 KiB
3 years ago
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||
|
<!DOCTYPE mapper
|
||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
<mapper namespace="com.ruoyi.archives.mapper.ArchivesHkHistoryMapper">
|
||
|
|
||
|
<resultMap type="ArchivesHkHistory" id="ArchivesHkHistoryResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="appendixAddress" column="appendix_address" />
|
||
|
<result property="saveFlag" column="save_flag" />
|
||
|
<result property="createBy" column="create_by" />
|
||
|
<result property="createTime" column="create_time" />
|
||
|
<result property="remark" column="remark" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectArchivesHkHistoryVo">
|
||
|
select id, appendix_address, save_flag, create_by, create_time, remark from "PUBLIC"."ARCHIVES_HK_HISTORY"
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectArchivesHkHistoryList" parameterType="ArchivesHkHistory" resultMap="ArchivesHkHistoryResult">
|
||
|
<include refid="selectArchivesHkHistoryVo"/>
|
||
|
<where>
|
||
|
<if test="appendixAddress != null and appendixAddress != ''"> and appendix_address = #{appendixAddress} </if>
|
||
|
<if test="saveFlag != null and saveFlag != ''"> and save_flag = #{saveFlag} </if>
|
||
|
</where>
|
||
|
order by create_time desc
|
||
|
</select>
|
||
|
|
||
|
<select id="selectArchivesHkHistoryById" parameterType="Long" resultMap="ArchivesHkHistoryResult">
|
||
|
<include refid="selectArchivesHkHistoryVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertArchivesHkHistory" parameterType="ArchivesHkHistory" useGeneratedKeys="true" keyProperty="id">
|
||
|
insert into "PUBLIC"."ARCHIVES_HK_HISTORY"
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="appendixAddress != null">appendix_address,</if>
|
||
|
<if test="saveFlag != null">save_flag,</if>
|
||
|
<if test="createBy != null">create_by,</if>
|
||
|
<if test="createTime != null">create_time,</if>
|
||
|
<if test="remark != null">remark,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="appendixAddress != null">#{appendixAddress},</if>
|
||
|
<if test="saveFlag != null">#{saveFlag},</if>
|
||
|
<if test="createBy != null">#{createBy},</if>
|
||
|
<if test="createTime != null">#{createTime},</if>
|
||
|
<if test="remark != null">#{remark},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateArchivesHkHistory" parameterType="ArchivesHkHistory">
|
||
|
update "PUBLIC"."ARCHIVES_HK_HISTORY"
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="appendixAddress != null">appendix_address = #{appendixAddress},</if>
|
||
|
<if test="saveFlag != null">save_flag = #{saveFlag},</if>
|
||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
<if test="remark != null">remark = #{remark},</if>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteArchivesHkHistoryById" parameterType="Long">
|
||
|
delete from "PUBLIC"."ARCHIVES_HK_HISTORY" where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteArchivesHkHistoryByIds" parameterType="String">
|
||
|
delete from "PUBLIC"."ARCHIVES_HK_HISTORY" where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|