102 lines
3.8 KiB
XML
102 lines
3.8 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.mhd.oms.domain.businessDeliveryDetailsLink.repository.mapper.BusinessDeliveryDetailsLinkMapper">
|
|
|
|
<resultMap type="com.mhd.oms.domain.businessDeliveryDetailsLink.repository.po.BusinessDeliveryDetailsLinkPO" id="BusinessDeliveryDetailsLinkResult">
|
|
<result property="id" column="id" />
|
|
<result property="createBy" column="create_by" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateBy" column="update_by" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="orderId" column="order_id" />
|
|
<result property="category" column="category" />
|
|
<result property="invoiceNumber" column="invoice_number" />
|
|
<result property="customerNumber" column="customer_number" />
|
|
<result property="deliveryName" column="delivery_name" />
|
|
<result property="box" column="box" />
|
|
<result property="bag" column="bag" />
|
|
<result property="amount" column="amount" />
|
|
</resultMap>
|
|
|
|
<sql id="selectBusinessDeliveryDetailsLinkVo">
|
|
SELECT
|
|
id,
|
|
create_by,
|
|
create_by_name,
|
|
create_time,
|
|
update_by,
|
|
update_by_name,
|
|
update_time,
|
|
del_flag,
|
|
order_id,
|
|
category,
|
|
invoice_number,
|
|
customer_number,
|
|
delivery_name,
|
|
box,
|
|
bag,
|
|
amount
|
|
FROM
|
|
business_delivery_details_link
|
|
WHERE
|
|
del_flag = 1
|
|
</sql>
|
|
|
|
<sql id="selectBusinessDeliveryDetailsLinkCondition">
|
|
<if test="id != null">
|
|
and id = #{id}
|
|
</if>
|
|
<if test="idList != null and idList.size() > 0">
|
|
and id in
|
|
<foreach collection="idList" item="id" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</if>
|
|
<if test="orderId != null">
|
|
and order_id = #{orderId}
|
|
</if>
|
|
<if test="orderIdList != null and orderIdList.size() > 0">
|
|
and order_id in
|
|
<foreach collection="orderIdList" item="orderId" open="(" separator="," close=")">
|
|
#{orderId}
|
|
</foreach>
|
|
</if>
|
|
<if test="category != null and category != ''">
|
|
and category = #{category}
|
|
</if>
|
|
<if test="invoiceNumber != null and invoiceNumber != ''">
|
|
and invoice_number = #{invoiceNumber}
|
|
</if>
|
|
<if test="customerNumber != null and customerNumber != ''">
|
|
and customer_number = #{customerNumber}
|
|
</if>
|
|
<if test="deliveryName != null and deliveryName != ''">
|
|
and delivery_name like concat('%', #{deliveryName}, '%')
|
|
</if>
|
|
<if test="box != null">
|
|
and box = #{box}
|
|
</if>
|
|
<if test="bag != null">
|
|
and bag = #{bag}
|
|
</if>
|
|
<if test="amount != null">
|
|
and amount = #{amount}
|
|
</if>
|
|
<if test="topOrganizationId != null">
|
|
and top_organization_id = #{topOrganizationId}
|
|
</if>
|
|
<if test="organizationId != null">
|
|
and organization_id = #{organizationId}
|
|
</if>
|
|
</sql>
|
|
|
|
<select id="queryList" parameterType="com.mhd.oms.domain.businessDeliveryDetailsLink.repository.todo.BusinessDeliveryDetailsLinkDO" resultMap="BusinessDeliveryDetailsLinkResult">
|
|
<include refid="selectBusinessDeliveryDetailsLinkVo"/>
|
|
<include refid="selectBusinessDeliveryDetailsLinkCondition"/>
|
|
ORDER BY create_time DESC
|
|
</select>
|
|
</mapper>
|