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.
66 lines
2.4 KiB
66 lines
2.4 KiB
<?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.system.mapper.BFileMapper"> |
|
|
|
<resultMap type="BFile" id="BFileResult"> |
|
<result property="id" column="id" /> |
|
<result property="uuid" column="uuid" /> |
|
<result property="memo" column="memo" /> |
|
<result property="gmtCreate" column="gmt_create" /> |
|
</resultMap> |
|
|
|
<sql id="selectBFileVo"> |
|
select id, uuid, memo, gmt_create from b_file |
|
</sql> |
|
|
|
<select id="selectBFileList" parameterType="BFile" resultMap="BFileResult"> |
|
<include refid="selectBFileVo"/> |
|
<where> |
|
<if test="uuid != null and uuid != ''"> and uuid = #{uuid}</if> |
|
<if test="memo != null and memo != ''"> and memo = #{memo}</if> |
|
<if test="gmtCreate != null "> and gmt_create = #{gmtCreate}</if> |
|
</where> |
|
</select> |
|
|
|
<select id="selectBFileById" parameterType="Long" resultMap="BFileResult"> |
|
<include refid="selectBFileVo"/> |
|
where id = #{id} |
|
</select> |
|
|
|
<insert id="insertBFile" parameterType="BFile" useGeneratedKeys="true" keyProperty="id"> |
|
insert into b_file |
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
<if test="uuid != null">uuid,</if> |
|
<if test="memo != null">memo,</if> |
|
<if test="gmtCreate != null">gmt_create,</if> |
|
</trim> |
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
<if test="uuid != null">#{uuid},</if> |
|
<if test="memo != null">#{memo},</if> |
|
<if test="gmtCreate != null">#{gmtCreate},</if> |
|
</trim> |
|
</insert> |
|
|
|
<update id="updateBFile" parameterType="BFile"> |
|
update b_file |
|
<trim prefix="SET" suffixOverrides=","> |
|
<if test="uuid != null">uuid = #{uuid},</if> |
|
<if test="memo != null">memo = #{memo},</if> |
|
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if> |
|
</trim> |
|
where id = #{id} |
|
</update> |
|
|
|
<delete id="deleteBFileById" parameterType="Long"> |
|
delete from b_file where id = #{id} |
|
</delete> |
|
|
|
<delete id="deleteBFileByIds" parameterType="String"> |
|
delete from b_file where id in |
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
#{id} |
|
</foreach> |
|
</delete> |
|
</mapper> |