107 lines
5.5 KiB
XML
107 lines
5.5 KiB
XML
<?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.ruoyi.system.mapper.EUserWithdrawMapper">
|
|
|
|
<resultMap type="EUserWithdrawVO" id="RlUserWithdrawResult" autoMapping="true" />
|
|
|
|
<sql id="selectRlUserWithdrawVo">
|
|
select user_channel_id, user_id, channel_id, name, handling_charge_type, withdraw_handling_charge,
|
|
min_amount, max_amount, create_time, is_open, picture, collection_code, is_need_code
|
|
from e_user_withdraw
|
|
</sql>
|
|
|
|
<select id="selectRlUserWithdrawList" parameterType="EUserWithdraw" resultMap="RlUserWithdrawResult">
|
|
<include refid="selectRlUserWithdrawVo"/>
|
|
<where>
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
<if test="channelId != null "> and channel_id = #{channelId}</if>
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
<if test="handlingChargeType != null and handlingChargeType != ''"> and handling_charge_type = #{handlingChargeType}</if>
|
|
<if test="withdrawHandlingCharge != null "> and withdraw_handling_charge = #{withdrawHandlingCharge}</if>
|
|
<if test="minAmount != null "> and min_amount = #{minAmount}</if>
|
|
<if test="maxAmount != null "> and max_amount = #{maxAmount}</if>
|
|
<if test="isOpen != null and isOpen != ''"> and is_open = #{isOpen}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectRlUserWithdrawByUserChannelId" parameterType="Long" resultMap="RlUserWithdrawResult">
|
|
<include refid="selectRlUserWithdrawVo"/>
|
|
where user_channel_id = #{userChannelId}
|
|
</select>
|
|
|
|
<select id="selectRlUserWithdrawListByUserId" parameterType="Long" resultMap="RlUserWithdrawResult">
|
|
<include refid="selectRlUserWithdrawVo"/>
|
|
where user_id = #{userId}
|
|
</select>
|
|
|
|
<insert id="insertRlUserWithdraw" parameterType="EUserWithdraw">
|
|
insert into e_user_withdraw
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="userChannelId != null">user_channel_id,</if>
|
|
<if test="userId != null">user_id,</if>
|
|
<if test="channelId != null">channel_id,</if>
|
|
<if test="name != null and name != ''">name,</if>
|
|
<if test="handlingChargeType != null">handling_charge_type,</if>
|
|
<if test="withdrawHandlingCharge != null">withdraw_handling_charge,</if>
|
|
<if test="minAmount != null">min_amount,</if>
|
|
<if test="maxAmount != null">max_amount,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="isOpen != null">is_open,</if>
|
|
<if test="picture != null">picture,</if>
|
|
<if test="collectionCode != null">collection_code,</if>
|
|
<if test="isNeedCode != null">is_need_code,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="userChannelId != null">#{userChannelId},</if>
|
|
<if test="userId != null">#{userId},</if>
|
|
<if test="channelId != null">#{channelId},</if>
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
<if test="handlingChargeType != null">#{handlingChargeType},</if>
|
|
<if test="withdrawHandlingCharge != null">#{withdrawHandlingCharge},</if>
|
|
<if test="minAmount != null">#{minAmount},</if>
|
|
<if test="maxAmount != null">#{maxAmount},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="isOpen != null">#{isOpen},</if>
|
|
<if test="picture != null">#{picture},</if>
|
|
<if test="collectionCode != null">#{collectionCode},</if>
|
|
<if test="isNeedCode != null">#{isNeedCode},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateRlUserWithdraw" parameterType="EUserWithdraw">
|
|
update e_user_withdraw
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
<if test="channelId != null">channel_id = #{channelId},</if>
|
|
<if test="name != null and name != ''">name = #{name},</if>
|
|
<if test="handlingChargeType != null">handling_charge_type = #{handlingChargeType},</if>
|
|
<if test="withdrawHandlingCharge != null">withdraw_handling_charge = #{withdrawHandlingCharge},</if>
|
|
<if test="minAmount != null">min_amount = #{minAmount},</if>
|
|
<if test="maxAmount != null">max_amount = #{maxAmount},</if>
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="isOpen != null">is_open = #{isOpen},</if>
|
|
<if test="picture != null">picture = #{picture},</if>
|
|
<if test="collectionCode != null">collection_code = #{collectionCode},</if>
|
|
<if test="isNeedCode != null">is_need_code = #{isNeedCode},</if>
|
|
</trim>
|
|
where user_channel_id = #{userChannelId}
|
|
</update>
|
|
|
|
<delete id="deleteRlUserWithdrawByUserChannelId" parameterType="Long">
|
|
delete from e_user_withdraw where user_channel_id = #{userChannelId}
|
|
</delete>
|
|
|
|
<delete id="deleteRlUserWithdrawByUserChannelIds" parameterType="String">
|
|
delete from e_user_withdraw where user_channel_id in
|
|
<foreach item="userChannelId" collection="array" open="(" separator="," close=")">
|
|
#{userChannelId}
|
|
</foreach>
|
|
</delete>
|
|
|
|
<delete id="deleteRlUserWithdrawByUserId">
|
|
delete from e_user_withdraw where user_id = #{userId}
|
|
</delete>
|
|
</mapper>
|