提交 602f6239 authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 d6e2d76c
......@@ -8,11 +8,9 @@ import lombok.Data;
@Data
@ApiModel(value="QueryVideoLibraryForm",description="视频库")
public class QueryVideoLibraryForm {
@ApiModelProperty(value = "直播id")
private String liveId;
@ApiModelProperty(value = "资源名称")
private String name;
@ApiModelProperty("状态:0待审核,1已上架,2已下架")
@ApiModelProperty("状态:1已上架,0已下架")
private String status;
@ApiModelProperty(value="上传时间-开始")
private String beginTime;
......
......@@ -58,10 +58,6 @@ public class VideoLibrary {
private Date uploadTime;
@ApiModelProperty("更新时间")
private Date updateTime;
@ApiModelProperty("课程Id")
private String courseId;
@ApiModelProperty("直播Id")
private String liveId;
@ApiModelProperty("浏览数量")
private Integer browseNum;
@ApiModelProperty("销量")
......
......@@ -12,8 +12,6 @@ public class VideoLibraryListVO {
private String name;
@ApiModelProperty(value = "讲师")
private String author;
@ApiModelProperty("售价")
private String realPrice;
@ApiModelProperty("上传时间")
private String uploadTime;
@ApiModelProperty("状态:1已上架,2已下架")
......
......@@ -16,14 +16,31 @@ import com.zrqx.resource.bg.mapper.MapperConstants;
*/
public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
@Select("<script>"
+ "<if test = 'form.diyTypeCode==null'>"
+ "select DISTINCT a.id,a.sort,a.name, DATE_FORMAT(a.uploadTime,'%Y-%m-%d %H:%i') uploadTime,a.status,a.img,a.defaultImg,a.author "
+ "from res_Video_Library a "
+ "</if>"
+ "<if test = '" + NOTBLANK + "(form.diyTypeCode)'>"
+ "select DISTINCT a.id,a.sort,a.name,a.realprice, DATE_FORMAT(a.uploadTime,'%Y-%m-%d %H:%i') uploadTime,a.status,a.img,a.defaultImg,a.author "
+ "from res_Video_Library a left join res_Video_Library_Diy_Type ad "
+ "on a.id = ad.vlid "
+ "where liveId is null "
+ " like(ad.code,form.diyTypeCode) "
+ " like(a.name,form.name) "
+ " eq(a.status,form.status) "
+ MapperConstants.DATETIME_QUERY_CONDITION
+ "</if>"
+ "where 1=1 "
+ "<if test = '" + NOTBLANK + "(form.diyTypeCode)'>"
+ " and ad.code like concat(#{form.diyTypeCode},'%') "
+ "</if>"
+ "<if test = '" + NOTBLANK + "(form.name)'>"
+ " and a.name like concat('%',#{form.name},'%') "
+ "</if>"
+ "<if test='form.status != null'>"
+ " and a.status = #{form.status}"
+ "</if>"
+ " <if test = '" + NOTBLANK + "(form.beginTime)'> "
+ " and a.uploadTime &gt;= concat(#{form.beginTime}, ' 00:00:00' ) "
+ " </if> "
+ " <if test = '" + NOTBLANK + "(form.endTime)'> "
+ " and a.uploadTime &lt;= concat(#{form.endTime}, ' 23:59:59') "
+ " </if> "
+ "</script>")
List<VideoLibraryListVO> query(@Param("form")QueryVideoLibraryForm form);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论