25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

61 lines
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.WxFinanceSetoffBillMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxFinanceSetoffBill">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
  8. <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
  9. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
  10. <result column="bill_id" jdbcType="BIGINT" property="billId"/>
  11. <result column="bill_type" jdbcType="INTEGER" property="billType"/>
  12. <result column="fees_id" jdbcType="BIGINT" property="feesId"/>
  13. <result column="pay_way" jdbcType="BIGINT" property="payWay"/>
  14. <result column="receive_id" jdbcType="BIGINT" property="receiveId"/>
  15. </resultMap>
  16. <sql id="allColumns">
  17. `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`bill_id`,`bill_type`,`fees_id`,
  18. `pay_way`,`receive_id`
  19. </sql>
  20. <sql id="dynamicWhereConditions">
  21. where 1=1
  22. <if test=" null != id ">and `id` = #{id}</if>
  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 != billId ">and `bill_id` = #{billId}</if>
  30. <if test=" null != billType ">and `bill_type` = #{billType}</if>
  31. <if test=" null != feesId ">and `fees_id` = #{feesId}</if>
  32. <if test=" null != payWay ">and `pay_way` = #{payWay}</if>
  33. <if test=" null != receiveId ">and `receive_id` = #{receiveId}</if>
  34. <if test=" null != ids ">
  35. and id in
  36. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  37. #{idItem}
  38. </foreach>
  39. </if>
  40. <if test=" null != sortColumns">order by ${sortColumns}</if>
  41. </sql>
  42. <select id="findList" parameterType="com.iformall.domain.po.WxFinanceReceiveBill" resultMap="BaseResultMap">
  43. select
  44. <include refid="allColumns"/>
  45. from wx_finance_receive_bill
  46. <include refid="dynamicWhereConditions"/>
  47. </select>
  48. <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap">
  49. select
  50. <include refid="allColumns"/>
  51. from wx_finance_receive_bill where id = #{id} and `tenant_id` = #{tenantId}
  52. </select>
  53. </mapper>