xiaoyong931011
2022-06-07 7fa0a141a3c88ca90c67c966260bf26f03f255da
src/main/resources/mapper/UserMapper.xml
@@ -7,11 +7,15 @@
        a.*
        FROM
        t_user a
        left join t_belong b on a.belong_id = b.id
        <where>
            <if test="record != null" >
                <if test="record.username!=null">
                    and a.username like concat ('%',#{record.username},'%')
                </if>
                <if test="record.belongId!=null">
                    and a.belong_id = #{record.belongId}
                </if>
            </if>
        </where>
        order by a.create_time desc