70 lines
3.2 KiB
XML
70 lines
3.2 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.RlUserExtMapper">
|
|
|
|
<resultMap type="RlUserExt" id="RlUserExtResult" autoMapping="true" />
|
|
|
|
<sql id="selectRlUserExtVo">
|
|
select ext_id, user_id, balance, dividend_proportion, cooperation_time, dividend_status from rl_user_ext
|
|
</sql>
|
|
|
|
<select id="selectRlUserExtList" parameterType="RlUserExt" resultMap="RlUserExtResult">
|
|
<include refid="selectRlUserExtVo"/>
|
|
<where>
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
<if test="balance != null "> and balance = #{balance}</if>
|
|
<if test="dividendProportion != null "> and dividend_proportion = #{dividendProportion}</if>
|
|
<if test="cooperationTime != null "> and cooperation_time = #{cooperationTime}</if>
|
|
<if test="dividendStatus != null and dividendStatus != ''"> and dividend_status = #{dividendStatus}</if>
|
|
</where>
|
|
</select>
|
|
|
|
<select id="selectRlUserExtByExtId" parameterType="Long" resultMap="RlUserExtResult">
|
|
<include refid="selectRlUserExtVo"/>
|
|
where ext_id = #{extId}
|
|
</select>
|
|
|
|
<insert id="insertRlUserExt" parameterType="RlUserExt" useGeneratedKeys="true" keyProperty="extId">
|
|
insert into rl_user_ext
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="userId != null">user_id,</if>
|
|
<if test="balance != null">balance,</if>
|
|
<if test="dividendProportion != null">dividend_proportion,</if>
|
|
<if test="cooperationTime != null">cooperation_time,</if>
|
|
<if test="dividendStatus != null">dividend_status,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="userId != null">#{userId},</if>
|
|
<if test="balance != null">#{balance},</if>
|
|
<if test="dividendProportion != null">#{dividendProportion},</if>
|
|
<if test="cooperationTime != null">#{cooperationTime},</if>
|
|
<if test="dividendStatus != null">#{dividendStatus},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateRlUserExt" parameterType="RlUserExt">
|
|
update rl_user_ext
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
<if test="balance != null">balance = #{balance},</if>
|
|
<if test="dividendProportion != null">dividend_proportion = #{dividendProportion},</if>
|
|
<if test="cooperationTime != null">cooperation_time = #{cooperationTime},</if>
|
|
<if test="dividendStatus != null">dividend_status = #{dividendStatus},</if>
|
|
</trim>
|
|
where user_id = #{userId}
|
|
</update>
|
|
|
|
<delete id="deleteRlUserExtByExtId" parameterType="Long">
|
|
delete from rl_user_ext where ext_id = #{extId}
|
|
</delete>
|
|
|
|
<delete id="deleteRlUserExtByExtIds" parameterType="String">
|
|
delete from rl_user_ext where ext_id in
|
|
<foreach item="extId" collection="array" open="(" separator="," close=")">
|
|
#{extId}
|
|
</foreach>
|
|
</delete>
|
|
</mapper>
|