ExpressOrderMapper.xml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  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.zbkj.service.dao.ExpressOrderDao">
  4. <select id="findFrontList" resultType="com.zbkj.common.model.express.ExpressOrder" parameterType="Map">
  5. select * from eb_express_order
  6. where
  7. uid = #{userId}
  8. <if test="status != null and status &gt;= 0">
  9. <choose>
  10. <when test="status == 1">
  11. and `status` in (1,2)
  12. </when>
  13. <when test="status == 3">
  14. and `status` = 3
  15. </when>
  16. <otherwise>
  17. and `status` = #{status}
  18. </otherwise>
  19. </choose>
  20. </if>
  21. and is_user_del = 0
  22. and is_del = 0
  23. <if test="keywords != null and keywords !='' ">
  24. and (order_no like CONCAT('%',#{keywords},'%')
  25. or
  26. order_no in (select order_no from eb_express_order_detail where (pick_up_code like CONCAT('%',#{keywords},'%')
  27. or express_no like CONCAT('%',#{keywords},'%')
  28. or express_company like CONCAT('%',#{keywords},'%')
  29. or post_name like CONCAT('%',#{keywords},'%')
  30. ) ))
  31. </if>
  32. order by id desc
  33. </select>
  34. </mapper>