<?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.buss.mapper.DmDdConfigMapper">
|
|
<resultMap type="DmDdConfig" id="DmDdConfigResult">
|
<id property="PKID" column="PKID" />
|
<result property="TYPE" column="TYPE" />
|
<result property="UNIT" column="UNIT" />
|
<result property="shipType" column="SHIP_TYPE" />
|
<result property="TIME" column="TIME" />
|
</resultMap>
|
|
<sql id="selectDmDdConfigVo">
|
select PKID, TYPE, UNIT, SHIP_TYPE, TIME from dm_dd_config
|
</sql>
|
|
<select id="selectDmDdConfigList" parameterType="DmDdConfig" resultMap="DmDdConfigResult">
|
<include refid="selectDmDdConfigVo"/>
|
<where>
|
<if test="PKID != null "> and PKID = #{PKID}</if>
|
<if test="TYPE != null and TYPE != ''"> and TYPE = #{TYPE}</if>
|
<if test="UNIT != null and UNIT != ''"> and UNIT = #{UNIT}</if>
|
<if test="shipType != null and shipType != ''"> and SHIP_TYPE = #{shipType}</if>
|
<if test="TIME != null "> and TIME = #{TIME}</if>
|
</where>
|
</select>
|
|
<select id="selectDmDdConfigByPKID" parameterType="Long" resultMap="DmDdConfigResult">
|
<include refid="selectDmDdConfigVo"/>
|
where PKID = #{PKID}
|
</select>
|
|
<insert id="insertDmDdConfig" parameterType="DmDdConfig">
|
insert into dm_dd_config
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="TYPE != null">TYPE,</if>
|
<if test="UNIT != null">UNIT,</if>
|
<if test="shipType != null">SHIP_TYPE,</if>
|
<if test="TIME != null">TIME,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="TYPE != null">#{TYPE},</if>
|
<if test="UNIT != null">#{UNIT},</if>
|
<if test="shipType != null">#{shipType},</if>
|
<if test="TIME != null">#{TIME},</if>
|
</trim>
|
</insert>
|
|
<update id="updateDmDdConfig" parameterType="DmDdConfig">
|
update dm_dd_config
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="TYPE != null">TYPE = #{TYPE},</if>
|
<if test="UNIT != null">UNIT = #{UNIT},</if>
|
<if test="shipType != null">SHIP_TYPE = #{shipType},</if>
|
<if test="TIME != null">TIME = #{TIME},</if>
|
</trim>
|
where PKID = #{PKID}
|
</update>
|
|
<delete id="deleteDmDdConfigByPKID" parameterType="Long">
|
delete from dm_dd_config where PKID = #{PKID}
|
</delete>
|
|
<delete id="deleteDmDdConfigByPKIDs" parameterType="String">
|
delete from dm_dd_config where PKID in
|
<foreach item="PKID" collection="array" open="(" separator="," close=")">
|
#{PKID}
|
</foreach>
|
</delete>
|
|
</mapper>
|