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.
84 lines
3.4 KiB
XML
84 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.hw.mes.mapper.WcsPlcpointMapper">
|
|
|
|
<resultMap type="WcsPlcpoint" id="WcsPlcpointResult">
|
|
<result property="id" column="id" />
|
|
<result property="name" column="name" />
|
|
<result property="station" column="station" />
|
|
<result property="address" column="address" />
|
|
<result property="value" column="value" />
|
|
<result property="type" column="type" />
|
|
</resultMap>
|
|
|
|
<sql id="selectWcsPlcpointVo">
|
|
select id, name, station, address, value, type from wcs_plcpoint
|
|
</sql>
|
|
|
|
<select id="selectWcsPlcpointList" parameterType="WcsPlcpoint" resultMap="WcsPlcpointResult">
|
|
<include refid="selectWcsPlcpointVo"/>
|
|
<where>
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
<if test="station != null and station != ''"> and station = #{station}</if>
|
|
<if test="address != null and address != ''"> and address = #{address}</if>
|
|
<if test="value != null and value != ''"> and value = #{value}</if>
|
|
<if test="type != null and type != ''"> and type = #{type}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectWcsPlcpointById" parameterType="Long" resultMap="WcsPlcpointResult">
|
|
<include refid="selectWcsPlcpointVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertWcsPlcpoint" parameterType="WcsPlcpoint">
|
|
insert into wcs_plcpoint
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">id,</if>
|
|
<if test="name != null">name,</if>
|
|
<if test="station != null">station,</if>
|
|
<if test="address != null">address,</if>
|
|
<if test="value != null">value,</if>
|
|
<if test="type != null">type,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">#{id},</if>
|
|
<if test="name != null">#{name},</if>
|
|
<if test="station != null">#{station},</if>
|
|
<if test="address != null">#{address},</if>
|
|
<if test="value != null">#{value},</if>
|
|
<if test="type != null">#{type},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateWcsPlcpoint" parameterType="WcsPlcpoint">
|
|
update wcs_plcpoint
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="name != null">name = #{name},</if>
|
|
<if test="station != null">station = #{station},</if>
|
|
<if test="address != null">address = #{address},</if>
|
|
<if test="value != null">value = #{value},</if>
|
|
<if test="type != null">type = #{type},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteWcsPlcpointById" parameterType="Long">
|
|
delete from wcs_plcpoint where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteWcsPlcpointByIds" parameterType="String">
|
|
delete from wcs_plcpoint where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
|
|
<select id="selectElevatorStatusList" parameterType="WcsPlcpoint" resultMap="WcsPlcpointResult">
|
|
<include refid="selectWcsPlcpointVo"/>
|
|
where id in (82,83,84)
|
|
</select>
|
|
</mapper> |