| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?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.sckw.transport.dao.KwtWaybillOrderAddressMapper">
- <select id="findByAddress" resultType="com.sckw.transport.model.KwtWaybillOrderAddress" >
- select
- id, w_order_id wOrderId, address_type addressType, `name`, `type`, contacts, phone, city_code cityCode, city_name cityName,
- detail_address detailAddress, lat, lng, fence, entry_type entryType, remark, `status`, create_by createBy, create_time createTime,
- update_by updateBy, update_time updateTime
- from kwt_waybill_order_address
- where del_flag = 0
- and w_order_id = #{wOrderId, jdbcType=BIGINT}
- and address_type = #{addressType, jdbcType=INTEGER}
- </select>
- <select id="findByAddresses" resultType="com.sckw.transport.model.KwtWaybillOrderAddress" >
- select
- id, w_order_id wOrderId, w_subtask_id wSubtaskId, l_address_id lAddressId, address_type addressType,
- `name`, `type`, contacts, phone, city_code cityCode, city_name cityName, detail_address detailAddress,
- lat, lng, fence, entry_type entryType, plan_time planTime, entrust_amount entrustAmount, sort, remark,
- `status`, create_by createBy, create_time createTime, update_by updateBy, update_time updateTime
- from kwt_waybill_order_address
- where del_flag = 0
- and w_order_id = #{wOrderId, jdbcType=BIGINT}
- <if test="addressType != null and addressType != ''">
- and address_type = #{addressType, jdbcType=BIGINT}
- </if>
- </select>
- <select id="findBySubtaskId" resultType="com.sckw.transport.model.KwtWaybillOrderAddress" >
- select
- id, w_order_id wOrderId, w_subtask_id wSubtaskId, l_address_id lAddressId, address_type addressType,
- `name`, `type`, contacts, phone, city_code cityCode, city_name cityName, detail_address detailAddress,
- lat, lng, fence, entry_type entryType, plan_time planTime, entrust_amount entrustAmount, sort, remark,
- `status`, create_by createBy, create_time createTime, update_by updateBy, update_time updateTime
- from kwt_waybill_order_address
- where del_flag = 0
- and w_subtask_id = #{wSubtaskId, jdbcType=BIGINT}
- <if test="addressType != null and addressType != ''">
- and address_type = #{addressType, jdbcType=BIGINT}
- </if>
- </select>
- <select id="findByLAddressIds" resultType="com.sckw.transport.model.KwtWaybillOrderAddress" >
- select
- id, w_order_id wOrderId, w_subtask_id wSubtaskId, l_address_id lAddressId, address_type addressType,
- `name`, `type`, contacts, phone, city_code cityCode, city_name cityName, detail_address detailAddress,
- lat, lng, fence, entry_type entryType, plan_time planTime, entrust_amount entrustAmount, sort, remark,
- `status`, create_by createBy, create_time createTime, update_by updateBy, update_time updateTime
- from kwt_waybill_order_address
- where del_flag = 0
- <if test="lAddressIds != null and lAddressIds.size() > 0">
- AND l_address_id IN
- <foreach collection="lAddressIds" item="item" open="(" close=")" separator=",">
- #{item}
- </foreach>
- </if>
- </select>
- <select id="findAddressCodeList" resultType="java.lang.Integer" >
- SELECT
- DISTINCT kwoa.city_code
- from kwt_waybill_order kwo
- left join kwt_waybill_order_address kwoa on kwoa.w_order_id = kwo.id
- where kwo.del_flag = 0 and kwoa.del_flag = 0
- and kwo.ent_id = #{entId, jdbcType=BIGINT}
- and kwoa.address_type = #{addressType, jdbcType=INTEGER}
- </select>
- </mapper>
|