| 1234567891011121314151617181920212223242526272829303132333435363738 |
- <?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}
- and address_type = #{addressType, jdbcType=INTEGER}
- </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>
|