mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-10 08:50:29 +08:00
chore(v0.11): 全路径纳入版本库与走查整改
- .gitignore:显式放行全部 maven-*、scripts、dev-support、frontend、反1、artifacts、历史导出目录
- 新增跟踪:device-manager/device-sdk/legacy-public、davinci-manager、cwos-*、cwos-resource 等源码与附属资源
- davinci FileStorageManagerImpl:Feign Response 关闭、绝对 URL 拉流 SSRF 校验(协议/主机/解析地址)
- davinci OuterCallFeignClient:补充契约说明
- cwos-common-aks AksConstant:final 类 + 私有构造防误实例化
- device-manager DeviceConstant:沿用 DEFAULT_APPLICATIONID 拼写修正
Made-with: Cursor
Former-commit-id: 0a34c76a82
This commit is contained in:
+47
@@ -0,0 +1,47 @@
|
||||
package cn.cloudwalk.cloud.page;
|
||||
|
||||
import cn.cloudwalk.cloud.entity.CloudwalkBasePeriod;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class CloudwalkBasePageForm
|
||||
extends CloudwalkBasePeriod
|
||||
{
|
||||
private static final long serialVersionUID = -4212911809130413023L;
|
||||
private int rowsOfPage = 10;
|
||||
|
||||
|
||||
|
||||
|
||||
private int currentPage = 1;
|
||||
|
||||
public int getCurrentPage() {
|
||||
return this.currentPage;
|
||||
}
|
||||
|
||||
public void setCurrentPage(int currentPage) {
|
||||
if (currentPage >= 1) {
|
||||
this.currentPage = currentPage;
|
||||
}
|
||||
}
|
||||
|
||||
public int getRowsOfPage() {
|
||||
return this.rowsOfPage;
|
||||
}
|
||||
|
||||
public void setRowsOfPage(int rowsOfPage) {
|
||||
if (rowsOfPage >= 1)
|
||||
this.rowsOfPage = rowsOfPage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+131
@@ -0,0 +1,131 @@
|
||||
package cn.cloudwalk.cloud.page;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class CloudwalkPageAble<T>
|
||||
implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = -3628865867907230918L;
|
||||
private long pageSize;
|
||||
private long currentPage;
|
||||
private long totalPages;
|
||||
private long totalRows;
|
||||
private long minRowNumber;
|
||||
private long maxRowNumber;
|
||||
private Collection<T> datas;
|
||||
|
||||
public CloudwalkPageAble() {}
|
||||
|
||||
public CloudwalkPageAble(Collection<T> list, CloudwalkPageInfo page, long totalCount) {
|
||||
/* 67 */ if (totalCount < 0L || page == null || page.getPageSize() <= 0 || page.getCurrentPage() < 0) {
|
||||
/* 68 */ throw new IllegalArgumentException("totalCount must more than 0");
|
||||
}
|
||||
|
||||
/* 71 */ this.datas = list;
|
||||
/* 72 */ this.totalRows = totalCount;
|
||||
|
||||
/* 74 */ this.pageSize = page.getPageSize();
|
||||
/* 75 */ this.currentPage = page.getCurrentPage();
|
||||
|
||||
/* 77 */ if (totalCount == 0L) {
|
||||
/* 78 */ this.totalPages = 0L;
|
||||
}
|
||||
/* 80 */ else if (totalCount % page.getPageSize() > 0L) {
|
||||
/* 81 */ this.totalPages = totalCount / page.getPageSize() + 1L;
|
||||
} else {
|
||||
/* 83 */ this.totalPages = totalCount / page.getPageSize();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* 88 */ if (this.totalRows == 0L) {
|
||||
/* 89 */ this.minRowNumber = 0L;
|
||||
} else {
|
||||
/* 91 */ this.minRowNumber = (this.currentPage - 1L) * page.getPageSize() + 1L;
|
||||
}
|
||||
|
||||
|
||||
/* 95 */ if (this.currentPage * page.getPageSize() > this.totalRows) {
|
||||
/* 96 */ this.maxRowNumber = this.totalRows;
|
||||
} else {
|
||||
/* 98 */ this.maxRowNumber = this.currentPage * page.getPageSize();
|
||||
}
|
||||
}
|
||||
|
||||
public long getCurrentPage() {
|
||||
return this.currentPage;
|
||||
}
|
||||
|
||||
public long getTotalPages() {
|
||||
return this.totalPages;
|
||||
}
|
||||
|
||||
public long getTotalRows() {
|
||||
return this.totalRows;
|
||||
}
|
||||
|
||||
public Collection<T> getDatas() {
|
||||
return this.datas;
|
||||
}
|
||||
|
||||
public long getMinRowNumber() {
|
||||
return this.minRowNumber;
|
||||
}
|
||||
|
||||
public long getMaxRowNumber() {
|
||||
return this.maxRowNumber;
|
||||
}
|
||||
|
||||
public long getPageSize() {
|
||||
return this.pageSize;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package cn.cloudwalk.cloud.page;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class CloudwalkPageDTO<T>
|
||||
implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = -1351931333484421041L;
|
||||
private CloudwalkPageInfo page;
|
||||
private T dto;
|
||||
|
||||
public CloudwalkPageDTO() {}
|
||||
|
||||
public CloudwalkPageDTO(CloudwalkPageInfo page, T dto) {
|
||||
this.page = page;
|
||||
this.dto = dto;
|
||||
}
|
||||
|
||||
public CloudwalkPageInfo getPage() {
|
||||
return this.page;
|
||||
}
|
||||
|
||||
public void setPage(CloudwalkPageInfo page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public T getDto() {
|
||||
return this.dto;
|
||||
}
|
||||
|
||||
public void setDto(T dto) {
|
||||
this.dto = dto;
|
||||
}
|
||||
|
||||
|
||||
public String toString() {
|
||||
return "CloudwalkPageDTO [page=" + this.page + ", dto=" + this.dto + "]";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
package cn.cloudwalk.cloud.page;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class CloudwalkPageInfo
|
||||
implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = -9065614200385450712L;
|
||||
private int pageSize;
|
||||
private int currentPage;
|
||||
|
||||
public CloudwalkPageInfo(int currentPage, int pageSize) {
|
||||
if (currentPage < 1 || pageSize < 1) {
|
||||
throw new IllegalArgumentException("currentPage and pageSize must more than 0.");
|
||||
}
|
||||
|
||||
this.currentPage = currentPage;
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public CloudwalkPageInfo() {
|
||||
this.currentPage = 1;
|
||||
this.pageSize = 20;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public int getPageStart() {
|
||||
if (this.currentPage < 1) {
|
||||
this.currentPage = 1;
|
||||
}
|
||||
|
||||
return (this.currentPage - 1) * this.pageSize;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public int getPageSize() {
|
||||
return this.pageSize;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public int getCurrentPage() {
|
||||
return this.currentPage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user