🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
>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> ```