Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 
 
 

111 řádky
3.1 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.simple.mapper.WxOrderMapper">
  4. <resultMap id="BaseResultMap" type="com.simple.domain.po.WxOrder">
  5. <id column="id" jdbcType="BIGINT" property="id" />
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
  7. <result column="coupon_id" jdbcType="BIGINT" property="couponId" />
  8. <result column="c_user_id" jdbcType="BIGINT" property="cUserId" />
  9. <result column="payment" jdbcType="DECIMAL" property="payment" />
  10. <result column="payment_time" jdbcType="TIMESTAMP" property="paymentTime" />
  11. <result column="status" jdbcType="INTEGER" property="status" />
  12. <result column="coupon_status" jdbcType="INTEGER" property="couponStatus" />
  13. <result column="validDate" jdbcType="TIMESTAMP" property="validDate" />
  14. <result column="refund" jdbcType="INTEGER" property="refund" />
  15. <result column="refund_time" jdbcType="TIMESTAMP" property="refundTime" />
  16. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  17. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
  18. </resultMap>
  19. <sql id="allColumns">
  20. `id`,`tenant_id`,`coupon_id`,`c_user_id`,`payment`,`payment_time`,`status`,`coupon_status`,`validDate`,`refund`,`refund_time`,`create_date`,`update_date`
  21. </sql>
  22. <sql id="dynamicWhereConditions">
  23. where 1 = 1
  24. <if test=" null != id ">
  25. and `id` = #{id}
  26. </if>
  27. <if test=" null != tenantId ">
  28. and `tenant_id` like concat('%', #{tenantId},'%')
  29. </if>
  30. <if test=" null != couponId ">
  31. and `coupon_id` = #{couponId}
  32. </if>
  33. <if test=" null != cUserId ">
  34. and `c_user_id` = #{cUserId}
  35. </if>
  36. <if test=" null != payment ">
  37. and `payment` = #{payment}
  38. </if>
  39. <if test=" null != paymentTime ">
  40. and `payment_time` = #{paymentTime}
  41. </if>
  42. <if test=" null != status ">
  43. and `status` = #{status}
  44. </if>
  45. <if test=" null != couponStatus ">
  46. and `coupon_status` = #{couponStatus}
  47. </if>
  48. <if test=" null != validDate ">
  49. and `validDate` = #{validDate}
  50. </if>
  51. <if test=" null != refund ">
  52. and `refund` = #{refund}
  53. </if>
  54. <if test=" null != refundTime ">
  55. and `refund_time` = #{refundTime}
  56. </if>
  57. <if test=" null != createDate ">
  58. and `create_date` = #{createDate}
  59. </if>
  60. <if test=" null != updateDate ">
  61. and `update_date` = #{updateDate}
  62. </if>
  63. <if test=" null != ids ">
  64. and id in
  65. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  66. #{idItem}
  67. </foreach>
  68. </if>
  69. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  70. </sql>
  71. <select id="findList" parameterType="com.simple.domain.po.WxOrder" resultMap="BaseResultMap">
  72. select <include refid="allColumns" /> from wx_order
  73. <include refid="dynamicWhereConditions" />
  74. </select>
  75. </mapper>