SELECT a.*, b.nickname, b.avatar FROM docs a LEFT JOIN gxwebsoft_core.sys_user b ON a.user_id = b.user_id AND a.book_id = #{param.bookId} AND a.name LIKE CONCAT('%', #{param.name}, '%') AND a.code LIKE CONCAT('%', #{param.code}, '%') AND a.photo LIKE CONCAT('%', #{param.photo}, '%') AND a.comments LIKE CONCAT('%', #{param.comments}, '%') AND a.user_id = #{param.userId} AND a.content LIKE CONCAT('%', #{param.content}, '%') AND a.sort_number = #{param.sortNumber} AND a.status = #{param.status} AND a.deleted = #{param.deleted} AND a.deleted = 0 AND a.create_time >= #{param.createTimeStart} AND a.create_time <= #{param.createTimeEnd} AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%') )