提交 ea83ca3b authored 作者: liupengfei's avatar liupengfei

--no commit message

上级 6e4b83ae
package com.zrqx.resource.fg.mapper.videolibrary;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.resource.commons.model.videolibrary.VideoLibraryDiyType;
/**
* 视频库和自定义分类
*/
public interface FgVideoLibraryDiyTypeMapper extends BaseMapper<VideoLibraryDiyType> {
}
package com.zrqx.resource.fg.mapper.videolibrary;
import java.util.List;
import com.zrqx.resource.bg.mapper.MapperConstants;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.resource.commons.model.label.LabelContentDiyType;
import com.zrqx.resource.commons.model.videolibrary.VideoLibraryLabelContentDiyType;
import com.zrqx.resource.commons.vo.fg.label.FgLabelInfoVO;
/**
* 文章库和标签关系
*/
public interface FgVideoLibraryLabelContentDiyTypeMapper extends BaseMapper<VideoLibraryLabelContentDiyType> {
@Select("<script>"
+ "SELECT al.labelId, l.name, l.englishName, l.nationsType "
+ "FROM res_video_library a "
+ "left join res_video_library_label_content_diy_type al ON a.id = al.videoId "
+ "left join res_label_content_diy_type lc on al.labelContentDiyTypeId = lc.id "
+ "left join res_label l on al.labelId = l.id "
+ "where 1=1 "
+ "and a.status = 1 and lc.status = 1 "
//+ "<if test='" +LIST_NOT_EMPTY + "(ids)'>"
//+ "and a.id in "
//+ " <foreach collection=\"ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
//+ "#{id}"
//+ "</foreach>"
//+ "</if>"
+ MapperConstants.FOREACH_IDS
+ "</script>")
List<FgLabelInfoVO> queryLabelList(@Param("ids")List<String> ids);
@Select("<script>"
+ "SELECT al.labelId, al.labelContentDiyTypeId id, lc.labelContent, lc.parentId, lc.englishName, lc.sort, al.labelContentDiyTypeCode code "
+ "FROM res_video_library a "
+ "left join res_video_library_label_content_diy_type al ON a.id = al.videoId "
+ "left join res_label_content_diy_type lc on al.labelContentDiyTypeId = lc.id "
+ "where 1=1 "
+ "and a.status = 1 and lc.status = 1 "
//+ "<if test='" +LIST_NOT_EMPTY + "(ids)'>"
//+ "and a.id in "
//+ " <foreach collection=\"ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
//+ "#{id}"
//+ "</foreach>"
//+ "</if>"
+ MapperConstants.FOREACH_IDS
+ "</script>")
List<LabelContentDiyType> queryLabelContentList(@Param("ids")List<String> ids);
}
package com.zrqx.resource.fg.mapper.videolibrary;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.resource.commons.form.fg.videolibrary.FgQueryRecommedVideoForm;
import com.zrqx.resource.commons.model.videolibrary.VideoLibrary;
import com.zrqx.resource.commons.vo.fg.videolibrary.FgVideoLibraryListVO;
/**
* 视频库
*/
public interface FgVideoLibraryMapper extends BaseMapper<VideoLibrary> {
/**
* 获取推荐视频
*/
@Select("<script>"
+ "select a.* "
+ "from res_video_Library a "
+ "where a.status = 1 "
+ "<if test='form.resourceType != null' >"
+ "and a.resourceType = #{form.resourceType}"
+ "</if>"
+ "<if test='form.ids != null and form.ids.size > 0' >"
+ "and id in "
+ " <foreach collection=\"form.ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+ "#{id}"
+ "</foreach>"
+ "</if>"
+ "<if test='form.ids != null and form.ids.size > 0' >"
+ " ORDER BY FIELD "
+ " <foreach collection=\"form.ids\" index=\"index\" item=\"id\" open=\"(id, \" separator=\",\" close=\")\">"
+ "#{id}"
+ "</foreach>"
+ "</if>"
+ "</script>")
List<FgVideoLibraryListVO> queryRecommendVideo(@Param("form")FgQueryRecommedVideoForm form);
/**
* 获取其他推荐视频
* @param form
* @return
*/
@Select("<script>"
+ "select a.* "
+ "from res_video_Library a "
+ "where a.status = 1 "
+ "<if test='form.resourceType != null' >"
+ "and a.resourceType = #{form.resourceType}"
+ "</if>"
+ "<if test='form.ids != null and form.ids.size > 0' >"
+ "and id not in "
+ " <foreach collection=\"form.ids\" index=\"index\" item=\"id\" open=\"(\" separator=\",\" close=\")\">"
+ "#{id}"
+ "</foreach>"
+ "</if>"
+ " order by uploadTime desc"
+ "</script>")
List<FgVideoLibraryListVO> queryOtherRecommendVideo(@Param("form")FgQueryRecommedVideoForm form);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论