Files
nanguangszwlback/mhd_oms/src/main/resources/mapper/deliveryInfo/DeliveryInfoMapper.xml
T
2026-01-19 15:20:20 +08:00

70 lines
3.4 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.deliveryInfo.repository.mapper.DeliveryInfoMapper">
<resultMap type="com.mhd.oms.domain.deliveryInfo.repository.po.DeliveryInfoPO" id="DeliveryInfoResult">
<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="topOrganizationId" column="top_organization_id" />
<result property="organizationId" column="organization_id" />
<result property="organizationName" column="organization_name" />
<result property="orderId" column="order_id" />
<result property="consigner" column="consigner" />
<result property="consignerPhone" column="consigner_phone" />
<result property="consignerAreaCode" column="consigner_area_code" />
<result property="consignerArea" column="consigner_area" />
<result property="consignerAddress" column="consigner_address" />
<result property="saddressLatLon" column="saddress_lat_lon" />
</resultMap>
<sql id="selectDeliveryInfoPo">
select id, create_by, create_time, update_by, update_time, del_flag, top_organization_id, organization_id, organization_name, order_id, consigner, consigner_phone, consigner_area_code, consigner_area, consigner_address, saddress_lat_lon from oms_delivery_info
</sql>
<sql id="selectDeliveryInfoPo1">
<where>
<if test="topOrganizationId != null ">
and top_organization_id = #{topOrganizationId}
</if>
<if test="organizationId != null ">
and organization_id = #{organizationId}
</if>
<if test="organizationName != null and organizationName != ''">
and organization_name like concat('%', #{organizationName}, '%')
</if>
<if test="orderId != null ">
and order_id = #{orderId}
</if>
<if test="consigner != null and consigner != ''">
and consigner = #{consigner}
</if>
<if test="consignerPhone != null and consignerPhone != ''">
and consigner_phone = #{consignerPhone}
</if>
<if test="consignerAreaCode != null and consignerAreaCode != ''">
and consigner_area_code = #{consignerAreaCode}
</if>
<if test="consignerArea != null and consignerArea != ''">
and consigner_area = #{consignerArea}
</if>
<if test="consignerAddress != null and consignerAddress != ''">
and consigner_address = #{consignerAddress}
</if>
<if test="saddressLatLon != null and saddressLatLon != ''">
and saddress_lat_lon = #{saddressLatLon}
</if>
</where>
</sql>
<select id="queryList" parameterType="com.mhd.oms.domain.deliveryInfo.repository.todo.DeliveryInfoDO" resultMap="DeliveryInfoResult">
<include refid="selectDeliveryInfoPo"/>
<include refid="selectDeliveryInfoPo1"/>
</select>
</mapper>