Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

73 строки
2.4 KiB

  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.iformall.mapper.PosOrderMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.PosOrder">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="pos_order_no" jdbcType="VARCHAR" property="posOrderNo" />
  8. <result column="type" jdbcType="INTEGER" property="type" />
  9. <result column="order_status" jdbcType="INTEGER" property="orderStatus" />
  10. <result column="bu_user_id" jdbcType="BIGINT" property="buUserId" />
  11. <result column="payment_type" jdbcType="INTEGER" property="paymentType" />
  12. <result column="payment" jdbcType="INTEGER" property="payment" />
  13. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  14. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
  15. </resultMap>
  16. <sql id="allColumns">
  17. `id`,`tenant_id`,`pos_order_no`,`type`,`order_status`,`bu_user_id`,`create_date`,`update_date`
  18. </sql>
  19. <sql id="dynamicWhereConditions">
  20. where 1 = 1
  21. <if test=" null != id ">
  22. and `id` = #{id}
  23. </if>
  24. <if test=" null != tenantId ">
  25. and `tenant_id` like concat('%', #{tenantId},'%')
  26. </if>
  27. <if test=" null != posOrderNo ">
  28. and `pos_order_no` like concat('%', #{posOrderNo},'%')
  29. </if>
  30. <if test=" null != type ">
  31. and `type` = #{type}
  32. </if>
  33. <if test=" null != orderStatus ">
  34. and `order_status` = #{orderStatus}
  35. </if>
  36. <if test=" null != buUserId ">
  37. and `bu_user_id` = #{buUserId}
  38. </if>
  39. <if test=" null != paymentType ">
  40. and `payment_type` = #{paymentType}
  41. </if>
  42. <if test=" null != payment ">
  43. and `payment` = #{payment}
  44. </if>
  45. <if test=" null != createDate ">
  46. and `create_date` = #{createDate}
  47. </if>
  48. <if test=" null != updateDate ">
  49. and `update_date` = #{updateDate}
  50. </if>
  51. <if test=" null != ids ">
  52. and id in
  53. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  54. #{idItem}
  55. </foreach>
  56. </if>
  57. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  58. </sql>
  59. <select id="findList" parameterType="com.iformall.domain.po.PosOrder" resultMap="BaseResultMap">
  60. select <include refid="allColumns" /> from pos_order
  61. <include refid="dynamicWhereConditions" />
  62. </select>
  63. </mapper>