You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.8 KiB
XML

<?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.BasePictureLocationMapper">
<resultMap type="BasePictureLocation" id="BasePictureLocationResult">
<result property="id" column="id" />
<result property="picturePath" column="picture_path" />
<result property="pictureLocation" column="picture_location" />
</resultMap>
<sql id="selectBasePictureLocationVo">
select id, picture_path, picture_location from base_picture_location
</sql>
<select id="countBasePictureLocation" resultType="integer">
select count(id) from base_picture_location where picture_location= #{pictureLocation}
</select>
<select id="selectBasePictureLocationList" parameterType="BasePictureLocation" resultMap="BasePictureLocationResult">
<include refid="selectBasePictureLocationVo"/>
<where>
</where>
</select>
<select id="selectBasePictureLocationById" parameterType="Long" resultMap="BasePictureLocationResult">
<include refid="selectBasePictureLocationVo"/>
where id = #{id}
</select>
<insert id="insertBasePictureLocation" parameterType="BasePictureLocation">
<selectKey keyProperty="id" resultType="long" order="BEFORE">
SELECT seq_base_picture_location.NEXTVAL as id FROM DUAL
</selectKey>
insert into base_picture_location
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="picturePath != null">picture_path,</if>
<if test="pictureLocation != null">picture_location,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="picturePath != null">#{picturePath},</if>
<if test="pictureLocation != null">#{pictureLocation},</if>
</trim>
</insert>
<update id="updateBasePictureLocation" parameterType="BasePictureLocation">
update base_picture_location
<trim prefix="SET" suffixOverrides=",">
<if test="picturePath != null">picture_path = #{picturePath},</if>
<if test="pictureLocation != null">picture_location = #{pictureLocation},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBasePictureLocationById" parameterType="Long">
delete from base_picture_location where id = #{id}
</delete>
<delete id="deleteBasePictureLocationByIds" parameterType="String">
delete from base_picture_location where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>