emis-service/emis-biz/src/main/resources/mapper/EmisTmsSiteBatchLoadingMapper.xml

96 lines
5.3 KiB
XML
Raw Normal View History

2024-03-01 06:47:57 +00:00
<?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.xdadan.erp.emis.mapper.EmisTmsSiteBatchLoadingMapper">
2024-06-02 02:57:46 +00:00
<resultMap type="EmisTmsSiteBatchLoading" id="EmisTmsSiteBatchLoadingResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
2024-03-01 06:47:57 +00:00
<result property="id" column="id" />
<result property="batchId" column="batch_id" />
<result property="posNo" column="pos_no" />
<result property="posDesc" column="pos_desc" />
2024-06-02 02:57:46 +00:00
2024-03-01 06:47:57 +00:00
</resultMap>
<sql id="selectEmisTmsSiteBatchLoadingVo">
select id, batch_id, pos_no, pos_desc, del_flag, create_by, create_time, update_by, update_time, remark from emis_tms_site_batch_loading
</sql>
<select id="selectEmisTmsSiteBatchLoadingList" parameterType="EmisTmsSiteBatchLoading" resultMap="EmisTmsSiteBatchLoadingResult">
<include refid="selectEmisTmsSiteBatchLoadingVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="batchId != null "> and batch_id = #{batchId}</if>
<if test="posNo != null and posNo != ''"> and pos_no like concat('%', #{posNo}, '%')</if>
<if test="posDesc != null and posDesc != ''"> and pos_desc like concat('%', #{posDesc}, '%')</if>
<if test="delFlag != null and delFlag != ''"> and del_flag like concat('%', #{delFlag}, '%')</if>
<if test="createBy != null and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
<if test="updateBy != null and updateBy != ''"> and update_by like concat('%', #{updateBy}, '%')</if>
<if test="updateTime != null "> and update_time = #{updateTime}</if>
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
</where>
order by create_time desc
</select>
<select id="selectEmisTmsSiteBatchLoadingById" parameterType="Long" resultMap="EmisTmsSiteBatchLoadingResult">
select id, batch_id, pos_no, pos_desc, del_flag, create_by, create_time, update_by, update_time, remark
from emis_tms_site_batch_loading a
where a.id = #{id}
</select>
<insert id="insertEmisTmsSiteBatchLoading" parameterType="EmisTmsSiteBatchLoading">
insert into emis_tms_site_batch_loading
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="batchId != null">batch_id,</if>
<if test="posNo != null and posNo != ''">pos_no,</if>
<if test="posDesc != null and posDesc != ''">pos_desc,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null and updateBy != ''">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null and remark != ''">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="batchId != null">#{batchId},</if>
<if test="posNo != null and posNo != ''">#{posNo},</if>
<if test="posDesc != null and posDesc != ''">#{posDesc},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null and remark != ''">#{remark},</if>
</trim>
</insert>
<update id="updateEmisTmsSiteBatchLoading" parameterType="EmisTmsSiteBatchLoading">
update emis_tms_site_batch_loading
<trim prefix="SET" suffixOverrides=",">
<if test="batchId != null">batch_id = #{batchId},</if>
<if test="posNo != null and posNo != ''">pos_no = #{posNo},</if>
<if test="posDesc != null and posDesc != ''">pos_desc = #{posDesc},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEmisTmsSiteBatchLoadingById" parameterType="Long">
delete from emis_tms_site_batch_loading where id = #{id}
</delete>
<delete id="deleteEmisTmsSiteBatchLoadingByIds" parameterType="String">
delete from emis_tms_site_batch_loading where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>