<selectid="selectByParam"resultType="com.zhxc.common.pojo.Dangyuan">
select d.*,g.gr_name as 'dyGroupid',p.pp_name as 'pname' from xc_dangyuan d
left join xc_group g on gr_id = d.dy_group_id
left join xc_people p on pp_id = d.dy_people_id
<where>
and d.deleted = 0
<iftest="dyId!=null and dyId!=''">
and dy_id = #{dyId}
</if><iftest="grName != null and grName!= ''">
and gr_name like concat('%',#{grName},'%')
</if><iftest="dyUnit!=null and dyUnit!=''">
and dy_unit = #{dyUnit}
</if><iftest="dyGroup!=null and dyGroup!=''">
and dy_group_id = #{dyGroupid}
</if></where>
order by d.update_time desc
</select>
mybatis-plus 多条件下关键字查询<select id="selectByParam" resultType="com.zhxc.common.pojo.Dangyuan"> select d.*,g.gr_name as 'dyGroupid',p.pp_name as 'pname' from xc_dangyuan d left join xc_group g on gr_id = d.dy_group_id left join