|
@@ -0,0 +1,278 @@
|
|
|
+<?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.yiqi.settlement.mapper.SettlementStoreRateMapper">
|
|
|
+
|
|
|
+ <resultMap type="SettlementStoreRate" id="SettlementStoreRateResult">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="storeId" column="store_id"/>
|
|
|
+ <result property="factoryRate" column="factory_rate"/>
|
|
|
+ <result property="materialRate" column="material_rate"/>
|
|
|
+ <result property="cardDepositRate" column="card_deposit_rate"/>
|
|
|
+ <result property="welfareDepositRate" column="welfare_deposit_rate"/>
|
|
|
+ <result property="passwordDepositRate" column="password_deposit_rate"/>
|
|
|
+ <result property="otherConsumeRate" column="other_consume_rate"/>
|
|
|
+ <result property="aliPayRate" column="ali_pay_rate"/>
|
|
|
+ <result property="wxPayRate" column="wx_pay_rate"/>
|
|
|
+ <result property="managementRate" column="management_rate"/>
|
|
|
+ <result property="washRate" column="wash_rate"/>
|
|
|
+ <result property="startDate" column="start_date"/>
|
|
|
+ <result property="endDate" column="end_date"/>
|
|
|
+ <result property="createById" column="create_by_id"/>
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateById" column="update_by_id"/>
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectSettlementStoreRateVo">
|
|
|
+ select id,
|
|
|
+ store_id,
|
|
|
+ factory_rate,
|
|
|
+ material_rate,
|
|
|
+ card_deposit_rate,
|
|
|
+ welfare_deposit_rate,
|
|
|
+ password_deposit_rate,
|
|
|
+ other_consume_rate,
|
|
|
+ ali_pay_rate,
|
|
|
+ wx_pay_rate,
|
|
|
+ management_rate,
|
|
|
+ wash_rate,
|
|
|
+ start_date,
|
|
|
+ end_date,
|
|
|
+ create_by_id,
|
|
|
+ create_by,
|
|
|
+ create_time,
|
|
|
+ update_by_id,
|
|
|
+ update_by,
|
|
|
+ update_time,
|
|
|
+ remark
|
|
|
+ from settlement_store_rate
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectSettlementStoreRateList" parameterType="SettlementStoreRate"
|
|
|
+ resultMap="SettlementStoreRateResult">
|
|
|
+ <include refid="selectSettlementStoreRateVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="storeId != null ">
|
|
|
+ and store_id = #{storeId}
|
|
|
+ </if>
|
|
|
+ <if test="factoryRate != null ">
|
|
|
+ and factory_rate = #{factoryRate}
|
|
|
+ </if>
|
|
|
+ <if test="materialRate != null ">
|
|
|
+ and material_rate = #{materialRate}
|
|
|
+ </if>
|
|
|
+ <if test="cardDepositRate != null ">
|
|
|
+ and card_deposit_rate = #{cardDepositRate}
|
|
|
+ </if>
|
|
|
+ <if test="welfareDepositRate != null ">
|
|
|
+ and welfare_deposit_rate = #{welfareDepositRate}
|
|
|
+ </if>
|
|
|
+ <if test="passwordDepositRate != null ">
|
|
|
+ and password_deposit_rate = #{passwordDepositRate}
|
|
|
+ </if>
|
|
|
+ <if test="otherConsumeRate != null ">
|
|
|
+ and other_consume_rate = #{otherConsumeRate}
|
|
|
+ </if>
|
|
|
+ <if test="aliPayRate != null ">
|
|
|
+ and ali_pay_rate = #{aliPayRate}
|
|
|
+ </if>
|
|
|
+ <if test="wxPayRate != null ">
|
|
|
+ and wx_pay_rate = #{wxPayRate}
|
|
|
+ </if>
|
|
|
+ <if test="managementRate != null ">
|
|
|
+ and management_rate = #{managementRate}
|
|
|
+ </if>
|
|
|
+ <if test="washRate != null ">
|
|
|
+ and wash_rate = #{washRate}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null ">
|
|
|
+ and start_date = #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null ">
|
|
|
+ and end_date = #{endDate}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectSettlementStoreRateById" parameterType="Long"
|
|
|
+ resultMap="SettlementStoreRateResult">
|
|
|
+ <include refid="selectSettlementStoreRateVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertSettlementStoreRate" parameterType="SettlementStoreRate" useGeneratedKeys="true"
|
|
|
+ keyProperty="id">
|
|
|
+ insert into settlement_store_rate
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="storeId != null">store_id,
|
|
|
+ </if>
|
|
|
+ <if test="factoryRate != null">factory_rate,
|
|
|
+ </if>
|
|
|
+ <if test="materialRate != null">material_rate,
|
|
|
+ </if>
|
|
|
+ <if test="cardDepositRate != null">card_deposit_rate,
|
|
|
+ </if>
|
|
|
+ <if test="welfareDepositRate != null">welfare_deposit_rate,
|
|
|
+ </if>
|
|
|
+ <if test="passwordDepositRate != null">password_deposit_rate,
|
|
|
+ </if>
|
|
|
+ <if test="otherConsumeRate != null">other_consume_rate,
|
|
|
+ </if>
|
|
|
+ <if test="aliPayRate != null">ali_pay_rate,
|
|
|
+ </if>
|
|
|
+ <if test="wxPayRate != null">wx_pay_rate,
|
|
|
+ </if>
|
|
|
+ <if test="managementRate != null">management_rate,
|
|
|
+ </if>
|
|
|
+ <if test="washRate != null">wash_rate,
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null">start_date,
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null">end_date,
|
|
|
+ </if>
|
|
|
+ <if test="createById != null">create_by_id,
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">create_by,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">create_time,
|
|
|
+ </if>
|
|
|
+ <if test="updateById != null">update_by_id,
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">update_by,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">update_time,
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">remark,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="storeId != null">#{storeId},
|
|
|
+ </if>
|
|
|
+ <if test="factoryRate != null">#{factoryRate},
|
|
|
+ </if>
|
|
|
+ <if test="materialRate != null">#{materialRate},
|
|
|
+ </if>
|
|
|
+ <if test="cardDepositRate != null">#{cardDepositRate},
|
|
|
+ </if>
|
|
|
+ <if test="welfareDepositRate != null">#{welfareDepositRate},
|
|
|
+ </if>
|
|
|
+ <if test="passwordDepositRate != null">#{passwordDepositRate},
|
|
|
+ </if>
|
|
|
+ <if test="otherConsumeRate != null">#{otherConsumeRate},
|
|
|
+ </if>
|
|
|
+ <if test="aliPayRate != null">#{aliPayRate},
|
|
|
+ </if>
|
|
|
+ <if test="wxPayRate != null">#{wxPayRate},
|
|
|
+ </if>
|
|
|
+ <if test="managementRate != null">#{managementRate},
|
|
|
+ </if>
|
|
|
+ <if test="washRate != null">#{washRate},
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null">#{startDate},
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null">#{endDate},
|
|
|
+ </if>
|
|
|
+ <if test="createById != null">#{createById},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">#{createBy},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">#{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateById != null">#{updateById},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">#{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">#{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">#{remark},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateSettlementStoreRate" parameterType="SettlementStoreRate">
|
|
|
+ update settlement_store_rate
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="storeId != null">store_id =
|
|
|
+ #{storeId},
|
|
|
+ </if>
|
|
|
+ <if test="factoryRate != null">factory_rate =
|
|
|
+ #{factoryRate},
|
|
|
+ </if>
|
|
|
+ <if test="materialRate != null">material_rate =
|
|
|
+ #{materialRate},
|
|
|
+ </if>
|
|
|
+ <if test="cardDepositRate != null">card_deposit_rate =
|
|
|
+ #{cardDepositRate},
|
|
|
+ </if>
|
|
|
+ <if test="welfareDepositRate != null">welfare_deposit_rate =
|
|
|
+ #{welfareDepositRate},
|
|
|
+ </if>
|
|
|
+ <if test="passwordDepositRate != null">password_deposit_rate =
|
|
|
+ #{passwordDepositRate},
|
|
|
+ </if>
|
|
|
+ <if test="otherConsumeRate != null">other_consume_rate =
|
|
|
+ #{otherConsumeRate},
|
|
|
+ </if>
|
|
|
+ <if test="aliPayRate != null">ali_pay_rate =
|
|
|
+ #{aliPayRate},
|
|
|
+ </if>
|
|
|
+ <if test="wxPayRate != null">wx_pay_rate =
|
|
|
+ #{wxPayRate},
|
|
|
+ </if>
|
|
|
+ <if test="managementRate != null">management_rate =
|
|
|
+ #{managementRate},
|
|
|
+ </if>
|
|
|
+ <if test="washRate != null">wash_rate =
|
|
|
+ #{washRate},
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null">start_date =
|
|
|
+ #{startDate},
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null">end_date =
|
|
|
+ #{endDate},
|
|
|
+ </if>
|
|
|
+ <if test="createById != null">create_by_id =
|
|
|
+ #{createById},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">create_by =
|
|
|
+ #{createBy},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">create_time =
|
|
|
+ #{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateById != null">update_by_id =
|
|
|
+ #{updateById},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">update_by =
|
|
|
+ #{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">update_time =
|
|
|
+ #{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">remark =
|
|
|
+ #{remark},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteSettlementStoreRateById" parameterType="Long">
|
|
|
+ delete
|
|
|
+ from settlement_store_rate
|
|
|
+ where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteSettlementStoreRateByIds" parameterType="String">
|
|
|
+ delete from settlement_store_rate where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+
|
|
|
+</mapper>
|