90 lines
4.3 KiB
XML
90 lines
4.3 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.xdadan.erp.emis.mapper.EmisWaybillOtherMapper">
|
||
|
|
|
||
|
|
<resultMap type="EmisWaybillOther" id="EmisWaybillOtherResult" extends="com.xdadan.erp.emis.mapper.EmisBaseMapper.EmisBaseResult">
|
||
|
|
<result property="id" column="id" />
|
||
|
|
<result property="waybillId" column="waybill_id" />
|
||
|
|
<result property="billCode" column="bill_code" />
|
||
|
|
<result property="salesSupport" column="sales_support" />
|
||
|
|
</resultMap>
|
||
|
|
|
||
|
|
<sql id="selectEmisWaybillOtherVo">
|
||
|
|
select id, waybill_id, bill_code, sales_support, del_flag, create_by, create_time, update_by, update_time, remark
|
||
|
|
from emis_waybill_other
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<select id="selectEmisWaybillOtherById" parameterType="Long" resultMap="EmisWaybillOtherResult">
|
||
|
|
<include refid="selectEmisWaybillOtherVo"/>
|
||
|
|
where id = #{id} and del_flag = '0'
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectEmisWaybillOtherByWaybillId" parameterType="Long" resultMap="EmisWaybillOtherResult">
|
||
|
|
<include refid="selectEmisWaybillOtherVo"/>
|
||
|
|
where waybill_id = #{waybillId} and del_flag = '0'
|
||
|
|
limit 1
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id="selectEmisWaybillOtherByBillCode" parameterType="String" resultMap="EmisWaybillOtherResult">
|
||
|
|
<include refid="selectEmisWaybillOtherVo"/>
|
||
|
|
where bill_code = #{billCode} and del_flag = '0'
|
||
|
|
limit 1
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<insert id="insertEmisWaybillOther" parameterType="EmisWaybillOther" useGeneratedKeys="true" keyProperty="id">
|
||
|
|
insert into emis_waybill_other
|
||
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||
|
|
<if test="waybillId != null">waybill_id,</if>
|
||
|
|
<if test="billCode != null and billCode != ''">bill_code,</if>
|
||
|
|
<if test="salesSupport != null and salesSupport != ''">sales_support,</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="waybillId != null">#{waybillId},</if>
|
||
|
|
<if test="billCode != null and billCode != ''">#{billCode},</if>
|
||
|
|
<if test="salesSupport != null and salesSupport != ''">#{salesSupport},</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="updateEmisWaybillOther" parameterType="EmisWaybillOther">
|
||
|
|
update emis_waybill_other
|
||
|
|
<trim prefix="SET" suffixOverrides=",">
|
||
|
|
<if test="waybillId != null">waybill_id = #{waybillId},</if>
|
||
|
|
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
|
||
|
|
<if test="salesSupport != null">sales_support = #{salesSupport},</if>
|
||
|
|
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||
|
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||
|
|
<if test="remark != null">remark = #{remark},</if>
|
||
|
|
</trim>
|
||
|
|
where id = #{id}
|
||
|
|
</update>
|
||
|
|
|
||
|
|
<delete id="deleteEmisWaybillOtherById" parameterType="Long">
|
||
|
|
update emis_waybill_other set del_flag = '1' where id = #{id}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteEmisWaybillOtherByWaybillId" parameterType="Long">
|
||
|
|
update emis_waybill_other set del_flag = '1' where waybill_id = #{waybillId}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
<delete id="deleteEmisWaybillOtherByBillCode" parameterType="String">
|
||
|
|
update emis_waybill_other set del_flag = '1' where bill_code = #{billCode}
|
||
|
|
</delete>
|
||
|
|
|
||
|
|
</mapper>
|
||
|
|
|