提交 382a0542 authored 作者: renjianyu's avatar renjianyu

--no commit message

上级 2c12f16e
......@@ -154,9 +154,9 @@ public class PdfLibraryController {
@ApiOperation(value = "分页查询" , notes ="查询列表")
@GetMapping(value = "/page")
public CallBack<PageInfo<PdfLibraryListVO>> page(QueryPdfLibraryForm form, PageParam pageParam){
if (null != pageParam && StringUtils.isBlank(pageParam.getOrderBy())) {
pageParam.setOrderBy("uploadTime desc,id desc");
}
// if (null != pageParam && StringUtils.isBlank(pageParam.getOrderBy())) {
// pageParam.setOrderBy("uploadTime desc,id desc");
// }
return CallBack.success(service.page(form, pageParam));
}
}
......@@ -15,7 +15,7 @@ import com.zrqx.resource.commons.vo.bg.pdffilelibrary.PdfLibraryListVO;
*/
public interface PdfLibraryMapper extends BaseMapper<PdfLibrary> {
@Select("<script>"
+ "select a.id,a.name,a.author,a.source,a.pdf,a.price,a.uploadTime,a.status "
+ "select a.id,a.name,a.author,a.source,a.pdf,a.price,a.uploadTime,a.status,a.sort "
+ "from res_Pdf_Library a left join res_Pdf_Library_Diy_Type ad "
+ "on a.id = ad.plid "
+ "where 1=1 "
......@@ -41,8 +41,8 @@ public interface PdfLibraryMapper extends BaseMapper<PdfLibrary> {
//+ "<if test = '" + NOTBLANK + "(form.endTime)'>"
//+ "and a.uploadTime &lt;= concat(#{form.endTime}, ' 23:59:59')"
//+ "</if>"
+ MapperConstants.DATETIME_QUERY_CONDITION
+ " order by a.uploadTime desc "
//+ MapperConstants.DATETIME_QUERY_CONDITION
+ " ORDER BY a.sort DESC "
+ "</script>")
List<PdfLibraryListVO> query(@Param("form")QueryPdfLibraryForm form);
}
......@@ -16,7 +16,7 @@ import com.zrqx.resource.commons.vo.bg.videolibrary.VideoLibraryListVO;
*/
public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
@Select("<script>"
+ "select distinct a.id,a.readTextPower,a.name,a.source,a.bookName,a.realprice,a.timeLength,a.size,a.uploadTime,a.status "
+ "select distinct a.id,a.readTextPower,a.name,a.source,a.bookName,a.realprice,a.timeLength,a.size,a.uploadTime,a.status,a.sort "
+ "from res_Video_Library a left join res_Video_Library_Diy_Type ad "
+ "on a.id = ad.vlid "
+ "where 1=1 "
......@@ -42,7 +42,7 @@ public interface VideoLibraryMapper extends BaseMapper<VideoLibrary> {
//+ "and a.uploadTime &lt;= concat(#{form.endTime}, ' 23:59:59')"
//+ "</if>"
+ MapperConstants.DATETIME_QUERY_CONDITION
+ " order by a.uploadTime desc "
+ " order by a.sort desc "
+ "</script>")
List<VideoLibraryListVO> query(@Param("form")QueryVideoLibraryForm form);
......
......@@ -27,7 +27,8 @@ public class SaveUpdatePdfLibraryForm {
private String synopsis;
@ApiModelProperty("pdf")
private String pdf;
@ApiModelProperty("排序号 默认100")
private Integer sort;
@ApiModelProperty(value = "分类id")
private List<PdfLibraryDiyType> diyType;
@ApiModelProperty("民族 1蒙古族 2侗族 3藏族 4朝鲜族 5土家族 6回族 7满族 8汉族")
......
......@@ -52,4 +52,6 @@ public class SaveUpdateVideoLibraryForm {
private String videoName;
@ApiModelProperty(value = "作者名称和id(用,隔开)")
private String authorNameAndId;
@ApiModelProperty("排序号 默认100")
private Integer sort;
}
......@@ -22,4 +22,6 @@ public class PdfLibraryListVO {
private String uploadTime;
@ApiModelProperty("状态:0待审核,1已上架,2已下架")
private String status;
@ApiModelProperty("排序号")
private Integer sort;
}
......@@ -30,4 +30,6 @@ public class PdfLibraryOneVO {
private List<PdfLibraryDiyType> diyType;
@ApiModelProperty("pdf名称")
private String pdfName;
@ApiModelProperty("排序号 默认100")
private Integer sort;
}
......@@ -42,4 +42,6 @@ public class VideoLibraryListVO {
private Integer resourceType;
@ApiModelProperty("资源类型")
private String videoAndPdf;
@ApiModelProperty("排序号 默认100")
private Integer sort;
}
......@@ -49,4 +49,6 @@ public class VideoLibraryOneVO {
private String videoName;
@ApiModelProperty(value = "作者名称和id(用,隔开)")
private String authorNameAndId;
@ApiModelProperty("排序号 默认100")
private Integer sort;
}
......@@ -42,7 +42,7 @@ public interface FgVideoLibraryMapper extends BaseMapper<VideoLibrary> {
+ "</script>")
List<FgVideoLibraryListVO> queryRecommendVideo(@Param("form")FgQueryRecommedVideoForm form);
@Select("<script>"
+ "select distinct a.id,a.readTextPower,a.name,a.source,a.bookName,a.realprice,a.timeLength,a.size,a.uploadTime,a.status,a.resourceType,video videoAndPdf "
+ "select distinct a.id,a.readTextPower,a.name,a.source,a.bookName,a.realprice,a.timeLength,a.size,a.uploadTime,a.status,a.resourceType,video videoAndPdf,1 num,sort "
+ "from res_video_library a left join res_video_library_diy_type ad "
+ "on a.id = ad.vlid "
+ "where 1=1 "
......@@ -51,14 +51,14 @@ public interface FgVideoLibraryMapper extends BaseMapper<VideoLibrary> {
+ "</if>"
+ " union all "
+ "select distinct a.id,null readTextPower,a.name,a.source, null bookName,null realprice,null timeLength,null size,a.uploadTime,a.status,a.resourceType,pdf videoAndPdf "
+ "select distinct a.id,null readTextPower,a.name,a.source, null bookName,null realprice,null timeLength,null size,a.uploadTime,a.status,a.resourceType,pdf videoAndPdf,2 num,sort "
+ "from res_pdf_library a left join res_pdf_library_diy_type ad "
+ "on a.id = ad.plid "
+ "where 1=1 "
+ "<if test = '"+NOTBLANK+"(form.diyTypeCode)' >"
+ " and ad.code like concat(#{form.diyTypeCode},'%') "
+ "</if>"
+ " order by uploadTime desc "
+ " order by num desc, sort desc "
+ "</script>")
List<VideoLibraryListVO> query(@Param("form")QueryVideoLibraryForm form);
/**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论