TbIndentSmsSendLogMapper.xml 1.3 KB

12345678910111213141516171819202122232425262728293031
  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.sqx.modules.errand.dao.TbIndentSmsSendLogDao">
  4. <select id="logPage" resultType="com.sqx.modules.errand.IndentSmsSendLogVO">
  5. select
  6. issl.*, o.delivery_imgs as imgs
  7. from
  8. tb_indent_sms_send_log issl
  9. left join tb_indent i on i.indent_id = issl.order_id
  10. left join tb_order o on o.order_id = i.order_id
  11. <where>
  12. <if test="query.orderId != null">
  13. and issl.order_id = #{query.orderId}
  14. </if>
  15. <if test="query.successFlag != null and query.successFlag != ''">
  16. and issl.success_flag = #{query.successFlag}
  17. </if>
  18. <if test="query.sendTo != null and query.sendTo != ''">
  19. and issl.send_to = #{query.sendTo}
  20. </if>
  21. <if test="query.startTime != null">
  22. and issl.send_time >= #{query.orderId}
  23. </if>
  24. <if test="query.endTime != null">
  25. and issl.send_time <![CDATA[<=]]> #{query.orderId}
  26. </if>
  27. </where>
  28. order by issl.send_time desc
  29. </select>
  30. </mapper>