KwtWaybillOrderTrackMapper.xml 1.7 KB

12345678910111213141516171819202122232425262728293031323334
  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.KwtWaybillOrderTrackMapper">
  4. <resultMap id="BaseResultMap" type="com.sckw.transport.model.KwtWaybillOrderTrack">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="w_order_id" jdbcType="BIGINT" property="wOrderId" />
  7. <result column="remark" jdbcType="VARCHAR" property="remark" />
  8. <result column="status" jdbcType="INTEGER" property="status" />
  9. <result column="create_by" jdbcType="BIGINT" property="createBy" />
  10. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  11. <result column="update_by" jdbcType="BIGINT" property="updateBy" />
  12. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  13. <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
  14. </resultMap>
  15. <sql id="Base_Column_List">
  16. id, w_order_id, remark, `status`, create_by, create_time, update_by, update_time,
  17. del_flag
  18. </sql>
  19. <select id="findWaybillOrderTrack" resultType="com.sckw.transport.model.KwtWaybillOrderTrack" >
  20. select
  21. id, w_order_id wOrderId, remark, `status`, create_by createBy, create_time createTime, update_by updateBy,
  22. update_time updateTime
  23. from kwt_waybill_order_track
  24. where del_flag = 0
  25. <if test="wOrderId != null and wOrderId != ''">
  26. and w_order_id = #{wOrderId, jdbcType=BIGINT}
  27. </if>
  28. <if test="status != null and status != ''">
  29. and status = #{status, jdbcType=INTEGER}
  30. </if>
  31. order by create_time desc limit 1
  32. </select>
  33. </mapper>