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