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.
119 lines
6.3 KiB
119 lines
6.3 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.ArchivesDocBoxMapper">
|
||
|
|
||
|
<resultMap type="ArchivesDocBox" id="ArchivesDocBoxResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="docBoxName" column="doc_box_name" />
|
||
|
<result property="docBoxNum" column="doc_box_num" />
|
||
|
<result property="standardCapacity" column="standard_capacity" />
|
||
|
<result property="useNum" column="use_num" />
|
||
|
<result property="stormId" column="storm_id" />
|
||
|
<result property="expand2" column="expand_2" />
|
||
|
<result property="expand3" column="expand_3" />
|
||
|
<result property="expand4" column="expand_4" />
|
||
|
<result property="expand5" column="expand_5" />
|
||
|
<result property="createBy" column="create_by" />
|
||
|
<result property="createTime" column="create_time" />
|
||
|
<result property="updateBy" column="update_by" />
|
||
|
<result property="updateTime" column="update_time" />
|
||
|
<result property="delFlag" column="del_flag" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectArchivesDocBoxVo">
|
||
|
select id, doc_box_name, doc_box_num, standard_capacity, use_num, storm_id, expand_2, expand_3, expand_4, expand_5, create_by, create_time, update_by, update_time, del_flag from "PUBLIC"."archives_doc_box"
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectArchivesDocBoxList" parameterType="ArchivesDocBox" resultMap="ArchivesDocBoxResult">
|
||
|
<include refid="selectArchivesDocBoxVo"/>
|
||
|
<where>
|
||
|
<if test="docBoxName != null and docBoxName != ''"> and doc_box_name like concat('%', #{docBoxName}, '%')</if>
|
||
|
<if test="docBoxNum != null and docBoxNum != ''"> and doc_box_num = #{docBoxNum}</if>
|
||
|
<if test="standardCapacity != null and standardCapacity != ''"> and standard_capacity = #{standardCapacity}</if>
|
||
|
<if test="useNum != null and useNum != ''"> and use_num = #{useNum}</if>
|
||
|
<if test="stormId != null and stormId != ''"> and storm_id = #{stormId}</if>
|
||
|
<if test="expand2 != null and expand2 != ''"> and expand_2 = #{expand2}</if>
|
||
|
<if test="expand3 != null and expand3 != ''"> and expand_3 = #{expand3}</if>
|
||
|
<if test="expand4 != null and expand4 != ''"> and expand_4 = #{expand4}</if>
|
||
|
<if test="expand5 != null and expand5 != ''"> and expand_5 = #{expand5}</if>
|
||
|
</where>
|
||
|
</select>
|
||
|
|
||
|
<select id="selectArchivesDocBoxById" parameterType="String" resultMap="ArchivesDocBoxResult">
|
||
|
<include refid="selectArchivesDocBoxVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertArchivesDocBox" parameterType="ArchivesDocBox">
|
||
|
insert into "PUBLIC"."archives_doc_box"
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">id,</if>
|
||
|
<if test="docBoxName != null">doc_box_name,</if>
|
||
|
<if test="docBoxNum != null">doc_box_num,</if>
|
||
|
<if test="standardCapacity != null">standard_capacity,</if>
|
||
|
<if test="useNum != null">use_num,</if>
|
||
|
<if test="stormId != null">storm_id,</if>
|
||
|
<if test="expand2 != null">expand_2,</if>
|
||
|
<if test="expand3 != null">expand_3,</if>
|
||
|
<if test="expand4 != null">expand_4,</if>
|
||
|
<if test="expand5 != null">expand_5,</if>
|
||
|
<if test="createBy != null">create_by,</if>
|
||
|
<if test="createTime != null">create_time,</if>
|
||
|
<if test="updateBy != null">update_by,</if>
|
||
|
<if test="updateTime != null">update_time,</if>
|
||
|
<if test="delFlag != null">del_flag,</if>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">#{id},</if>
|
||
|
<if test="docBoxName != null">#{docBoxName},</if>
|
||
|
<if test="docBoxNum != null">#{docBoxNum},</if>
|
||
|
<if test="standardCapacity != null">#{standardCapacity},</if>
|
||
|
<if test="useNum != null">#{useNum},</if>
|
||
|
<if test="stormId != null">#{stormId},</if>
|
||
|
<if test="expand2 != null">#{expand2},</if>
|
||
|
<if test="expand3 != null">#{expand3},</if>
|
||
|
<if test="expand4 != null">#{expand4},</if>
|
||
|
<if test="expand5 != null">#{expand5},</if>
|
||
|
<if test="createBy != null">#{createBy},</if>
|
||
|
<if test="createTime != null">#{createTime},</if>
|
||
|
<if test="updateBy != null">#{updateBy},</if>
|
||
|
<if test="updateTime != null">#{updateTime},</if>
|
||
|
<if test="delFlag != null">#{delFlag},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateArchivesDocBox" parameterType="ArchivesDocBox">
|
||
|
update "PUBLIC"."archives_doc_box"
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="docBoxName != null">doc_box_name = #{docBoxName},</if>
|
||
|
<if test="docBoxNum != null">doc_box_num = #{docBoxNum},</if>
|
||
|
<if test="standardCapacity != null">standard_capacity = #{standardCapacity},</if>
|
||
|
<if test="useNum != null">use_num = #{useNum},</if>
|
||
|
<if test="stormId != null">storm_id = #{stormId},</if>
|
||
|
<if test="expand2 != null">expand_2 = #{expand2},</if>
|
||
|
<if test="expand3 != null">expand_3 = #{expand3},</if>
|
||
|
<if test="expand4 != null">expand_4 = #{expand4},</if>
|
||
|
<if test="expand5 != null">expand_5 = #{expand5},</if>
|
||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteArchivesDocBoxById" parameterType="String">
|
||
|
delete from "PUBLIC"."archives_doc_box" where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteArchivesDocBoxByIds" parameterType="String">
|
||
|
delete from "PUBLIC"."archives_doc_box" where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|