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

71 lines
3.9 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.WxMerchantTaxMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxMerchantTax">
  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="merchant_id" jdbcType="BIGINT" property="merchantId" />
  9. <result column="taxpayer_type" jdbcType="INTEGER" property="taxpayerType" />
  10. <result column="tax_papers_type" jdbcType="INTEGER" property="taxPapersType" />
  11. <result column="tax_papers_number" jdbcType="VARCHAR" property="taxPapersNumber" />
  12. <result column="invoice_type" jdbcType="INTEGER" property="invoiceType" />
  13. <result column="invoice_buyer" jdbcType="VARCHAR" property="invoiceBuyer" />
  14. <result column="taxpayer_identify_number" jdbcType="VARCHAR" property="taxpayerIdentifyNumber" />
  15. <result column="invoice_address_phone" jdbcType="VARCHAR" property="invoiceAddressPhone" />
  16. <result column="bank_account_number" jdbcType="VARCHAR" property="bankAccountNumber" />
  17. <result column="bank_account_person" jdbcType="VARCHAR" property="bankAccountPerson" />
  18. <result column="bank_name" jdbcType="VARCHAR" property="bankName" />
  19. <result column="bank_account" jdbcType="VARCHAR" property="bankAccount" />
  20. <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
  21. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
  22. </resultMap>
  23. <sql id="allColumns">
  24. `id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`taxpayer_type`,`tax_papers_type`,`tax_papers_number`,`invoice_type`,`invoice_buyer`,`taxpayer_identify_number`,`invoice_address_phone`,`bank_account_number`,`bank_account_person`,`bank_name`,`bank_account`,`create_date`,`update_date`
  25. </sql>
  26. <sql id="dynamicWhereConditions">
  27. where 1 = 1
  28. <if test=" null != id "> and `id` = #{id} </if>
  29. <if test=" null != tenantId and '' != tenantId">
  30. and `tenant_id` = #{tenantId}
  31. </if>
  32. <if test=" null != parentTenantId and '' != parentTenantId">
  33. and `parent_tenant_id` = #{parentTenantId}
  34. </if>
  35. <if test=" null != merchantId "> and `merchant_id` = #{merchantId} </if>
  36. <if test=" null != taxpayerType "> and `taxpayer_type` = #{taxpayerType} </if>
  37. <if test=" null != taxPapersType "> and `tax_papers_type` = #{taxPapersType} </if>
  38. <if test=" null != taxPapersNumber "> and `tax_papers_number` = #{taxPapersNumber} </if>
  39. <if test=" null != invoiceType "> and `invoice_type` = #{invoiceType} </if>
  40. <if test=" null != invoiceBuyer "> and `invoice_buyer` = #{invoiceBuyer} </if>
  41. <if test=" null != taxpayerIdentifyNumber "> and `taxpayer_identify_number` = #{taxpayerIdentifyNumber} </if>
  42. <if test=" null != invoiceAddressPhone "> and `invoice_address_phone` = #{invoiceAddressPhone} </if>
  43. <if test=" null != bankAccountNumber "> and `bank_account_number` = #{bankAccountNumber} </if>
  44. <if test=" null != bankAccountPerson "> and `bank_account_person` = #{bankAccountPerson} </if>
  45. <if test=" null != bankName "> and `bank_name` = #{bankName} </if>
  46. <if test=" null != bankAccount "> and `bank_account` = #{bankAccount} </if>
  47. <if test=" null != createDate "> and `create_date` = #{createDate} </if>
  48. <if test=" null != updateDate "> and `update_date` = #{updateDate} </if>
  49. <if test=" null != ids ">
  50. and id in
  51. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  52. #{idItem}
  53. </foreach>
  54. </if>
  55. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  56. </sql>
  57. <select id="findList" parameterType="com.iformall.domain.po.WxMerchantTax" resultMap="BaseResultMap">
  58. select <include refid="allColumns" /> from wx_merchant_tax
  59. <include refid="dynamicWhereConditions" />
  60. </select>
  61. </mapper>