提交 995a4b86 authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 106148fa
...@@ -131,14 +131,17 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{ ...@@ -131,14 +131,17 @@ public interface FgEbookMapper extends BaseMapper<Ebook>{
* @date: 2019年1月11日 下午3:50:49 * @date: 2019年1月11日 下午3:50:49
*/ */
@Select("<script>" @Select("<script>"
+ "select bb.id, bb.name,bb.price, bb.bookCover, bb.bookImg FROM res_ebook bb " + "<if test='"+ NOTBLANK +"(diyTypeCode)' >"
+ "LEFT JOIN res_ebook_diy_type bdt ON bb.id = bdt.ebookId " + "SELECT bb.id, bb.name,bb.price, bb.bookCover, bb.bookImg "
+ "FROM res_ebook bb LEFT JOIN res_ebook_diy_type bdt ON bb.id = bdt.ebookid"
+ "</if>"
+ "<if test='diyTypeCode==null' >"
+ "bb.id, bb.name,bb.price, bb.bookCover, bb.bookImg "
+ " FROM res_ebook bb "
+ "</if>"
+ " WHERE 1=1" + " WHERE 1=1"
+ "<if test='diyTypeCode != null and diyTypeCode.size > 0'>" + "<if test='"+ NOTBLANK +"(diyTypeCode)' >"
+ "and bdt.code in " + " and bdt.code like concat(#{diyTypeCode},'%') "
+ " <foreach collection=\"diyTypeCode\" index=\"index\" item=\"code\" open=\"(\" separator=\",\" close=\")\">"
+ " concat(#{code},'%') "
+ "</foreach>"
+ "</if>" + "</if>"
+ "<if test = '"+ NOTBLANK +"(keywords)' >" + "<if test = '"+ NOTBLANK +"(keywords)' >"
+ " and bb.name like concat(#{keywords}, '%') " + " and bb.name like concat(#{keywords}, '%') "
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论