后台服务
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

68 wiersze
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.WxPrepaymentHistoryMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxPrepaymentHistory">
  5. <id column="id" property="id"/>
  6. <result column="tenant_id" property="tenantId"/>
  7. <result column="parent_tenant_id" property="parentTenantId"/>
  8. <result column="merchant_id" property="merchantId"/>
  9. <result column="pay_type" property="payType"/>
  10. <result column="pay_way" property="payWay"/>
  11. <result column="amount_detail" property="amountDetail"/>
  12. <result column="remain_amount" property="remainAmount"/>
  13. <result column="operation_type" property="operationType"/>
  14. <result column="operator" property="operator"/>
  15. <result column="create_time" property="createTime"/>
  16. <result column="merchant_name" property="merchantName"/>
  17. </resultMap>
  18. <sql id="allColumns">
  19. p.`id`,p.`tenant_id`,p.`parent_tenant_id`,p.`merchant_id`,p.`pay_way`,p.`pay_type`,p.`amount_detail`,p.`remain_amount`,p.`operation_type`,p.`operator`,p.`create_time`,m.`name` merchant_name
  20. </sql>
  21. <sql id="dynamicWhereConditions">
  22. where 1 = 1
  23. <if test=" null != tenantId and '' != tenantId">
  24. and `tenant_id` = #{tenantId}
  25. </if>
  26. <if test=" null != parentTenantId and '' != parentTenantId">
  27. and `parent_tenant_id` = #{parentTenantId}
  28. </if>
  29. <if test=" null != id ">
  30. and p.`id` = #{id}
  31. </if>
  32. <if test=" null != merchantId ">
  33. and p.`merchant_id` = #{merchantId}
  34. </if>
  35. <if test=" null != payType ">
  36. and p.`pay_type` = #{payType}
  37. </if>
  38. <if test=" null != payWay ">
  39. and p.`pay_way` = #{payWay}
  40. </if>
  41. <if test=" null != operationType ">
  42. and p.`operation_type` = #{operationType}
  43. </if>
  44. <if test=" null != merchantName and '' != merchantName">
  45. and m.`name` like concat('%',#{merchantName},'%')
  46. </if>
  47. <if test=" null != ids ">
  48. and p.id in
  49. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  50. #{idItem}
  51. </foreach>
  52. </if>
  53. <if test=" null != sortColumns">order by ${sortColumns}</if>
  54. </sql>
  55. <select id="findList" parameterType="com.iformall.domain.po.WxPrepayment" resultMap="BaseResultMap">
  56. select
  57. <include refid="allColumns"/>
  58. from wx_prepayment_history p inner join wx_merchant m on p.merchant_id=m.id
  59. <include refid="dynamicWhereConditions"/>
  60. </select>
  61. </mapper>