ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、视频、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
>dao层 ``` List<Product> search(@Param(value = "content") String content);//搜索 ``` >mapper.xml ``` /* 使用concat进行联接 对价格和名称字段进行匹配 */ <select id="search" parameterType="java.lang.String" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from product <where> product_name LIKE CONCAT('%',#{content},'%') OR initial_price LIKE CONCAT('%',#{content},'%') </where> </select> ```