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

124 lines
6.6 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.WxSettleMerchantMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxSettleMerchant">
  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_date" jdbcType="TIMESTAMP" property="createDate" />
  9. <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
  10. <result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
  11. <result column="begin_time" jdbcType="TIMESTAMP" property="beginTime" />
  12. <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
  13. <result column="total_money" jdbcType="DECIMAL" property="totalMoney" />
  14. <result column="actual_money" jdbcType="DECIMAL" property="actualMoney" />
  15. <result column="card_sale_money" jdbcType="DECIMAL" property="cardSaleMoney" />
  16. <result column="card_rate" jdbcType="DECIMAL" property="cardRate" />
  17. <result column="card_money" jdbcType="DECIMAL" property="cardMoney" />
  18. <result column="zfb_sale_money" jdbcType="DECIMAL" property="zfbSaleMoney" />
  19. <result column="zfb_rate" jdbcType="DECIMAL" property="zfbRate" />
  20. <result column="zfb_money" jdbcType="DECIMAL" property="zfbMoney" />
  21. <result column="union_sale_money" jdbcType="DECIMAL" property="unionSaleMoney" />
  22. <result column="union_rate" jdbcType="DECIMAL" property="unionRate" />
  23. <result column="union_money" jdbcType="DECIMAL" property="unionMoney" />
  24. <result column="wx_sale_money" jdbcType="DECIMAL" property="wxSaleMoney" />
  25. <result column="wx_rate" jdbcType="DECIMAL" property="wxRate" />
  26. <result column="wx_money" jdbcType="DECIMAL" property="wxMoney" />
  27. <result column="erase_zero_sale_money" jdbcType="DECIMAL" property="eraseZeroSaleMoney" />
  28. <result column="erase_zero_rate" jdbcType="DECIMAL" property="eraseZeroRate" />
  29. <result column="erase_zero_money" jdbcType="DECIMAL" property="eraseZeroMoney" />
  30. <result column="cash_sale_money" jdbcType="DECIMAL" property="cashSaleMoney" />
  31. <result column="cash_rate" jdbcType="DECIMAL" property="cashRate" />
  32. <result column="cash_money" jdbcType="DECIMAL" property="cashMoney" />
  33. <result column="rent_money" jdbcType="DECIMAL" property="rentMoney" />
  34. <result column="rent_contract_id" jdbcType="BIGINT" property="rentContractId" />
  35. <result column="rent_contract_number" jdbcType="VARCHAR" property="rentContractNumber" />
  36. <result column="property_money" jdbcType="DECIMAL" property="propertyMoney" />
  37. <result column="property_contract_id" jdbcType="BIGINT" property="propertyContractId" />
  38. <result column="property_contract_number" jdbcType="VARCHAR" property="propertyContractNumber" />
  39. <result column="employee_manage_money" jdbcType="DECIMAL" property="employeeManageMoney" />
  40. <result column="sales_slip_money" jdbcType="DECIMAL" property="salesSlipMoney" />
  41. <result column="salary" jdbcType="DECIMAL" property="salary" />
  42. <result column="earnest_money" jdbcType="DECIMAL" property="earnestMoney" />
  43. <result column="other_money" jdbcType="DECIMAL" property="otherMoney" />
  44. <result column="last_remaining" jdbcType="DECIMAL" property="lastRemaining" />
  45. <result column="points_rate" jdbcType="DECIMAL" property="pointsRate" />
  46. <result column="points_money" jdbcType="DECIMAL" property="pointsMoney" />
  47. <result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
  48. <result column="merchant_code" jdbcType="VARCHAR" property="merchantCode" />
  49. <result column="merchant_person" jdbcType="VARCHAR" property="merchantPerson" />
  50. <result column="merchant_phone" jdbcType="VARCHAR" property="merchantPhone" />
  51. <result column="account_name" jdbcType="VARCHAR" property="accountName" />
  52. <result column="account_bank" jdbcType="VARCHAR" property="accountBank" />
  53. <result column="account_number" jdbcType="VARCHAR" property="accountNumber" />
  54. <result column="create_by" jdbcType="BIGINT" property="createBy" />
  55. <result column="update_by" jdbcType="BIGINT" property="updateBy" />
  56. <result column="is_del" jdbcType="INTEGER" property="isDel" />
  57. </resultMap>
  58. <sql id="allColumns">
  59. `id`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`,`merchant_id`,`begin_time`,`end_time`,`total_money`,
  60. `actual_money`,`card_sale_money`,`card_rate`,`card_money`,`zfb_sale_money`,`zfb_rate`,`zfb_money`,`union_sale_money`,`union_rate`,
  61. `union_money`,`wx_sale_money`,`wx_rate`,`wx_money`,`erase_zero_sale_money`,`erase_zero_rate`,`erase_zero_money`,`cash_sale_money`,
  62. `cash_rate`,`cash_money`,`rent_money`,`rent_contract_id`,`rent_contract_number`,`property_money`,`property_contract_id`,`property_contract_number`,
  63. `employee_manage_money`,`sales_slip_money`,`salary`,`earnest_money`,`other_money`,`last_remaining`,`points_rate`,`points_money`,
  64. `merchant_name`,`merchant_code`,`merchant_person`,`merchant_phone`,`account_name`,`account_bank`,`account_number`,`create_by`,`update_by`,`is_del`
  65. </sql>
  66. <sql id="dynamicWhereConditions">
  67. where 1 = 1
  68. <if test=" null != id ">
  69. and `id` = #{id}
  70. </if>
  71. <if test=" null != tenantId and '' != tenantId">
  72. and `tenant_id` = #{tenantId}
  73. </if>
  74. <if test=" null != parentTenantId and '' != parentTenantId">
  75. and `parent_tenant_id` = #{parentTenantId}
  76. </if>
  77. <if test=" null != begin">
  78. and `start_time` &gt;= #{begin}
  79. </if>
  80. <if test=" null != end">
  81. and `end_time` &lt;= #{end}
  82. </if>
  83. <if test=" null != merchantName and merchantName != '' ">
  84. and `merchant_name` like concat('%', #{merchantName},'%')
  85. </if>
  86. <if test=" null != merchantId ">
  87. and `merchant_id` = #{merchantId}
  88. </if>
  89. <if test=" null != createBy ">
  90. and `create_by` = #{createBy}
  91. </if>
  92. <if test=" null != isDel">
  93. and `is_del` &gt;= #{isDel}
  94. </if>
  95. <if test=" null != ids ">
  96. and id in
  97. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  98. #{idItem}
  99. </foreach>
  100. </if>
  101. <if test=" null != sortColumns"> order by ${sortColumns} </if>
  102. </sql>
  103. <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  104. select <include refid="allColumns" /> from wx_settle_merchant where id = #{id} and tenant_id=#{tenantId}
  105. </select>
  106. <select id="findList" parameterType="com.iformall.domain.po.WxSettleMerchant" resultMap="BaseResultMap">
  107. select <include refid="allColumns" /> from wx_settle_merchant
  108. <include refid="dynamicWhereConditions" />
  109. </select>
  110. </mapper>