<?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.sy.mapper.ArdTankLoadLogMapper">
|
|
<resultMap type="ArdTankLoadLog" id="ArdTankLoadLogResult">
|
<result property="id" column="id" />
|
<result property="carId" column="car_id" />
|
<result property="wallId" column="wall_id" />
|
<result property="beginTime" column="begin_time" />
|
<result property="endTime" column="end_time" />
|
</resultMap>
|
|
<sql id="selectArdTankLoadLogVo">
|
select id, car_id, wall_id, begin_time, end_time from ard_tank_load_log
|
</sql>
|
|
<select id="selectArdTankLoadLogList" parameterType="ArdTankLoadLog" resultMap="ArdTankLoadLogResult">
|
<include refid="selectArdTankLoadLogVo"/>
|
<where>
|
<if test="carId != null and carId != ''"> and car_id = #{carId}</if>
|
<if test="wallId != null and wallId != ''"> and wall_id = #{wallId}</if>
|
<if test="beginTime != null and beginTime != ''"> and begin_time = #{beginTime}</if>
|
<if test="endTime != null and endTime != ''"> and end_time = #{endTime}</if>
|
</where>
|
</select>
|
|
<select id="selectArdTankLoadLogById" parameterType="String" resultMap="ArdTankLoadLogResult">
|
<include refid="selectArdTankLoadLogVo"/>
|
where id = #{id}
|
</select>
|
|
<insert id="insertArdTankLoadLog" parameterType="ArdTankLoadLog">
|
insert into ard_tank_load_log
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">id,</if>
|
<if test="carId != null">car_id,</if>
|
<if test="wallId != null">wall_id,</if>
|
<if test="beginTime != null">begin_time,</if>
|
<if test="endTime != null">end_time,</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id},</if>
|
<if test="carId != null">#{carId},</if>
|
<if test="wallId != null">#{wallId},</if>
|
<if test="beginTime != null">#{beginTime},</if>
|
<if test="endTime != null">#{endTime},</if>
|
</trim>
|
</insert>
|
|
<update id="updateArdTankLoadLog" parameterType="ArdTankLoadLog">
|
update ard_tank_load_log
|
<trim prefix="SET" suffixOverrides=",">
|
<if test="carId != null">car_id = #{carId},</if>
|
<if test="wallId != null">wall_id = #{wallId},</if>
|
<if test="beginTime != null">begin_time = #{beginTime},</if>
|
<if test="endTime != null">end_time = #{endTime},</if>
|
</trim>
|
where id = #{id}
|
</update>
|
|
<delete id="deleteArdTankLoadLogById" parameterType="String">
|
delete from ard_tank_load_log where id = #{id}
|
</delete>
|
|
<delete id="deleteArdTankLoadLogByIds" parameterType="String">
|
delete from ard_tank_load_log where id in
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
#{id}
|
</foreach>
|
</delete>
|
|
<select id="selectArdTankLoadLogByCarIdAndWallIdAndEndTimeIsNull" parameterType="java.lang.String" resultMap="ArdTankLoadLogResult">
|
select * from ard_tank_load_log atll where atll.car_id = #{carId} and atll.wall_id = #{wallId}
|
and atll.end_time is null
|
</select>
|
|
<select id="selectArdTankLoadLogByCarIdAndEndTimeIsNull" parameterType="java.lang.String" resultMap="ArdTankLoadLogResult">
|
select * from ard_tank_load_log atll where atll.car_id = #{carId} and atll.end_time is null
|
</select>
|
|
<delete id="deleteArdTankLoadLogByCarId" parameterType="java.lang.String">
|
delete from ard_tank_load_log atll where atll.car_id = #{carId}
|
</delete>
|
|
<select id="selectArdTankLoadLogByCarIdAndEndTimeIsNotNull" parameterType="java.lang.String" resultMap="ArdTankLoadLogResult">
|
select * from ard_tank_load_log atll where atll.car_id = #{carId} and atll.end_time is not null
|
</select>
|
|
<delete id="deleteArdTankLoadLogByEndTime" >
|
delete from ard_tank_load_log atll where atll.end_time is not null
|
</delete>
|
</mapper>
|