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.
 
 
 
 
 

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