<?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="cn.iocoder.yudao.module.knowledge.mapper.TRfeUserMapper">

<update id="updateByCode">
        UPDATE t_rfe_user
        SET
            deleted = '1'
        WHERE ref_code in
    <foreach collection="codes" item="code" index="index" open="(" separator="," close=")">
        #{code}
    </foreach>
</update>

    <select id="selectByCode" resultType="cn.iocoder.yudao.module.knowledge.entity.TRfeUser">
        select
        *
        from t_rfe_user
        <if test="code !='' and code !=null">
            where ref_code = #{code}
        </if>
    </select>
</mapper>

