提交 7ac1e938 authored 作者: chaoyanjun's avatar chaoyanjun

--no commit message

上级 29aae809
...@@ -2,6 +2,7 @@ package com.zrqx.resource.bg.mapper.recommend; ...@@ -2,6 +2,7 @@ package com.zrqx.resource.bg.mapper.recommend;
import java.util.List; import java.util.List;
import com.zrqx.core.vo.resource.recommend.RecommendResourcePageVo;
import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
...@@ -43,7 +44,7 @@ public interface RecommendResourceMapper extends BaseMapper<RecommendResource> { ...@@ -43,7 +44,7 @@ public interface RecommendResourceMapper extends BaseMapper<RecommendResource> {
* @date: 2018年12月4日 下午5:41:29 * @date: 2018年12月4日 下午5:41:29
*/ */
@Select("<script>" @Select("<script>"
+ " select DISTINCT rr.*,t.showName FROM res_recommend_resource rr " + + " select DISTINCT rr.*,t.showName,al.text FROM res_recommend_resource rr " +
" LEFT JOIN res_article_library al ON rr.resId = al.id " + " LEFT JOIN res_article_library al ON rr.resId = al.id " +
" LEFT JOIN res_article_library_diy_type dt ON al.id = dt.alid " + " LEFT JOIN res_article_library_diy_type dt ON al.id = dt.alid " +
" LEFT JOIN res_diy_type t ON dt.dtid = t.id " " LEFT JOIN res_diy_type t ON dt.dtid = t.id "
...@@ -62,7 +63,28 @@ public interface RecommendResourceMapper extends BaseMapper<RecommendResource> { ...@@ -62,7 +63,28 @@ public interface RecommendResourceMapper extends BaseMapper<RecommendResource> {
"</if>" "</if>"
+ "</script>") + "</script>")
List<RecommendResource> queryRecommendResource(@Param("res")RecommendResourceForm res); List<RecommendResource> queryRecommendResource(@Param("res")RecommendResourceForm res);
@Select("<script>"
+ " select DISTINCT rr.*,t.showName,al.text FROM res_recommend_resource rr " +
" LEFT JOIN res_article_library al ON rr.resId = al.id " +
" LEFT JOIN res_article_library_diy_type dt ON al.id = dt.alid " +
" LEFT JOIN res_diy_type t ON dt.dtid = t.id "
+ "WHERE 1 = 1 "
+ "<if test='res.recomId != null and res.recomId != 0' >"
+ "and rr.recomId = #{res.recomId} "
+ "</if>"
+ "<if test='res.moduleId != null ' >"
+ "and rr.moduleId = #{res.moduleId} "
+ "</if>"
+ "<if test='res.resType != null and res.resType != 0' >"
+ "and rr.resType = #{res.resType} "
+ "</if>"
+ "<if test = ' " + NOTBLANK + "(res.code) '>" +
" and t.code = #{res.code} " +
"</if>"
+ "</script>")
List<RecommendResourcePageVo> queryRecommendResource1(@Param("res")RecommendResourceForm res);
/** /**
* 修改推荐内容 * 修改推荐内容
* @param entity * @param entity
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论