Files
FT546MWS/ruoyi-admin/src/main/resources/mapper/bas/AgvPointMapper.xml
2026-03-19 09:05:42 +08:00

82 lines
3.4 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.bas.agvPoint.mapper.AgvPointMapper">
<resultMap type="AgvPoint" id="AgvPointResult">
<result property="id" column="id" />
<result property="station" column="station" />
<result property="type" column="type" />
<result property="remark" column="remark" />
<result property="spare1" column="spare1" />
<result property="spare2" column="spare2" />
<result property="spare3" column="spare3" />
</resultMap>
<sql id="selectAgvPointVo">
select id, station, type, remark, spare1, spare2, spare3 from agv_point
</sql>
<select id="selectAgvPointList" parameterType="AgvPoint" resultMap="AgvPointResult">
<include refid="selectAgvPointVo"/>
<where>
<if test="station != null and station != ''"> and station = #{station}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="spare1 != null and spare1 != ''"> and spare1 = #{spare1}</if>
<if test="spare2 != null and spare2 != ''"> and spare2 = #{spare2}</if>
<if test="spare3 != null and spare3 != ''"> and spare3 = #{spare3}</if>
</where>
</select>
<select id="selectAgvPointById" parameterType="String" resultMap="AgvPointResult">
<include refid="selectAgvPointVo"/>
where id = #{id}
</select>
<insert id="insertAgvPoint" parameterType="AgvPoint">
insert into agv_point
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="station != null">station,</if>
<if test="type != null">type,</if>
<if test="remark != null">remark,</if>
<if test="spare1 != null">spare1,</if>
<if test="spare2 != null">spare2,</if>
<if test="spare3 != null">spare3,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="station != null">#{station},</if>
<if test="type != null">#{type},</if>
<if test="remark != null">#{remark},</if>
<if test="spare1 != null">#{spare1},</if>
<if test="spare2 != null">#{spare2},</if>
<if test="spare3 != null">#{spare3},</if>
</trim>
</insert>
<update id="updateAgvPoint" parameterType="AgvPoint">
update agv_point
<trim prefix="SET" suffixOverrides=",">
<if test="station != null">station = #{station},</if>
<if test="type != null">type = #{type},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="spare1 != null">spare1 = #{spare1},</if>
<if test="spare2 != null">spare2 = #{spare2},</if>
<if test="spare3 != null">spare3 = #{spare3},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAgvPointById" parameterType="String">
delete from agv_point where id = #{id}
</delete>
<delete id="deleteAgvPointByIds" parameterType="String">
delete from agv_point where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>