KwtWaybillOrderAddressMapper.xml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.sckw.transport.dao.KwtWaybillOrderAddressMapper">
  4. <select id="findByAddress" resultType="com.sckw.transport.model.KwtWaybillOrderAddress" >
  5. select
  6. id, w_order_id wOrderId, address_type addressType, `name`, `type`, contacts, phone, city_code cityCode, city_name cityName,
  7. detail_address detailAddress, lat, lng, fence, entry_type entryType, remark, `status`, create_by createBy, create_time createTime,
  8. update_by updateBy, update_time updateTime
  9. from kwt_waybill_order_address
  10. where del_flag = 0
  11. and w_order_id = #{wOrderId, jdbcType=BIGINT}
  12. and address_type = #{addressType, jdbcType=INTEGER}
  13. </select>
  14. <select id="findByAddresses" resultType="com.sckw.transport.model.KwtWaybillOrderAddress" >
  15. select
  16. id, w_order_id wOrderId, w_subtask_id wSubtaskId, l_address_id lAddressId, address_type addressType,
  17. `name`, `type`, contacts, phone, city_code cityCode, city_name cityName, detail_address detailAddress,
  18. lat, lng, fence, entry_type entryType, plan_time planTime, entrust_amount entrustAmount, sort, remark,
  19. `status`, create_by createBy, create_time createTime, update_by updateBy, update_time updateTime
  20. from kwt_waybill_order_address
  21. where del_flag = 0
  22. and w_order_id = #{wOrderId, jdbcType=BIGINT}
  23. and address_type = #{addressType, jdbcType=INTEGER}
  24. </select>
  25. <select id="findAddressCodeList" resultType="java.lang.Integer" >
  26. SELECT
  27. DISTINCT kwoa.city_code
  28. from kwt_waybill_order kwo
  29. left join kwt_waybill_order_address kwoa on kwoa.w_order_id = kwo.id
  30. where kwo.del_flag = 0 and kwoa.del_flag = 0
  31. and kwo.ent_id = #{entId, jdbcType=BIGINT}
  32. and kwoa.address_type = #{addressType, jdbcType=INTEGER}
  33. </select>
  34. </mapper>