后台服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

WxPrepaymentMapper.xml 2.7 KiB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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.WxPrepaymentMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxPrepayment">
  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="last_pay_type" property="lastPayType"/>
  10. <result column="last_pay_way" property="lastPayWay"/>
  11. <result column="last_pay_amount" property="lastPayAmount"/>
  12. <result column="remain_amount" property="remainAmount"/>
  13. <result column="total_amount" property="totalAmount"/>
  14. <result column="remarks" property="remarks"/>
  15. <result column="operation_type" property="operationType"/>
  16. <result column="operator" property="operator"/>
  17. <result column="create_time" property="createTime"/>
  18. <result column="update_time" property="updateTime"/>
  19. <result column="merchant_name" property="merchantName"/>
  20. </resultMap>
  21. <sql id="allColumns">
  22. p.`id`,p.`tenant_id`,p.`parent_tenant_id`,p.`merchant_id`,p.`last_pay_way`,p.`last_pay_type`,p.`last_pay_amount`,p.`remain_amount`,p.`total_amount` ,p.`remarks`,p.`operation_type`,p.`operator`,
  23. p.`create_time`,p.`update_time`,m.`name` merchant_name
  24. </sql>
  25. <sql id="dynamicWhereConditions">
  26. where 1 = 1
  27. <if test=" null != tenantId and '' != tenantId">
  28. and p.`tenant_id` = #{tenantId}
  29. </if>
  30. <if test=" null != parentTenantId and '' != parentTenantId">
  31. and p.`parent_tenant_id` = #{parentTenantId}
  32. </if>
  33. <if test=" null != id ">
  34. and p.`id` = #{id}
  35. </if>
  36. <if test=" null != merchantId ">
  37. and p.`merchant_id` = #{merchantId}
  38. </if>
  39. <if test=" null != lastPayType ">
  40. and p.`last_pay_type` = #{lastPayType}
  41. </if>
  42. <if test=" null != lastPayWay ">
  43. and p.`last_pay_way` = #{lastPayWay}
  44. </if>
  45. <if test=" null != operationType ">
  46. and p.`operation_type` = #{operationType}
  47. </if>
  48. <if test=" null != merchantName and '' != merchantName">
  49. and m.`name` like concat('%',#{merchantName},'%')
  50. </if>
  51. <if test=" null != ids ">
  52. and p.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.WxPrepayment" resultMap="BaseResultMap">
  60. select
  61. <include refid="allColumns"/>
  62. from wx_prepayment p inner join wx_merchant m on p.merchant_id=m.id
  63. <include refid="dynamicWhereConditions"/>
  64. </select>
  65. </mapper>