|
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.iformall.mapper.WxSettleMerchantMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxSettleMerchant">
- <id column="id" jdbcType="BIGINT" property="id" />
- <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" />
- <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
- <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
- <result column="merchant_id" jdbcType="BIGINT" property="merchantId" />
- <result column="begin_time" jdbcType="TIMESTAMP" property="beginTime" />
- <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
- <result column="total_money" jdbcType="DECIMAL" property="totalMoney" />
- <result column="actual_money" jdbcType="DECIMAL" property="actualMoney" />
- <result column="card_sale_money" jdbcType="DECIMAL" property="cardSaleMoney" />
- <result column="card_rate" jdbcType="DECIMAL" property="cardRate" />
- <result column="card_money" jdbcType="DECIMAL" property="cardMoney" />
- <result column="zfb_sale_money" jdbcType="DECIMAL" property="zfbSaleMoney" />
- <result column="zfb_rate" jdbcType="DECIMAL" property="zfbRate" />
- <result column="zfb_money" jdbcType="DECIMAL" property="zfbMoney" />
- <result column="union_sale_money" jdbcType="DECIMAL" property="unionSaleMoney" />
- <result column="union_rate" jdbcType="DECIMAL" property="unionRate" />
- <result column="union_money" jdbcType="DECIMAL" property="unionMoney" />
- <result column="wx_sale_money" jdbcType="DECIMAL" property="wxSaleMoney" />
- <result column="wx_rate" jdbcType="DECIMAL" property="wxRate" />
- <result column="wx_money" jdbcType="DECIMAL" property="wxMoney" />
- <result column="erase_zero_sale_money" jdbcType="DECIMAL" property="eraseZeroSaleMoney" />
- <result column="erase_zero_rate" jdbcType="DECIMAL" property="eraseZeroRate" />
- <result column="erase_zero_money" jdbcType="DECIMAL" property="eraseZeroMoney" />
- <result column="cash_sale_money" jdbcType="DECIMAL" property="cashSaleMoney" />
- <result column="cash_rate" jdbcType="DECIMAL" property="cashRate" />
- <result column="cash_money" jdbcType="DECIMAL" property="cashMoney" />
- <result column="rent_money" jdbcType="DECIMAL" property="rentMoney" />
- <result column="rent_contract_id" jdbcType="BIGINT" property="rentContractId" />
- <result column="rent_contract_number" jdbcType="VARCHAR" property="rentContractNumber" />
- <result column="property_money" jdbcType="DECIMAL" property="propertyMoney" />
- <result column="property_contract_id" jdbcType="BIGINT" property="propertyContractId" />
- <result column="property_contract_number" jdbcType="VARCHAR" property="propertyContractNumber" />
- <result column="employee_manage_money" jdbcType="DECIMAL" property="employeeManageMoney" />
- <result column="sales_slip_money" jdbcType="DECIMAL" property="salesSlipMoney" />
- <result column="salary" jdbcType="DECIMAL" property="salary" />
- <result column="earnest_money" jdbcType="DECIMAL" property="earnestMoney" />
- <result column="other_money" jdbcType="DECIMAL" property="otherMoney" />
- <result column="last_remaining" jdbcType="DECIMAL" property="lastRemaining" />
- <result column="points_rate" jdbcType="DECIMAL" property="pointsRate" />
- <result column="points_money" jdbcType="DECIMAL" property="pointsMoney" />
- <result column="merchant_name" jdbcType="VARCHAR" property="merchantName" />
- <result column="merchant_code" jdbcType="VARCHAR" property="merchantCode" />
- <result column="merchant_person" jdbcType="VARCHAR" property="merchantPerson" />
- <result column="merchant_phone" jdbcType="VARCHAR" property="merchantPhone" />
- <result column="account_name" jdbcType="VARCHAR" property="accountName" />
- <result column="account_bank" jdbcType="VARCHAR" property="accountBank" />
- <result column="account_number" jdbcType="VARCHAR" property="accountNumber" />
- <result column="create_by" jdbcType="BIGINT" property="createBy" />
- <result column="update_by" jdbcType="BIGINT" property="updateBy" />
- <result column="is_del" jdbcType="INTEGER" property="isDel" />
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`parent_tenant_id`,`create_date`,`update_date`,`merchant_id`,`begin_time`,`end_time`,`total_money`,
- `actual_money`,`card_sale_money`,`card_rate`,`card_money`,`zfb_sale_money`,`zfb_rate`,`zfb_money`,`union_sale_money`,`union_rate`,
- `union_money`,`wx_sale_money`,`wx_rate`,`wx_money`,`erase_zero_sale_money`,`erase_zero_rate`,`erase_zero_money`,`cash_sale_money`,
- `cash_rate`,`cash_money`,`rent_money`,`rent_contract_id`,`rent_contract_number`,`property_money`,`property_contract_id`,`property_contract_number`,
- `employee_manage_money`,`sales_slip_money`,`salary`,`earnest_money`,`other_money`,`last_remaining`,`points_rate`,`points_money`,
- `merchant_name`,`merchant_code`,`merchant_person`,`merchant_phone`,`account_name`,`account_bank`,`account_number`,`create_by`,`update_by`,`is_del`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1 = 1
-
- <if test=" null != id ">
- and `id` = #{id}
- </if>
-
- <if test=" null != tenantId and '' != tenantId">
- and `tenant_id` = #{tenantId}
- </if>
- <if test=" null != parentTenantId and '' != parentTenantId">
- and `parent_tenant_id` = #{parentTenantId}
- </if>
-
- <if test=" null != begin">
- and `start_time` >= #{begin}
- </if>
-
- <if test=" null != end">
- and `end_time` <= #{end}
- </if>
-
- <if test=" null != merchantName and merchantName != '' ">
- and `merchant_name` like concat('%', #{merchantName},'%')
- </if>
-
- <if test=" null != merchantId ">
- and `merchant_id` = #{merchantId}
- </if>
-
- <if test=" null != createBy ">
- and `create_by` = #{createBy}
- </if>
-
- <if test=" null != isDel">
- and `is_del` >= #{isDel}
- </if>
-
- <if test=" null != ids ">
- and id in
- <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
- #{idItem}
- </foreach>
- </if>
- <if test=" null != sortColumns"> order by ${sortColumns} </if>
- </sql>
-
- <select id="selectById" parameterType="java.util.HashMap" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_settle_merchant where id = #{id} and tenant_id=#{tenantId}
- </select>
-
- <select id="findList" parameterType="com.iformall.domain.po.WxSettleMerchant" resultMap="BaseResultMap">
- select <include refid="allColumns" /> from wx_settle_merchant
- <include refid="dynamicWhereConditions" />
- </select>
-
- </mapper>
|