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.
105 lines
5.4 KiB
105 lines
5.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.ArchivesStoreroomMapper">
|
||
|
|
||
|
<resultMap type="ArchivesStoreroom" id="ArchivesStoreroomResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="storeroomName" column="storeroom_name" />
|
||
|
<result property="storeroomNum" column="storeroom_num" />
|
||
|
<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="expand1" column="expand_1" />
|
||
|
<result property="expand2" column="expand_2" />
|
||
|
<result property="expand3" column="expand_3" />
|
||
|
<result property="expand4" column="expand_4" />
|
||
|
<result property="expand5" column="expand_5" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectArchivesStoreroomVo">
|
||
|
select id, storeroom_name, storeroom_num, create_by, create_time, update_by, update_time, expand_1, expand_2, expand_3, expand_4, expand_5 from "PUBLIC"."archives_storeroom"
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectArchivesStoreroomList" parameterType="ArchivesStoreroom" resultMap="ArchivesStoreroomResult">
|
||
|
<include refid="selectArchivesStoreroomVo"/>
|
||
|
<where>
|
||
|
<if test="storeroomName != null and storeroomName != ''"> and storeroom_name like concat('%', #{storeroomName}, '%')</if>
|
||
|
<if test="storeroomNum != null and storeroomNum != ''"> and storeroom_num = #{storeroomNum}</if>
|
||
|
<if test="expand1 != null and expand1 != ''"> and expand_1 = #{expand1}</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="selectArchivesStoreroomById" parameterType="String" resultMap="ArchivesStoreroomResult">
|
||
|
<include refid="selectArchivesStoreroomVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertArchivesStoreroom" parameterType="ArchivesStoreroom">
|
||
|
insert into "PUBLIC"."archives_storeroom"
|
||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">id,</if>
|
||
|
<if test="storeroomName != null">storeroom_name,</if>
|
||
|
<if test="storeroomNum != null">storeroom_num,</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="expand1 != null">expand_1,</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>
|
||
|
</trim>
|
||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||
|
<if test="id != null">#{id},</if>
|
||
|
<if test="storeroomName != null">#{storeroomName},</if>
|
||
|
<if test="storeroomNum != null">#{storeroomNum},</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="expand1 != null">#{expand1},</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>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateArchivesStoreroom" parameterType="ArchivesStoreroom">
|
||
|
update "PUBLIC"."archives_storeroom"
|
||
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
<if test="storeroomName != null">storeroom_name = #{storeroomName},</if>
|
||
|
<if test="storeroomNum != null">storeroom_num = #{storeroomNum},</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="expand1 != null">expand_1 = #{expand1},</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>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteArchivesStoreroomById" parameterType="String">
|
||
|
delete from "PUBLIC"."archives_storeroom" where id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
<delete id="deleteArchivesStoreroomByIds" parameterType="String">
|
||
|
delete from "PUBLIC"."archives_storeroom" where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|