同步资源排序
This commit is contained in:
parent
9cad37f9be
commit
e9285a11e0
|
@ -50,5 +50,8 @@ public class SysOssResource extends TenantEntity {
|
|||
*/
|
||||
private Integer status;
|
||||
|
||||
private Long downloadNum;
|
||||
private Long previewNum;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -54,4 +54,7 @@ public class SysOssTextbook extends TenantEntity {
|
|||
*/
|
||||
private Integer status;
|
||||
|
||||
private Long downloadNum;
|
||||
private Long previewNum;
|
||||
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@ public class SysOssResourceVo implements Serializable {
|
|||
private Integer status;
|
||||
|
||||
private Long downloadNum;
|
||||
private Long previewNum;
|
||||
|
||||
/**
|
||||
* 容量
|
||||
|
|
|
@ -63,6 +63,7 @@ public class SysOssTextbookVo implements Serializable {
|
|||
private Integer status;
|
||||
|
||||
private Long downloadNum;
|
||||
private Long previewNum;
|
||||
|
||||
/**
|
||||
* 容量
|
||||
|
|
|
@ -107,7 +107,20 @@ public class SysOssTextbookServiceImpl implements ISysOssTextbookService {
|
|||
List<Long> ids = StreamUtils.toList(list, SysCatalogTextbook::getCatalogId);
|
||||
ids.add(bo.getCatalogId());
|
||||
w.in("ot.catalog_id", ids);
|
||||
}).orderByDesc("ot.create_time");
|
||||
});
|
||||
if (ObjectUtil.isNotNull(bo.getParams().get("downloadDesc"))) {
|
||||
wrapper.orderByDesc("ot.download_num");
|
||||
} else if (ObjectUtil.isNotNull(bo.getParams().get("downloadAsc"))) {
|
||||
wrapper.orderByAsc("ot.download_num");
|
||||
} else if (ObjectUtil.isNotNull(bo.getParams().get("previewDesc"))) {
|
||||
wrapper.orderByDesc("ot.preview_num");
|
||||
} else if (ObjectUtil.isNotNull(bo.getParams().get("previewAsc"))) {
|
||||
wrapper.orderByAsc("ot.preview_num");
|
||||
} else if (ObjectUtil.isNotNull(bo.getParams().get("timeAsc"))) {
|
||||
wrapper.orderByAsc("ot.create_time");
|
||||
} else {
|
||||
wrapper.orderByDesc("ot.create_time");
|
||||
}
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue