diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java new file mode 100644 index 00000000..5b1f93cc --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java @@ -0,0 +1,166 @@ +package com.ccsens.tall.bean.dto; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.servlet.http.Part; +import javax.validation.constraints.NotNull; + +/** + * @description: + * @author: whj + * @time: 2020/6/17 11:04 + */ +@Data +@ApiModel("wps相关请求参数") +public class WpsDto { + + @ApiModel("回调通知请求") + @Data + public static class Notify{ + @NotNull + @ApiModelProperty("请求签名") + @JsonProperty("_w_signature") + private String signature; + @NotNull + @ApiModelProperty("应用id") + @JsonProperty("_w_appid") + private String appId; + } + @ApiModel("回调通知请求body") + @Data + public static class NotifyBody{ + @NotNull + @ApiModelProperty("命令参数") + private String cmd; + @NotNull + @ApiModelProperty("信息内容") + private String body; + } + public static class NotifyResult{ + private Integer counts; + private String result; + private String detail; + } + + @ApiModel("获取所有历史版本文件信息请求") + @Data + public static class FileHistory{ + @NotNull + @ApiModelProperty("请求签名") + @JsonProperty("_w_signature") + private String signature; + @NotNull + @ApiModelProperty("应用id") + @JsonProperty("_w_appid") + private String appId; + } + @ApiModel("获取所有历史版本文件信息body请求") + @Data + public static class FileHistoryBody{ + @NotNull + @ApiModelProperty("文件id") + private Long id; + @NotNull + @ApiModelProperty("记录偏移量") + private Integer offset; + @NotNull + @ApiModelProperty("记录总数") + private Integer count; + } + + @ApiModel("获取特定版本的文件信息请求") + @Data + public static class FileRename{ + @NotNull + @ApiModelProperty("请求签名") + @JsonProperty("_w_signature") + private String signature; + @NotNull + @ApiModelProperty("应用id") + @JsonProperty("_w_appid") + private String appId; + } + @ApiModel("获取特定版本的文件信息请求") + @Data + public static class FileRenameBody{ + @NotNull + @ApiModelProperty("文件新名称") + private String name; + } + + @ApiModel("获取特定版本的文件信息请求") + @Data + public static class FileVersion{ + @NotNull + @ApiModelProperty("请求签名") + @JsonProperty("_w_signature") + private String signature; + @NotNull + @ApiModelProperty("应用id") + @JsonProperty("_w_appid") + private String appId; + } + + @ApiModel("获取文件元数据请求") + @Data + public static class FileInfo{ + @NotNull + @ApiModelProperty("请求签名") + @JsonProperty("_w_signature") + private String signature; + @NotNull + @ApiModelProperty("应用id") + @JsonProperty("_w_appid") + private String appId; + } + + @ApiModel("上传文件新版本请求") + @Data + public static class FileSave{ + @NotNull + @ApiModelProperty("请求签名") + @JsonProperty("_w_signature") + private String signature; + @NotNull + @ApiModelProperty("应用id") + @JsonProperty("_w_appid") + private String appId; + @ApiModelProperty("业务处理路径") + @JsonProperty("_w_url") + private String url; + } + + @ApiModel("获取用户信息请求") + @Data + public static class UserInfo{ + @NotNull + @ApiModelProperty("请求签名") + @JsonProperty("_w_signature") + private String signature; + @NotNull + @ApiModelProperty("应用id") + @JsonProperty("_w_appid") + private String appId; + } + @ApiModel("获取用户信息body请求") + @Data + public static class UserInfoBody{ + private Long[] ids; + } + + @ApiModel("上传文件新版本请求") + @Data + public static class FileNew{ + @NotNull + @ApiModelProperty("请求签名") + @JsonProperty("_w_signature") + private String signature; + @NotNull + @ApiModelProperty("应用id") + @JsonProperty("_w_appid") + private String appId; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/Constant.java b/tall/src/main/java/com/ccsens/tall/bean/po/Constant.java new file mode 100644 index 00000000..6d4368e1 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/Constant.java @@ -0,0 +1,95 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class Constant implements Serializable { + private Long id; + + private String tKey; + + private String tValue; + + private String description; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String gettKey() { + return tKey; + } + + public void settKey(String tKey) { + this.tKey = tKey == null ? null : tKey.trim(); + } + + public String gettValue() { + return tValue; + } + + public void settValue(String tValue) { + this.tValue = tValue == null ? null : tValue.trim(); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", tKey=").append(tKey); + sb.append(", tValue=").append(tValue); + sb.append(", description=").append(description); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ConstantExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ConstantExample.java new file mode 100644 index 00000000..7cfcc7a8 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ConstantExample.java @@ -0,0 +1,651 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ConstantExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ConstantExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTKeyIsNull() { + addCriterion("t_key is null"); + return (Criteria) this; + } + + public Criteria andTKeyIsNotNull() { + addCriterion("t_key is not null"); + return (Criteria) this; + } + + public Criteria andTKeyEqualTo(String value) { + addCriterion("t_key =", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyNotEqualTo(String value) { + addCriterion("t_key <>", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyGreaterThan(String value) { + addCriterion("t_key >", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyGreaterThanOrEqualTo(String value) { + addCriterion("t_key >=", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyLessThan(String value) { + addCriterion("t_key <", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyLessThanOrEqualTo(String value) { + addCriterion("t_key <=", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyLike(String value) { + addCriterion("t_key like", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyNotLike(String value) { + addCriterion("t_key not like", value, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyIn(List values) { + addCriterion("t_key in", values, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyNotIn(List values) { + addCriterion("t_key not in", values, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyBetween(String value1, String value2) { + addCriterion("t_key between", value1, value2, "tKey"); + return (Criteria) this; + } + + public Criteria andTKeyNotBetween(String value1, String value2) { + addCriterion("t_key not between", value1, value2, "tKey"); + return (Criteria) this; + } + + public Criteria andTValueIsNull() { + addCriterion("t_value is null"); + return (Criteria) this; + } + + public Criteria andTValueIsNotNull() { + addCriterion("t_value is not null"); + return (Criteria) this; + } + + public Criteria andTValueEqualTo(String value) { + addCriterion("t_value =", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueNotEqualTo(String value) { + addCriterion("t_value <>", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueGreaterThan(String value) { + addCriterion("t_value >", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueGreaterThanOrEqualTo(String value) { + addCriterion("t_value >=", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueLessThan(String value) { + addCriterion("t_value <", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueLessThanOrEqualTo(String value) { + addCriterion("t_value <=", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueLike(String value) { + addCriterion("t_value like", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueNotLike(String value) { + addCriterion("t_value not like", value, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueIn(List values) { + addCriterion("t_value in", values, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueNotIn(List values) { + addCriterion("t_value not in", values, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueBetween(String value1, String value2) { + addCriterion("t_value between", value1, value2, "tValue"); + return (Criteria) this; + } + + public Criteria andTValueNotBetween(String value1, String value2) { + addCriterion("t_value not between", value1, value2, "tValue"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProProjectFile.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProProjectFile.java new file mode 100644 index 00000000..8a2e1302 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProProjectFile.java @@ -0,0 +1,84 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProProjectFile implements Serializable { + private Long id; + + private Long projectId; + + private Long fileId; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getFileId() { + return fileId; + } + + public void setFileId(Long fileId) { + this.fileId = fileId; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectId=").append(projectId); + sb.append(", fileId=").append(fileId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProProjectFileExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProProjectFileExample.java new file mode 100644 index 00000000..49e87112 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProProjectFileExample.java @@ -0,0 +1,561 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProProjectFileExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProProjectFileExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andFileIdIsNull() { + addCriterion("file_id is null"); + return (Criteria) this; + } + + public Criteria andFileIdIsNotNull() { + addCriterion("file_id is not null"); + return (Criteria) this; + } + + public Criteria andFileIdEqualTo(Long value) { + addCriterion("file_id =", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotEqualTo(Long value) { + addCriterion("file_id <>", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThan(Long value) { + addCriterion("file_id >", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThanOrEqualTo(Long value) { + addCriterion("file_id >=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThan(Long value) { + addCriterion("file_id <", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThanOrEqualTo(Long value) { + addCriterion("file_id <=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdIn(List values) { + addCriterion("file_id in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotIn(List values) { + addCriterion("file_id not in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdBetween(Long value1, Long value2) { + addCriterion("file_id between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotBetween(Long value1, Long value2) { + addCriterion("file_id not between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFile.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFile.java new file mode 100644 index 00000000..b023dfb1 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFile.java @@ -0,0 +1,128 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class WpsFile implements Serializable { + private Long id; + + private Integer currentVersion; + + private String name; + + private Long size; + + private String downloadUrl; + + private Long creator; + + private Long modifier; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getCurrentVersion() { + return currentVersion; + } + + public void setCurrentVersion(Integer currentVersion) { + this.currentVersion = currentVersion; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + public String getDownloadUrl() { + return downloadUrl; + } + + public void setDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl == null ? null : downloadUrl.trim(); + } + + public Long getCreator() { + return creator; + } + + public void setCreator(Long creator) { + this.creator = creator; + } + + public Long getModifier() { + return modifier; + } + + public void setModifier(Long modifier) { + this.modifier = modifier; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", currentVersion=").append(currentVersion); + sb.append(", name=").append(name); + sb.append(", size=").append(size); + sb.append(", downloadUrl=").append(downloadUrl); + sb.append(", creator=").append(creator); + sb.append(", modifier=").append(modifier); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileExample.java new file mode 100644 index 00000000..9292baca --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileExample.java @@ -0,0 +1,821 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class WpsFileExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public WpsFileExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCurrentVersionIsNull() { + addCriterion("current_version is null"); + return (Criteria) this; + } + + public Criteria andCurrentVersionIsNotNull() { + addCriterion("current_version is not null"); + return (Criteria) this; + } + + public Criteria andCurrentVersionEqualTo(Integer value) { + addCriterion("current_version =", value, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionNotEqualTo(Integer value) { + addCriterion("current_version <>", value, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionGreaterThan(Integer value) { + addCriterion("current_version >", value, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionGreaterThanOrEqualTo(Integer value) { + addCriterion("current_version >=", value, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionLessThan(Integer value) { + addCriterion("current_version <", value, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionLessThanOrEqualTo(Integer value) { + addCriterion("current_version <=", value, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionIn(List values) { + addCriterion("current_version in", values, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionNotIn(List values) { + addCriterion("current_version not in", values, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionBetween(Integer value1, Integer value2) { + addCriterion("current_version between", value1, value2, "currentVersion"); + return (Criteria) this; + } + + public Criteria andCurrentVersionNotBetween(Integer value1, Integer value2) { + addCriterion("current_version not between", value1, value2, "currentVersion"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andSizeIsNull() { + addCriterion("size is null"); + return (Criteria) this; + } + + public Criteria andSizeIsNotNull() { + addCriterion("size is not null"); + return (Criteria) this; + } + + public Criteria andSizeEqualTo(Long value) { + addCriterion("size =", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotEqualTo(Long value) { + addCriterion("size <>", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeGreaterThan(Long value) { + addCriterion("size >", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeGreaterThanOrEqualTo(Long value) { + addCriterion("size >=", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeLessThan(Long value) { + addCriterion("size <", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeLessThanOrEqualTo(Long value) { + addCriterion("size <=", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeIn(List values) { + addCriterion("size in", values, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotIn(List values) { + addCriterion("size not in", values, "size"); + return (Criteria) this; + } + + public Criteria andSizeBetween(Long value1, Long value2) { + addCriterion("size between", value1, value2, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotBetween(Long value1, Long value2) { + addCriterion("size not between", value1, value2, "size"); + return (Criteria) this; + } + + public Criteria andDownloadUrlIsNull() { + addCriterion("download_url is null"); + return (Criteria) this; + } + + public Criteria andDownloadUrlIsNotNull() { + addCriterion("download_url is not null"); + return (Criteria) this; + } + + public Criteria andDownloadUrlEqualTo(String value) { + addCriterion("download_url =", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotEqualTo(String value) { + addCriterion("download_url <>", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlGreaterThan(String value) { + addCriterion("download_url >", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlGreaterThanOrEqualTo(String value) { + addCriterion("download_url >=", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlLessThan(String value) { + addCriterion("download_url <", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlLessThanOrEqualTo(String value) { + addCriterion("download_url <=", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlLike(String value) { + addCriterion("download_url like", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotLike(String value) { + addCriterion("download_url not like", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlIn(List values) { + addCriterion("download_url in", values, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotIn(List values) { + addCriterion("download_url not in", values, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlBetween(String value1, String value2) { + addCriterion("download_url between", value1, value2, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotBetween(String value1, String value2) { + addCriterion("download_url not between", value1, value2, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andCreatorIsNull() { + addCriterion("creator is null"); + return (Criteria) this; + } + + public Criteria andCreatorIsNotNull() { + addCriterion("creator is not null"); + return (Criteria) this; + } + + public Criteria andCreatorEqualTo(Long value) { + addCriterion("creator =", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotEqualTo(Long value) { + addCriterion("creator <>", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThan(Long value) { + addCriterion("creator >", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThanOrEqualTo(Long value) { + addCriterion("creator >=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThan(Long value) { + addCriterion("creator <", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThanOrEqualTo(Long value) { + addCriterion("creator <=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorIn(List values) { + addCriterion("creator in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotIn(List values) { + addCriterion("creator not in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorBetween(Long value1, Long value2) { + addCriterion("creator between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotBetween(Long value1, Long value2) { + addCriterion("creator not between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andModifierIsNull() { + addCriterion("modifier is null"); + return (Criteria) this; + } + + public Criteria andModifierIsNotNull() { + addCriterion("modifier is not null"); + return (Criteria) this; + } + + public Criteria andModifierEqualTo(Long value) { + addCriterion("modifier =", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierNotEqualTo(Long value) { + addCriterion("modifier <>", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierGreaterThan(Long value) { + addCriterion("modifier >", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierGreaterThanOrEqualTo(Long value) { + addCriterion("modifier >=", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierLessThan(Long value) { + addCriterion("modifier <", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierLessThanOrEqualTo(Long value) { + addCriterion("modifier <=", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierIn(List values) { + addCriterion("modifier in", values, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierNotIn(List values) { + addCriterion("modifier not in", values, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierBetween(Long value1, Long value2) { + addCriterion("modifier between", value1, value2, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierNotBetween(Long value1, Long value2) { + addCriterion("modifier not between", value1, value2, "modifier"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileUser.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileUser.java new file mode 100644 index 00000000..04e7c9d7 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileUser.java @@ -0,0 +1,95 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class WpsFileUser implements Serializable { + private Long id; + + private Long userId; + + private Long versionId; + + private Byte operation; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getVersionId() { + return versionId; + } + + public void setVersionId(Long versionId) { + this.versionId = versionId; + } + + public Byte getOperation() { + return operation; + } + + public void setOperation(Byte operation) { + this.operation = operation; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", versionId=").append(versionId); + sb.append(", operation=").append(operation); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileUserExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileUserExample.java new file mode 100644 index 00000000..9cee6be6 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileUserExample.java @@ -0,0 +1,621 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class WpsFileUserExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public WpsFileUserExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andVersionIdIsNull() { + addCriterion("version_id is null"); + return (Criteria) this; + } + + public Criteria andVersionIdIsNotNull() { + addCriterion("version_id is not null"); + return (Criteria) this; + } + + public Criteria andVersionIdEqualTo(Long value) { + addCriterion("version_id =", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotEqualTo(Long value) { + addCriterion("version_id <>", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdGreaterThan(Long value) { + addCriterion("version_id >", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdGreaterThanOrEqualTo(Long value) { + addCriterion("version_id >=", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLessThan(Long value) { + addCriterion("version_id <", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdLessThanOrEqualTo(Long value) { + addCriterion("version_id <=", value, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdIn(List values) { + addCriterion("version_id in", values, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotIn(List values) { + addCriterion("version_id not in", values, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdBetween(Long value1, Long value2) { + addCriterion("version_id between", value1, value2, "versionId"); + return (Criteria) this; + } + + public Criteria andVersionIdNotBetween(Long value1, Long value2) { + addCriterion("version_id not between", value1, value2, "versionId"); + return (Criteria) this; + } + + public Criteria andOperationIsNull() { + addCriterion("operation is null"); + return (Criteria) this; + } + + public Criteria andOperationIsNotNull() { + addCriterion("operation is not null"); + return (Criteria) this; + } + + public Criteria andOperationEqualTo(Byte value) { + addCriterion("operation =", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationNotEqualTo(Byte value) { + addCriterion("operation <>", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationGreaterThan(Byte value) { + addCriterion("operation >", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationGreaterThanOrEqualTo(Byte value) { + addCriterion("operation >=", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationLessThan(Byte value) { + addCriterion("operation <", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationLessThanOrEqualTo(Byte value) { + addCriterion("operation <=", value, "operation"); + return (Criteria) this; + } + + public Criteria andOperationIn(List values) { + addCriterion("operation in", values, "operation"); + return (Criteria) this; + } + + public Criteria andOperationNotIn(List values) { + addCriterion("operation not in", values, "operation"); + return (Criteria) this; + } + + public Criteria andOperationBetween(Byte value1, Byte value2) { + addCriterion("operation between", value1, value2, "operation"); + return (Criteria) this; + } + + public Criteria andOperationNotBetween(Byte value1, Byte value2) { + addCriterion("operation not between", value1, value2, "operation"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersion.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersion.java new file mode 100644 index 00000000..039d3440 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersion.java @@ -0,0 +1,128 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class WpsFileVersion implements Serializable { + private Long id; + + private Long fileId; + + private Integer version; + + private String name; + + private Long size; + + private String downloadUrl; + + private Long modifier; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getFileId() { + return fileId; + } + + public void setFileId(Long fileId) { + this.fileId = fileId; + } + + public Integer getVersion() { + return version; + } + + public void setVersion(Integer version) { + this.version = version; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + public String getDownloadUrl() { + return downloadUrl; + } + + public void setDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl == null ? null : downloadUrl.trim(); + } + + public Long getModifier() { + return modifier; + } + + public void setModifier(Long modifier) { + this.modifier = modifier; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", fileId=").append(fileId); + sb.append(", version=").append(version); + sb.append(", name=").append(name); + sb.append(", size=").append(size); + sb.append(", downloadUrl=").append(downloadUrl); + sb.append(", modifier=").append(modifier); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersionExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersionExample.java new file mode 100644 index 00000000..3c8f7670 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersionExample.java @@ -0,0 +1,821 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class WpsFileVersionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public WpsFileVersionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andFileIdIsNull() { + addCriterion("file_id is null"); + return (Criteria) this; + } + + public Criteria andFileIdIsNotNull() { + addCriterion("file_id is not null"); + return (Criteria) this; + } + + public Criteria andFileIdEqualTo(Long value) { + addCriterion("file_id =", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotEqualTo(Long value) { + addCriterion("file_id <>", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThan(Long value) { + addCriterion("file_id >", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdGreaterThanOrEqualTo(Long value) { + addCriterion("file_id >=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThan(Long value) { + addCriterion("file_id <", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdLessThanOrEqualTo(Long value) { + addCriterion("file_id <=", value, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdIn(List values) { + addCriterion("file_id in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotIn(List values) { + addCriterion("file_id not in", values, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdBetween(Long value1, Long value2) { + addCriterion("file_id between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andFileIdNotBetween(Long value1, Long value2) { + addCriterion("file_id not between", value1, value2, "fileId"); + return (Criteria) this; + } + + public Criteria andVersionIsNull() { + addCriterion("version is null"); + return (Criteria) this; + } + + public Criteria andVersionIsNotNull() { + addCriterion("version is not null"); + return (Criteria) this; + } + + public Criteria andVersionEqualTo(Integer value) { + addCriterion("version =", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotEqualTo(Integer value) { + addCriterion("version <>", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThan(Integer value) { + addCriterion("version >", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThanOrEqualTo(Integer value) { + addCriterion("version >=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThan(Integer value) { + addCriterion("version <", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThanOrEqualTo(Integer value) { + addCriterion("version <=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionIn(List values) { + addCriterion("version in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotIn(List values) { + addCriterion("version not in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionBetween(Integer value1, Integer value2) { + addCriterion("version between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotBetween(Integer value1, Integer value2) { + addCriterion("version not between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andSizeIsNull() { + addCriterion("size is null"); + return (Criteria) this; + } + + public Criteria andSizeIsNotNull() { + addCriterion("size is not null"); + return (Criteria) this; + } + + public Criteria andSizeEqualTo(Long value) { + addCriterion("size =", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotEqualTo(Long value) { + addCriterion("size <>", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeGreaterThan(Long value) { + addCriterion("size >", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeGreaterThanOrEqualTo(Long value) { + addCriterion("size >=", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeLessThan(Long value) { + addCriterion("size <", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeLessThanOrEqualTo(Long value) { + addCriterion("size <=", value, "size"); + return (Criteria) this; + } + + public Criteria andSizeIn(List values) { + addCriterion("size in", values, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotIn(List values) { + addCriterion("size not in", values, "size"); + return (Criteria) this; + } + + public Criteria andSizeBetween(Long value1, Long value2) { + addCriterion("size between", value1, value2, "size"); + return (Criteria) this; + } + + public Criteria andSizeNotBetween(Long value1, Long value2) { + addCriterion("size not between", value1, value2, "size"); + return (Criteria) this; + } + + public Criteria andDownloadUrlIsNull() { + addCriterion("download_url is null"); + return (Criteria) this; + } + + public Criteria andDownloadUrlIsNotNull() { + addCriterion("download_url is not null"); + return (Criteria) this; + } + + public Criteria andDownloadUrlEqualTo(String value) { + addCriterion("download_url =", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotEqualTo(String value) { + addCriterion("download_url <>", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlGreaterThan(String value) { + addCriterion("download_url >", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlGreaterThanOrEqualTo(String value) { + addCriterion("download_url >=", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlLessThan(String value) { + addCriterion("download_url <", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlLessThanOrEqualTo(String value) { + addCriterion("download_url <=", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlLike(String value) { + addCriterion("download_url like", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotLike(String value) { + addCriterion("download_url not like", value, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlIn(List values) { + addCriterion("download_url in", values, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotIn(List values) { + addCriterion("download_url not in", values, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlBetween(String value1, String value2) { + addCriterion("download_url between", value1, value2, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andDownloadUrlNotBetween(String value1, String value2) { + addCriterion("download_url not between", value1, value2, "downloadUrl"); + return (Criteria) this; + } + + public Criteria andModifierIsNull() { + addCriterion("modifier is null"); + return (Criteria) this; + } + + public Criteria andModifierIsNotNull() { + addCriterion("modifier is not null"); + return (Criteria) this; + } + + public Criteria andModifierEqualTo(Long value) { + addCriterion("modifier =", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierNotEqualTo(Long value) { + addCriterion("modifier <>", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierGreaterThan(Long value) { + addCriterion("modifier >", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierGreaterThanOrEqualTo(Long value) { + addCriterion("modifier >=", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierLessThan(Long value) { + addCriterion("modifier <", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierLessThanOrEqualTo(Long value) { + addCriterion("modifier <=", value, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierIn(List values) { + addCriterion("modifier in", values, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierNotIn(List values) { + addCriterion("modifier not in", values, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierBetween(Long value1, Long value2) { + addCriterion("modifier between", value1, value2, "modifier"); + return (Criteria) this; + } + + public Criteria andModifierNotBetween(Long value1, Long value2) { + addCriterion("modifier not between", value1, value2, "modifier"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsNotify.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsNotify.java new file mode 100644 index 00000000..a85b606e --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsNotify.java @@ -0,0 +1,84 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class WpsNotify implements Serializable { + private Long id; + + private String cmd; + + private String body; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCmd() { + return cmd; + } + + public void setCmd(String cmd) { + this.cmd = cmd == null ? null : cmd.trim(); + } + + public String getBody() { + return body; + } + + public void setBody(String body) { + this.body = body == null ? null : body.trim(); + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", cmd=").append(cmd); + sb.append(", body=").append(body); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/WpsNotifyExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsNotifyExample.java new file mode 100644 index 00000000..8d418877 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsNotifyExample.java @@ -0,0 +1,581 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class WpsNotifyExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public WpsNotifyExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCmdIsNull() { + addCriterion("cmd is null"); + return (Criteria) this; + } + + public Criteria andCmdIsNotNull() { + addCriterion("cmd is not null"); + return (Criteria) this; + } + + public Criteria andCmdEqualTo(String value) { + addCriterion("cmd =", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdNotEqualTo(String value) { + addCriterion("cmd <>", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdGreaterThan(String value) { + addCriterion("cmd >", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdGreaterThanOrEqualTo(String value) { + addCriterion("cmd >=", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdLessThan(String value) { + addCriterion("cmd <", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdLessThanOrEqualTo(String value) { + addCriterion("cmd <=", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdLike(String value) { + addCriterion("cmd like", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdNotLike(String value) { + addCriterion("cmd not like", value, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdIn(List values) { + addCriterion("cmd in", values, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdNotIn(List values) { + addCriterion("cmd not in", values, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdBetween(String value1, String value2) { + addCriterion("cmd between", value1, value2, "cmd"); + return (Criteria) this; + } + + public Criteria andCmdNotBetween(String value1, String value2) { + addCriterion("cmd not between", value1, value2, "cmd"); + return (Criteria) this; + } + + public Criteria andBodyIsNull() { + addCriterion("body is null"); + return (Criteria) this; + } + + public Criteria andBodyIsNotNull() { + addCriterion("body is not null"); + return (Criteria) this; + } + + public Criteria andBodyEqualTo(String value) { + addCriterion("body =", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyNotEqualTo(String value) { + addCriterion("body <>", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyGreaterThan(String value) { + addCriterion("body >", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyGreaterThanOrEqualTo(String value) { + addCriterion("body >=", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyLessThan(String value) { + addCriterion("body <", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyLessThanOrEqualTo(String value) { + addCriterion("body <=", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyLike(String value) { + addCriterion("body like", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyNotLike(String value) { + addCriterion("body not like", value, "body"); + return (Criteria) this; + } + + public Criteria andBodyIn(List values) { + addCriterion("body in", values, "body"); + return (Criteria) this; + } + + public Criteria andBodyNotIn(List values) { + addCriterion("body not in", values, "body"); + return (Criteria) this; + } + + public Criteria andBodyBetween(String value1, String value2) { + addCriterion("body between", value1, value2, "body"); + return (Criteria) this; + } + + public Criteria andBodyNotBetween(String value1, String value2) { + addCriterion("body not between", value1, value2, "body"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/UserVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/UserVo.java index 33f7d3d7..3c5d02e2 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/UserVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/UserVo.java @@ -95,6 +95,17 @@ public class UserVo { private Long userId; } + @Data + @ApiModel("用户信息") + public static class UserInfo { + @ApiModelProperty("用户id") + private Long id; + @ApiModelProperty("昵称") + private String nickname; + @ApiModelProperty("头像") + private String avatarUrl; + } + @Data @ApiModel("查询个人信息") public static class SelectUserInfo{ diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/WpsVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/WpsVo.java new file mode 100644 index 00000000..849d37a7 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/WpsVo.java @@ -0,0 +1,256 @@ +package com.ccsens.tall.bean.vo; + +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.annotation.JSONField; +import com.ccsens.tall.bean.po.WpsFile; +import com.ccsens.util.WebConstant; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @description: wps相关接口返回值 + * @author: whj + * @time: 2020/6/18 10:21 + */ +@ApiModel("wps相关接口返回值") +public class WpsVo { + @Data + @ApiModel("文件历史版本信息返回") + public static class FileHistory{ + private List histories; + + public FileHistory(List histories) { + this.histories = histories; + } + } + + @Data + @ApiModel("文件历史版本信息子元素") + public static class FileHistoryMsg { + @ApiModelProperty("文件id,字符串长度小于40") + private String id; + @ApiModelProperty("文件名") + private String name; + @ApiModelProperty("当前版本号,位数小于11") + private Integer version; + @ApiModelProperty("文件大小,单位为B") + private Long size; + @ApiModelProperty("文档下载地址") + @JsonProperty("download_url") + private String downloadUrl; + private Long create_time; + private Long modify_time; + private UserBase creator; + private UserBase modifier; + @JsonIgnore + private Long creator_id; + @JsonIgnore + private Long modifier_id; + @JsonIgnore + private Long fileVersionId; + } + + @Data + @ApiModel("获取用户信息返回") + public static class FileNew{ + @ApiModelProperty("文件路径") + private String redirect_url; + @ApiModelProperty("用户iD") + private String user_id; + } + + @Data + @ApiModel("获取用户信息返回") + public static class UserInfo{ + private List users; + + public static UserInfo getInstance(List infos) { + List userBases = new ArrayList<>(); + infos.forEach(info -> { + UserBase base = new UserBase(); + base.setId(String.valueOf(info.getId())); + base.setName(info.getNickname()); + base.setAvatar_url(info.getAvatarUrl()); + userBases.add(base); + }); + UserInfo userInfo = new UserInfo(); + userInfo.setUsers(userBases); + return userInfo; + } + } + + @ApiModel("用户基本信息") + @Data + public static class UserBase{ + @ApiModelProperty("用户id") + private String id; + @ApiModelProperty("用户名称") + private String name; + @ApiModelProperty("用户头像地址") + private String avatar_url; + + } + + @ApiModel("文件保存返回信息") + @Data + public static class FileSave { + @ApiModelProperty("文件基本信息") + private FileBase file; + + public FileSave(FileBase file) { + this.file = file; + } + } + + @Data + @ApiModel("文件基本信息") + public static class FileBase { + @ApiModelProperty("文件id,字符串长度小于40") + private String id; + @ApiModelProperty("文件名") + private String name; + @ApiModelProperty("当前版本号,位数小于11") + @JsonProperty("version") + private Integer currentVersion; + @ApiModelProperty("文件大小,单位为B") + private Long size; + @ApiModelProperty("文档下载地址") + @JsonProperty("download_url") + private String downloadUrl; + private String creator; + private String modifier; + private Long create_time; + private Long modify_time; + @JsonIgnore + private Long fileVersionId; + } + + @Data + @ApiModel("文件信息查询返回") + public static class FileInfo{ + @ApiModelProperty("文件信息") + private File file; + @ApiModelProperty("用户信息") + private User user; + } + + @ApiModel("文件信息") + @Data + public static class File{ + @ApiModelProperty("文件id,字符串长度小于40") + private String id; + @ApiModelProperty("文件名") + private String name; + @ApiModelProperty("当前版本号,位数小于11") + private Integer version; + @ApiModelProperty("文件大小,单位为B") + private Long size; + @ApiModelProperty("文档下载地址") + private String download_url; + @ApiModelProperty("创建者id,字符串长度小于40") + private String creator; + @ApiModelProperty("创建时间,时间戳,单位为秒") + private Long create_time; + @ApiModelProperty("修改者id,字符串长度小于40") + private String modifier; + @ApiModelProperty("修改时间,时间戳,单位为秒") + private Long modify_time; + @ApiModelProperty("用户权限") + private UserAcl user_acl = new UserAcl(); + @ApiModelProperty("水印") + private Watermark watermark; + + public File(String id, String name, Integer version, Long size, String download_url, String creator, Long create_time, String modifier, Long modify_time) { + this.id = id; + this.name = name; + this.version = version; + this.size = size; + this.download_url = download_url; + this.creator = creator; + this.create_time = create_time; + this.modifier = modifier; + this.modify_time = modify_time; + } + + public static File beanToVo(WpsFile wpsFile, String name) { + File file = new File(wpsFile.getId()+"", wpsFile.getName(), + wpsFile.getCurrentVersion(), wpsFile.getSize(), + wpsFile.getDownloadUrl(), wpsFile.getCreator() + "", + wpsFile.getCreatedAt().getTime()/1000, + wpsFile.getModifier() + "", + wpsFile.getUpdatedAt().getTime()/1000 + ); + Watermark watermark = new Watermark(StrUtil.isEmpty(name) ? WebConstant.DEFAULT_NICKNAME : name); + file.watermark = watermark; + return file; + } + } + + @ApiModel("用户信息") + @Data + public static class User{ + @ApiModelProperty("用户id") + private String id; + @ApiModelProperty("用户名称") + private String name; + @ApiModelProperty("用户操作权限,write:可编辑,read:预览") + private String permission = WebConstant.Wps.PERMISSION_READ; + @ApiModelProperty("用户头像地址") + private String avatar_url; + + public static User getInstance(UserVo.UserInfo userInfo) { + User user = new User(); + user.setId(String.valueOf(userInfo.getId())); + user.setName(userInfo.getNickname()); + user.setAvatar_url(userInfo.getAvatarUrl()); + return user; + } + } + + @ApiModel("用户权限信息") + @Data + public static class UserAcl{ + @ApiModelProperty("重命名权限,1为打开该权限,0为关闭该权限,默认为0") + private Byte rename = 1; + @ApiModelProperty("历史版本权限,1为打开该权限,0为关闭该权限,默认为1") + private Byte history = 1; + @ApiModelProperty("复制") + private Byte copy = 1; + @ApiModelProperty("导出PDF") + private Byte export = 1; + @ApiModelProperty("打印") + private Byte print = 1; + + } + + @ApiModel("水印信息") + @Data + public static class Watermark{ + @ApiModelProperty("水印类型, 0为无水印; 1为文字水印") + private Byte type; + @ApiModelProperty("文字水印的文字,当type为1时此字段必选") + private String value; + @ApiModelProperty("水印的透明度,非必选,有默认值") + private String fillstyle; + @ApiModelProperty("水印的字体,非必选,有默认值") + private String font; + @ApiModelProperty("水印的旋转度,非必选,有默认值") + private String rotate; + @ApiModelProperty("水印水平间距,非必选,有默认值") + private String horizontal; + @ApiModelProperty("水印垂直间距,非必选,有默认值") + private String vertical; + + public Watermark(String value) { + this.type = 1; + this.value = value; + } + } +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserDao.java index e5ab0810..193d7a5d 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysUserDao.java @@ -5,6 +5,8 @@ import com.ccsens.tall.persist.mapper.SysUserMapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; +import java.util.List; + @Repository public interface SysUserDao extends SysUserMapper { @@ -26,6 +28,19 @@ public interface SysUserDao extends SysUserMapper { void replaceComment(@Param("oldUserId")Long userId, @Param("newUserId") Long currentUserId); + /** + * 查询用户信息 + * @param userId 用户id + * @return 用户信息 + */ + UserVo.UserInfo getUserInfoByUserId(Long userId); + + /** + * 根据id查询用户信息 + * @param ids 用户id数组 + * @return 用户信息列表 + */ + List queryUserInfos(Long[] ids); /** * 查找个人详细信息 * @param currentUserId userId diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/WpsFileDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/WpsFileDao.java new file mode 100644 index 00000000..7f6a80c6 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/WpsFileDao.java @@ -0,0 +1,37 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.bean.dto.WpsDto; +import com.ccsens.tall.bean.vo.WpsVo; +import com.ccsens.tall.persist.mapper.WpsFileMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * @author whj + */ +public interface WpsFileDao extends WpsFileMapper { + + + /** + * 查詢指定版本信息 + * @param fileId 文件id + * @param version 版本 + * @return 文件信息 + */ + WpsVo.FileBase getVersion(@Param("fileId") Long fileId, @Param("version") Integer version); + + /** + * 文件重命名 + * @param fileId 文件id + * @param name 文件名称 + */ + void updateName(@Param("fileId") long fileId, @Param("fileName") String name); + + /** + * 分页查询历史版本文件信息 + * @param body 分页信息和文件id + * @return 历史文件信息 + */ + List queryFileHistory(WpsDto.FileHistoryBody body); +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ConstantMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ConstantMapper.java new file mode 100644 index 00000000..146c99b0 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ConstantMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.Constant; +import com.ccsens.tall.bean.po.ConstantExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ConstantMapper { + long countByExample(ConstantExample example); + + int deleteByExample(ConstantExample example); + + int deleteByPrimaryKey(Long id); + + int insert(Constant record); + + int insertSelective(Constant record); + + List selectByExample(ConstantExample example); + + Constant selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") Constant record, @Param("example") ConstantExample example); + + int updateByExample(@Param("record") Constant record, @Param("example") ConstantExample example); + + int updateByPrimaryKeySelective(Constant record); + + int updateByPrimaryKey(Constant record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProProjectFileMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProProjectFileMapper.java new file mode 100644 index 00000000..be545caf --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProProjectFileMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProProjectFile; +import com.ccsens.tall.bean.po.ProProjectFileExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProProjectFileMapper { + long countByExample(ProProjectFileExample example); + + int deleteByExample(ProProjectFileExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProProjectFile record); + + int insertSelective(ProProjectFile record); + + List selectByExample(ProProjectFileExample example); + + ProProjectFile selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProProjectFile record, @Param("example") ProProjectFileExample example); + + int updateByExample(@Param("record") ProProjectFile record, @Param("example") ProProjectFileExample example); + + int updateByPrimaryKeySelective(ProProjectFile record); + + int updateByPrimaryKey(ProProjectFile record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileMapper.java new file mode 100644 index 00000000..ba2f8650 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.WpsFile; +import com.ccsens.tall.bean.po.WpsFileExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface WpsFileMapper { + long countByExample(WpsFileExample example); + + int deleteByExample(WpsFileExample example); + + int deleteByPrimaryKey(Long id); + + int insert(WpsFile record); + + int insertSelective(WpsFile record); + + List selectByExample(WpsFileExample example); + + WpsFile selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") WpsFile record, @Param("example") WpsFileExample example); + + int updateByExample(@Param("record") WpsFile record, @Param("example") WpsFileExample example); + + int updateByPrimaryKeySelective(WpsFile record); + + int updateByPrimaryKey(WpsFile record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileUserMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileUserMapper.java new file mode 100644 index 00000000..73042c73 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileUserMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.WpsFileUser; +import com.ccsens.tall.bean.po.WpsFileUserExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface WpsFileUserMapper { + long countByExample(WpsFileUserExample example); + + int deleteByExample(WpsFileUserExample example); + + int deleteByPrimaryKey(Long id); + + int insert(WpsFileUser record); + + int insertSelective(WpsFileUser record); + + List selectByExample(WpsFileUserExample example); + + WpsFileUser selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") WpsFileUser record, @Param("example") WpsFileUserExample example); + + int updateByExample(@Param("record") WpsFileUser record, @Param("example") WpsFileUserExample example); + + int updateByPrimaryKeySelective(WpsFileUser record); + + int updateByPrimaryKey(WpsFileUser record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileVersionMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileVersionMapper.java new file mode 100644 index 00000000..dae693c8 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsFileVersionMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.WpsFileVersion; +import com.ccsens.tall.bean.po.WpsFileVersionExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface WpsFileVersionMapper { + long countByExample(WpsFileVersionExample example); + + int deleteByExample(WpsFileVersionExample example); + + int deleteByPrimaryKey(Long id); + + int insert(WpsFileVersion record); + + int insertSelective(WpsFileVersion record); + + List selectByExample(WpsFileVersionExample example); + + WpsFileVersion selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") WpsFileVersion record, @Param("example") WpsFileVersionExample example); + + int updateByExample(@Param("record") WpsFileVersion record, @Param("example") WpsFileVersionExample example); + + int updateByPrimaryKeySelective(WpsFileVersion record); + + int updateByPrimaryKey(WpsFileVersion record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsNotifyMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsNotifyMapper.java new file mode 100644 index 00000000..47bc017f --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/WpsNotifyMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.WpsNotify; +import com.ccsens.tall.bean.po.WpsNotifyExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface WpsNotifyMapper { + long countByExample(WpsNotifyExample example); + + int deleteByExample(WpsNotifyExample example); + + int deleteByPrimaryKey(Long id); + + int insert(WpsNotify record); + + int insertSelective(WpsNotify record); + + List selectByExample(WpsNotifyExample example); + + WpsNotify selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") WpsNotify record, @Param("example") WpsNotifyExample example); + + int updateByExample(@Param("record") WpsNotify record, @Param("example") WpsNotifyExample example); + + int updateByPrimaryKeySelective(WpsNotify record); + + int updateByPrimaryKey(WpsNotify record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/service/IUserService.java b/tall/src/main/java/com/ccsens/tall/service/IUserService.java index 7147b182..91b1238b 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IUserService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IUserService.java @@ -98,4 +98,11 @@ public interface IUserService { String getUserNameByUserId(Long userId); + /** + * 根据id查询用户信息 + * @param ids + * @return + */ + List queryUserInfos(Long[] ids); + } diff --git a/tall/src/main/java/com/ccsens/tall/service/IWpsService.java b/tall/src/main/java/com/ccsens/tall/service/IWpsService.java new file mode 100644 index 00000000..b404c1b9 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/IWpsService.java @@ -0,0 +1,79 @@ +package com.ccsens.tall.service; + +import com.ccsens.tall.bean.dto.WpsDto; +import com.ccsens.tall.bean.vo.WpsVo; + +import javax.servlet.http.Part; +import java.util.List; + +/** + * @author whj + */ +public interface IWpsService { + /** + * 获取文件元数据 + * @param fileId 文件ID + * @param token token + * @return 文件信息 + * @throws Exception 异常 + */ + WpsVo.FileInfo getFileInfo(String fileId, String token) throws Exception; + + /** + * 上传文件新版本 + * @param token 身份识别 + * @param fileId 文件id + * @param fileSave 文件保存其他属性 + * @param file 文件 + * @return 保存结果 + * @throws Exception 异常 + */ + WpsVo.FileSave fileSave(String token, String fileId, WpsDto.FileSave fileSave, Part file) throws Exception; + + /** + * 新建文件 + * @param token 身份识别 + * @param fileId 文件id + * + * @param name 文件名称 + * @param file 文件 + * @return 文件信息 + * @throws Exception 异常 + */ + WpsVo.FileNew fileNew(String token, String fileId, String name, Part file) throws Exception; + + /** + * 在历史版本预览和回滚历史版本的时候,获取特定版本文档的文件信息。 + * @param token 身份识别 + * @param fileId 文件id + * @param version 版本 + * @return 文件信息 + * @throws Exception 异常 + */ + WpsVo.FileBase fileVersion(String token, Long fileId, Integer version) throws Exception; + + /** + * 修改文件名 + * @param token 身份识别 + * @param fileId 文件id + * @param renameBody 重命名相关 + * @throws Exception 异常 + */ + void fileRename(String token, long fileId, WpsDto.FileRenameBody renameBody) throws Exception; + + /** + * 分页查询历史版本信息 + * @param token 身份识别 + * @param body 分页和文件信息 + * @return 历史版本 + * @throws Exception 异常 + */ + List queryFileHistory(String token, WpsDto.FileHistoryBody body) throws Exception; + + /** + * wps通知 + * @param token 身份识别 + * @param body 通知内容 + */ + void notify(String token, WpsDto.NotifyBody body) throws Exception; +} diff --git a/tall/src/main/java/com/ccsens/tall/service/UserService.java b/tall/src/main/java/com/ccsens/tall/service/UserService.java index 7b1f6388..69cb39ac 100644 --- a/tall/src/main/java/com/ccsens/tall/service/UserService.java +++ b/tall/src/main/java/com/ccsens/tall/service/UserService.java @@ -1,11 +1,9 @@ package com.ccsens.tall.service; import cn.hutool.core.bean.BeanUtil; -import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.lang.Snowflake; import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSONObject; @@ -23,20 +21,14 @@ import com.ccsens.util.enterprisewx.vo.WeiXinVo; import com.ccsens.util.exception.BaseException; import com.ccsens.util.wx.WxGzhUtil; import com.ccsens.util.wx.WxXcxUtil; -import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.RandomStringUtils; -import org.eclipse.jetty.http.HttpStatus; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import org.xhtmlrenderer.css.parser.property.PrimitivePropertyBuilders; -import java.security.NoSuchAlgorithmException; -import java.security.spec.InvalidKeySpecException; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -1578,4 +1570,11 @@ public class UserService implements IUserService { public String getUserNameByUserId(Long userId) { return userDao.getUserNameByUserId(userId); } + + @Override + public List queryUserInfos(Long[] ids) { + + List infos = userDao.queryUserInfos(ids); + return infos; + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/WpsService.java b/tall/src/main/java/com/ccsens/tall/service/WpsService.java new file mode 100644 index 00000000..dc301378 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/WpsService.java @@ -0,0 +1,301 @@ +package com.ccsens.tall.service; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.io.FileUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.dto.WpsDto; +import com.ccsens.tall.bean.po.*; +import com.ccsens.tall.bean.vo.UserVo; +import com.ccsens.tall.bean.vo.WpsVo; +import com.ccsens.tall.persist.dao.SysUserDao; +import com.ccsens.tall.persist.dao.WpsFileDao; +import com.ccsens.tall.persist.mapper.ProProjectFileMapper; +import com.ccsens.tall.persist.mapper.WpsFileUserMapper; +import com.ccsens.tall.persist.mapper.WpsFileVersionMapper; +import com.ccsens.tall.persist.mapper.WpsNotifyMapper; +import com.ccsens.util.*; +import com.ccsens.util.exception.BaseException; +import io.jsonwebtoken.Claims; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import javax.servlet.http.Part; +import java.io.File; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @description: + * @author: whj + * @time: 2020/6/17 18:05 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class WpsService implements IWpsService { + + @Resource + private WpsFileDao wpsFileDao; + @Resource + private WpsFileVersionMapper wpsFileVersionMapper; + @Resource + private WpsFileUserMapper wpsFileUserMapper; + @Resource + private SysUserDao sysUserDao; + @Resource + private ProProjectFileMapper proProjectFileMapper; + @Resource + private WpsNotifyMapper wpsNotifyMapper; + @Resource + private IProRoleService proRoleService; + @Resource + private RedisUtil redisUtil; + @Resource + private Snowflake snowflake; + + private String fileUrl = "http://wwo.wps.cn/office/{}/{}?_w_fname={}&_w_userid={}&_w_appid="+WebConstant.Wps.APPID+"&_w_signature={}"; + + @Override + public void notify(String token, WpsDto.NotifyBody body) throws Exception { + Long userId = getUserId(token); + WpsNotify wpsNotify = new WpsNotify(); + wpsNotify.setId(snowflake.nextId()); + wpsNotify.setCmd(body.getCmd()); + wpsNotify.setBody(body.getBody()); + wpsNotifyMapper.insertSelective(wpsNotify); + } + + @Override + public void fileRename(String token, long fileId, WpsDto.FileRenameBody renameBody) throws Exception { + Long userId = getUserId(token); + // 修改当前文件名 + WpsFile file = wpsFileDao.selectByPrimaryKey(fileId); + if (file == null) { + log.info("文件不存在"); + throw new BaseException(CodeEnum.FILE_NOT_FOUND); + } + WpsFile wpsFile = new WpsFile(); + wpsFile.setId(fileId); + wpsFile.setName(renameBody.getName()); + wpsFile.setModifier(userId); + wpsFileDao.updateByPrimaryKeySelective(wpsFile); + // 删除原来的文件版本记录 + WpsFileVersionExample wpsFileVersionExample = new WpsFileVersionExample(); + wpsFileVersionExample.createCriteria().andFileIdEqualTo(fileId) + .andVersionEqualTo(wpsFile.getCurrentVersion()) + .andRecStatusEqualTo(WebConstant.REC_STATUS.Normal.value); + WpsFileVersion updateVersion = new WpsFileVersion(); + updateVersion.setRecStatus(WebConstant.REC_STATUS.Deleted.value); + wpsFileVersionMapper.updateByExampleSelective(updateVersion, wpsFileVersionExample); + // 保存版本信息 + WpsFileVersion version = saveVersion(wpsFile); + // 保存操作记录 + WpsFileUser fileUser = initFileUser(userId, version.getId()); + fileUser.setOperation(WebConstant.Wps.USER_OPERATION_RENAME); + wpsFileUserMapper.insertSelective(fileUser); + } + + @Override + public List queryFileHistory(String token, WpsDto.FileHistoryBody body) throws Exception { + Long userId = getUserId(token); + List msgs = wpsFileDao.queryFileHistory(body); + return msgs; + } + + @Override + public WpsVo.FileBase fileVersion(String token, Long fileId, Integer version) throws Exception { + Long userId = getUserId(token); + // 查找指定版本version + WpsVo.FileBase base = wpsFileDao.getVersion(fileId, version); + // 保存用户打开文件旧版本记录 + WpsFileUser wpsFileUser = initFileUser(userId, base.getFileVersionId()); + wpsFileUser.setOperation(WebConstant.Wps.USER_OPERATION_OLD); + wpsFileUserMapper.insertSelective(wpsFileUser); + return base; + } + + @Override + public WpsVo.FileNew fileNew(String token, String fileId, String name, Part file) throws Exception { + WpsFile wpsFile = saveWpsFile(token, fileId, file,WebConstant.Wps.USER_OPERATION_NEW); + String fileName = UploadFileUtil_Servlet3.getFileNameByPart(file); + String ext = FileUtil.extName(fileName); + String fileType = WebConstant.Wps.getFileType(ext); + Map paramMap= new HashMap<>(); + paramMap.put("_w_appid", WebConstant.Wps.APPID); + paramMap.put("_w_fname", fileName); + paramMap.put("_w_userid", String.valueOf(wpsFile.getCreator())); + String newSignature = WpsSignature.getSignature(paramMap, WebConstant.Wps.APPKEY); + String url = StrUtil.format(fileUrl, fileType, wpsFile.getId(), fileName, newSignature); + WpsVo.FileNew fileNew = new WpsVo.FileNew(); + fileNew.setRedirect_url(url); + fileNew.setUser_id(fileNew.getUser_id()); + return fileNew; + } + + @Override + public WpsVo.FileInfo getFileInfo(String fileId, String token) throws Exception { + + Long userId = getUserId(token); + // 查询文件信息 + WpsFile wpsFile = wpsFileDao.selectByPrimaryKey(Long.parseLong(fileId)); + log.info("文件信息:{}", wpsFile); + if (wpsFile == null) { + throw new BaseException(CodeEnum.FILE_NOT_FOUND); + } + + // 查询用户信息 + UserVo.UserInfo userInfo = sysUserDao.getUserInfoByUserId(userId); + log.info("用户信息:{}", userInfo); + if (userInfo == null) { + throw new BaseException(CodeEnum.NOT_LOGIN); + } + WpsVo.User user = WpsVo.User.getInstance(userInfo); + + // 记录用户操作信息 + WpsFileVersionExample versionExample = new WpsFileVersionExample(); + versionExample.createCriteria().andFileIdEqualTo(wpsFile.getId()).andVersionEqualTo(wpsFile.getCurrentVersion()); + List wpsFileVersions = wpsFileVersionMapper.selectByExample(versionExample); + if (CollectionUtil.isEmpty(wpsFileVersions)) { + log.info("未找到对应的版本信息:{},{}",wpsFile.getId(), wpsFile.getCurrentVersion()); + throw new BaseException(CodeEnum.PARAM_ERROR); + } + WpsFileUser wpsFileUser = initFileUser(userId, wpsFileVersions.get(0).getId()); + + //封装对象 + WpsVo.FileInfo fileInfo = new WpsVo.FileInfo(); + WpsVo.File file = WpsVo.File.beanToVo(wpsFile,userInfo.getNickname()); + fileInfo.setFile(file); + fileInfo.setUser(user); + + // 查询权限信息 + List proProjectFiles = getProProjectFiles(wpsFile.getId()); + log.info("文件项目关系:{}", proProjectFiles); + if (CollectionUtil.isEmpty(proProjectFiles)) { + wpsFileUser.setOperation(WebConstant.Wps.USER_OPERATION_READ); + wpsFileUserMapper.insertSelective(wpsFileUser); + return fileInfo; + } + + int power = proRoleService.selectPowerByRoleName(userId, proProjectFiles.get(0).getId()); + log.info("权限:{}", power); + if (power > 1) { + user.setPermission(WebConstant.Wps.PERMISSION_WRITE); + } + wpsFileUser.setOperation(power > 1 ? WebConstant.Wps.USER_OPERATION_WRITE : WebConstant.Wps.USER_OPERATION_READ); + wpsFileUserMapper.insertSelective(wpsFileUser); + return fileInfo; + } + + /** + * 初始化用户和文档(无操作类型) + * @param userId + * @param fileId + * @return + */ + private WpsFileUser initFileUser(Long userId, Long fileId) { + WpsFileUser wpsFileUser = new WpsFileUser(); + wpsFileUser.setId(snowflake.nextId()); + wpsFileUser.setVersionId(fileId); + wpsFileUser.setUserId(userId); + return wpsFileUser; + } + + private List getProProjectFiles(Long fileId) { + ProProjectFileExample projectFileExample = new ProProjectFileExample(); + projectFileExample.createCriteria().andFileIdEqualTo(fileId); + return proProjectFileMapper.selectByExample(projectFileExample); + } + + @Override + public WpsVo.FileSave fileSave(String token, String fileId, WpsDto.FileSave fileSave, Part file) throws Exception { + WpsFile wpsFile = saveWpsFile(token, fileId, file,WebConstant.Wps.USER_OPERATION_SAVE); + + // 返回参数 + WpsVo.FileBase fileBase = new WpsVo.FileBase(); + BeanUtils.copyProperties(wpsFile, fileBase); + fileBase.setCreate_time(wpsFile.getCreatedAt().getTime()/1000); + fileBase.setModify_time(wpsFile.getUpdatedAt().getTime()/1000); + + return new WpsVo.FileSave(fileBase); + } + + private WpsFile saveWpsFile(String token, String fileId, Part file, Byte operation) throws Exception { + Long userId = getUserId(token); + // 保存文件 + String allowedExt = WebConstant.Wps.FILE_TYPE_ALL; + String dir = WebConstant.UPLOAD_PATH_BASE + File.separator + WebConstant.UPLOAD_PATH_WPS; + String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExt, dir); + String filePath = WebConstant.UPLOAD_PATH_WPS + File.separator + path; + String name = UploadFileUtil_Servlet3.getFileNameByPart(file); + // 保存文件版本信息 + WpsFile wpsFile = saveWpsFile(fileId, file, userId, filePath, name); + // 更新文件记录 + WpsFileVersion version = saveVersion(wpsFile); + // 调用接口,更新数据项目接口(异步调用) + // 保存用户提交记录 + WpsFileUser wpsFileUser = initFileUser(userId, version.getId()); + wpsFileUser.setOperation( operation); + wpsFileUserMapper.insertSelective(wpsFileUser); + return wpsFile; + } + + private WpsFileVersion saveVersion(WpsFile wpsFile) { + WpsFileVersion version = new WpsFileVersion(); + version.setId(snowflake.nextId()); + version.setFileId(wpsFile.getId()); + version.setVersion(wpsFile.getCurrentVersion()); + version.setName(wpsFile.getName()); + version.setSize(wpsFile.getSize()); + version.setDownloadUrl(wpsFile.getDownloadUrl()); + version.setModifier(wpsFile.getModifier()); + wpsFileVersionMapper.insertSelective(version); + return version; + } + + /** + * 保存文件信息 + * @param fileId + * @param file + * @param userId + * @param filePath + * @param name + * @return + */ + private WpsFile saveWpsFile(String fileId, Part file, Long userId, String filePath, String name) { + WpsFile wpsFile; + if (StrUtil.isEmpty(fileId)) { + // 创建文件ID + wpsFile = new WpsFile(); + wpsFile.setId(snowflake.nextId()); + wpsFile.setCurrentVersion(1); + wpsFile.setCreator(userId); + } else { + wpsFile = wpsFileDao.selectByPrimaryKey(Long.parseLong(fileId)); + if (wpsFile == null) { + throw new BaseException(CodeEnum.FILE_NOT_FOUND); + } + wpsFile.setCurrentVersion(wpsFile.getCurrentVersion() + 1); + } + wpsFile.setName(name); + wpsFile.setSize(file.getSize()); + wpsFile.setDownloadUrl(PropUtil.domain + filePath); + wpsFile.setModifier(userId); + return wpsFile; + } + + private Long getUserId(String token) throws Exception { + Claims claims = JwtUtil.parseJWT(token, WebConstant.JWT_ACCESS_TOKEN_SECERT); + long userId = Long.parseLong(claims.getSubject()); + String redisToken = (String)redisUtil.get(RedisKeyManager.getTokenCachedKey(userId)); + if (StrUtil.isEmpty(redisToken)) { + throw new BaseException(CodeEnum.NOT_LOGIN); + } + return userId; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/web/WpsController.java b/tall/src/main/java/com/ccsens/tall/web/WpsController.java new file mode 100644 index 00000000..92f6bb64 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/web/WpsController.java @@ -0,0 +1,217 @@ +package com.ccsens.tall.web; + +import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.dto.WpsDto; +import com.ccsens.tall.bean.vo.UserVo; +import com.ccsens.tall.bean.vo.WpsVo; +import com.ccsens.tall.service.IUserService; +import com.ccsens.tall.service.IWpsService; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.WebConstant; +import com.ccsens.util.WpsSignature; +import com.ccsens.util.exception.BaseException; +import io.swagger.annotations.*; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.Part; +import javax.validation.Valid; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @description: + * @author: whj + * @time: 2020/6/17 10:07 + */ +@Slf4j +@Api(tags = "wps相关权限") +@RestController +@RequestMapping("/v1/3rd") +public class WpsController { + + @Resource + private IWpsService wpsService; + @Resource + private IUserService userService; + + @ApiOperation(value = "获取文件元数据", notes = "在预览或编辑的时候,通过接口校验权限并获取文件信息") + @ApiImplicitParams({ + }) + @GetMapping(value = "file/info", produces = {"application/json;charset=UTF-8"}) + public WpsVo.FileInfo fileInfo(HttpServletRequest request, @Valid WpsDto.FileInfo fileInfo) throws Exception { + log.info("获取文件元数据请求参数:{}", fileInfo); + WpsHeader header = checkSignature(request, fileInfo.getSignature()); + // 判断登录,查询userid + WpsVo.FileInfo fileInfoVo = wpsService.getFileInfo(header.getFileId(), header.getToken()); + log.info("获取文件元数据返回:{}", fileInfoVo); + + return fileInfoVo; + } + + + + @ApiOperation(value = "获取用户信息", notes = "在编辑的时候获取编辑过此文件的用户信息,展示在协作记录里面") + @ApiImplicitParams({ + }) + @PostMapping(value = "user/info", produces = {"application/json;charset=UTF-8"}) + public WpsVo.UserInfo userInfo(HttpServletRequest request, WpsDto.UserInfo userInfo, + @RequestBody WpsDto.UserInfoBody body){ + log.info("获取用户信息请求参数:{}, ids:{}", userInfo, body); + if (body.getIds() == null || body.getIds().length <= 0) { + log.info("请求参数中没有用户ID"); + throw new BaseException(CodeEnum.PARAM_ERROR); + } + WpsHeader header = checkSignature(request, userInfo.getSignature()); + List infos = userService.queryUserInfos(body.getIds()); + log.info("获取用户信息:{}", infos); + return WpsVo.UserInfo.getInstance(infos); + } + + @ApiOperation(value = "上传文件新版本", notes = "编辑完保存回对应云盘") + @ApiImplicitParams({ + }) + @PostMapping(value = "file/save", produces = {"application/json;charset=UTF-8"}) + public WpsVo.FileSave fileSave(HttpServletRequest request, @Valid WpsDto.FileSave fileSave, @RequestBody Part file) throws Exception { + log.info("上传文件新版本请求参数:{}", fileSave); + WpsHeader header = checkSignature(request, fileSave.getSignature()); + + WpsVo.FileSave save = wpsService.fileSave(header.getToken(), header.getFileId(), fileSave, file); + log.info("上传文件新版本返回:{}", save); + return save; + } + + + + @ApiOperation(value = "通知文件有那些人在协作协作", notes = "通知此文件目前有那些人正在协作") + @ApiImplicitParams({ + }) + @PostMapping(value = "file/online", produces = {"application/json;charset=UTF-8"}) + public JsonResponse fileOnline(HttpServletRequest request, WpsDto.UserInfo userInfo, + @RequestBody WpsDto.UserInfoBody body){ + log.info("通知文件有那些人在协作协作请求参数:{}, ids:{}", userInfo, body); + /* + 当有用户加入或者退出协作的时候 ,上传当前文档协作者的用户信息,可以用作上下线通知。此接口可以根据需要实现,若不实现直接返回http响应码200。 + */ + // 不实现,直接返回成功 + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "获取特定版本的文件信息", notes = "在回滚版本的时候需要获取历史版本的文件信息") + @ApiImplicitParams({ + }) + @GetMapping(value = "file/version/{version}", produces = {"application/json;charset=UTF-8"}) + public WpsVo.FileBase fileVersion(HttpServletRequest request, @PathVariable("version") Integer version, WpsDto.FileVersion fileVersion) throws Exception { + log.info("上传文件新版本请求参数:{}", fileVersion); + WpsHeader header = checkSignature(request, fileVersion.getSignature()); + WpsVo.FileBase base = wpsService.fileVersion(header.getToken(), Long.parseLong(header.getFileId()), version); + log.info("版本{}的文件信息:{}", version, base); + return base; + } + + @ApiOperation(value = "文件重命名", notes = "当用户有重命名权限时,重命名时调用的接口") + @ApiImplicitParams({ + }) + @PutMapping(value = "file/rename", produces = {"application/json;charset=UTF-8"}) + public JsonResponse fileRename(HttpServletRequest request, WpsDto.FileRename fileRename, @RequestBody WpsDto.FileRenameBody renameBody) throws Exception { + + log.info("上传文件新版本请求参数:{}", fileRename); + WpsHeader header = checkSignature(request, fileRename.getSignature()); + wpsService.fileRename(header.getToken(), Long.parseLong(header.getFileId()), renameBody); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "获取所有历史版本文件信息", notes = "显示在历史版本列表中") + @ApiImplicitParams({ + }) + @PostMapping(value = "file/history", produces = {"application/json;charset=UTF-8"}) + public WpsVo.FileHistory fileHistory(HttpServletRequest request, WpsDto.FileHistory history, @RequestBody WpsDto.FileHistoryBody body) throws Exception { + log.info("获取所有历史版本文件信息请求参数:{}, {}", history, body); + WpsHeader header = checkSignature(request, history.getSignature()); + List histories = wpsService.queryFileHistory(header.getToken(), body); + log.info("所有历史版本返回信息:{}", histories); + return new WpsVo.FileHistory(histories); + } + @ApiOperation(value = "新建文件", notes = "通过模板新建需要提供的接口") + @ApiImplicitParams({ + }) + @PostMapping(value = "file/new", produces = {"application/json;charset=UTF-8"}) + public WpsVo.FileNew fileNew(HttpServletRequest request, WpsDto.FileNew fileNew, String name, Part file) throws Exception { + log.info("上传文件新版本请求参数:{}", fileNew); + WpsHeader header = checkSignature(request, fileNew.getSignature()); + WpsVo.FileNew fileNewVo = wpsService.fileNew(header.getToken(), header.getFileId(), name, file); + log.info("文件新建返回:{}", fileNewVo); + return fileNewVo; + } + @ApiOperation(value = "通知", notes = "打开文件时返回通知的接口") + @ApiImplicitParams({ + }) + @PostMapping(value = "onnotify", produces = {"application/json;charset=UTF-8"}) + public JsonResponse onnotify(HttpServletRequest request, WpsDto.Notify notify, @RequestBody WpsDto.NotifyBody body) throws Exception { + log.info("wps通知请求参数:{},{}", notify, body); + WpsHeader header = checkSignature(request, notify.getSignature()); + wpsService.notify(header.getToken(), body); + log.info("wps通知完成"); + return JsonResponse.newInstance().ok(); + } + + @Data + @ApiModel("wps通用请求头参数") + private static class WpsHeader{ + @ApiModelProperty("用户代理") + private String userAgent; + @ApiModelProperty("校验身份的token") + private String token; + @ApiModelProperty("文件id") + private String fileId; + + /** + * 获取请求头(由weboffice开放平台写入) + * @param request + * @return + */ + public static WpsHeader getHeader(HttpServletRequest request) { + WpsHeader header = new WpsHeader(); + header.setUserAgent(request.getHeader("User-Agent")); + header.setToken(request.getHeader("x-wps-weboffice-token")); + header.setFileId(request.getHeader("x-weboffice-file-id")); + return header; + } + + } + + /** + * 初始化加签的map参数 + * @return + */ + private Map initMap(){ + Map paramMap= new HashMap<>(); + paramMap.put("_w_appid", WebConstant.Wps.APPID); + return paramMap; + } + + /** + * 签名验证 + * @param request + * @param signature + */ + private WpsHeader checkSignature(HttpServletRequest request, String signature) { + WpsHeader header = WpsHeader.getHeader(request); + Map paramMap = initMap(); + if (StrUtil.isNotEmpty(request.getParameter("_w_url"))) { + paramMap.put("_w_url", request.getParameter("_w_url")); + } + + String newSignature = WpsSignature.getSignature(paramMap, WebConstant.Wps.APPKEY); + if (!signature.equals(newSignature)) { + log.info("签名验证失败"); + throw new BaseException(CodeEnum.SIGNATURE_FAIL); + } + return header; + } +} diff --git a/tall/src/main/resources/mapper_dao/SysUserDao.xml b/tall/src/main/resources/mapper_dao/SysUserDao.xml index 99388f43..0c2221f8 100644 --- a/tall/src/main/resources/mapper_dao/SysUserDao.xml +++ b/tall/src/main/resources/mapper_dao/SysUserDao.xml @@ -92,6 +92,43 @@ limit 1 + + + + SELECT + f.id, + v.id as fileVersionId, + v.NAME, + v.version AS currentVersion, + v.size, + f.creator, + UNIX_TIMESTAMP( f.created_at ) AS create_time, + v.modifier, + UNIX_TIMESTAMP( v.updated_at ) AS modify_time, + v.download_url AS downloadUrl + FROM + t_wps_file f, + t_wps_file_version v + WHERE + f.id = v.file_id + AND v.file_id = #{fileId} + AND version = #{version} + AND f.rec_status = 0 + AND v.rec_status = 0 + limit 1 + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ConstantMapper.xml b/tall/src/main/resources/mapper_raw/ConstantMapper.xml new file mode 100644 index 00000000..b26da6c7 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/ConstantMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, t_key, t_value, description, created_at, updated_at, rec_status + + + + + delete from t_constant + where id = #{id,jdbcType=BIGINT} + + + delete from t_constant + + + + + + insert into t_constant (id, t_key, t_value, + description, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{tKey,jdbcType=VARCHAR}, #{tValue,jdbcType=VARCHAR}, + #{description,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_constant + + + id, + + + t_key, + + + t_value, + + + description, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{tKey,jdbcType=VARCHAR}, + + + #{tValue,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_constant + + + id = #{record.id,jdbcType=BIGINT}, + + + t_key = #{record.tKey,jdbcType=VARCHAR}, + + + t_value = #{record.tValue,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_constant + set id = #{record.id,jdbcType=BIGINT}, + t_key = #{record.tKey,jdbcType=VARCHAR}, + t_value = #{record.tValue,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_constant + + + t_key = #{tKey,jdbcType=VARCHAR}, + + + t_value = #{tValue,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_constant + set t_key = #{tKey,jdbcType=VARCHAR}, + t_value = #{tValue,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProProjectFileMapper.xml b/tall/src/main/resources/mapper_raw/ProProjectFileMapper.xml new file mode 100644 index 00000000..8efe4a54 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/ProProjectFileMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, file_id, created_at, updated_at, rec_status + + + + + delete from t_pro_project_file + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_project_file + + + + + + insert into t_pro_project_file (id, project_id, file_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{fileId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_pro_project_file + + + id, + + + project_id, + + + file_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{fileId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_pro_project_file + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + file_id = #{record.fileId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_pro_project_file + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + file_id = #{record.fileId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_pro_project_file + + + project_id = #{projectId,jdbcType=BIGINT}, + + + file_id = #{fileId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_project_file + set project_id = #{projectId,jdbcType=BIGINT}, + file_id = #{fileId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/WpsFileMapper.xml b/tall/src/main/resources/mapper_raw/WpsFileMapper.xml new file mode 100644 index 00000000..b5ba145d --- /dev/null +++ b/tall/src/main/resources/mapper_raw/WpsFileMapper.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, current_version, name, size, download_url, creator, modifier, created_at, updated_at, + rec_status + + + + + delete from t_wps_file + where id = #{id,jdbcType=BIGINT} + + + delete from t_wps_file + + + + + + insert into t_wps_file (id, current_version, name, + size, download_url, creator, + modifier, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{currentVersion,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, + #{size,jdbcType=BIGINT}, #{downloadUrl,jdbcType=VARCHAR}, #{creator,jdbcType=BIGINT}, + #{modifier,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_wps_file + + + id, + + + current_version, + + + name, + + + size, + + + download_url, + + + creator, + + + modifier, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{currentVersion,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{size,jdbcType=BIGINT}, + + + #{downloadUrl,jdbcType=VARCHAR}, + + + #{creator,jdbcType=BIGINT}, + + + #{modifier,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_wps_file + + + id = #{record.id,jdbcType=BIGINT}, + + + current_version = #{record.currentVersion,jdbcType=INTEGER}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + size = #{record.size,jdbcType=BIGINT}, + + + download_url = #{record.downloadUrl,jdbcType=VARCHAR}, + + + creator = #{record.creator,jdbcType=BIGINT}, + + + modifier = #{record.modifier,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_wps_file + set id = #{record.id,jdbcType=BIGINT}, + current_version = #{record.currentVersion,jdbcType=INTEGER}, + name = #{record.name,jdbcType=VARCHAR}, + size = #{record.size,jdbcType=BIGINT}, + download_url = #{record.downloadUrl,jdbcType=VARCHAR}, + creator = #{record.creator,jdbcType=BIGINT}, + modifier = #{record.modifier,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_wps_file + + + current_version = #{currentVersion,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + size = #{size,jdbcType=BIGINT}, + + + download_url = #{downloadUrl,jdbcType=VARCHAR}, + + + creator = #{creator,jdbcType=BIGINT}, + + + modifier = #{modifier,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_wps_file + set current_version = #{currentVersion,jdbcType=INTEGER}, + name = #{name,jdbcType=VARCHAR}, + size = #{size,jdbcType=BIGINT}, + download_url = #{downloadUrl,jdbcType=VARCHAR}, + creator = #{creator,jdbcType=BIGINT}, + modifier = #{modifier,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/WpsFileUserMapper.xml b/tall/src/main/resources/mapper_raw/WpsFileUserMapper.xml new file mode 100644 index 00000000..b2559f92 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/WpsFileUserMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, user_id, version_id, operation, created_at, updated_at, rec_status + + + + + delete from t_wps_file_user + where id = #{id,jdbcType=BIGINT} + + + delete from t_wps_file_user + + + + + + insert into t_wps_file_user (id, user_id, version_id, + operation, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{versionId,jdbcType=BIGINT}, + #{operation,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_wps_file_user + + + id, + + + user_id, + + + version_id, + + + operation, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{versionId,jdbcType=BIGINT}, + + + #{operation,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_wps_file_user + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + version_id = #{record.versionId,jdbcType=BIGINT}, + + + operation = #{record.operation,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_wps_file_user + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + version_id = #{record.versionId,jdbcType=BIGINT}, + operation = #{record.operation,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_wps_file_user + + + user_id = #{userId,jdbcType=BIGINT}, + + + version_id = #{versionId,jdbcType=BIGINT}, + + + operation = #{operation,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_wps_file_user + set user_id = #{userId,jdbcType=BIGINT}, + version_id = #{versionId,jdbcType=BIGINT}, + operation = #{operation,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/WpsFileVersionMapper.xml b/tall/src/main/resources/mapper_raw/WpsFileVersionMapper.xml new file mode 100644 index 00000000..351a9680 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/WpsFileVersionMapper.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, file_id, version, name, size, download_url, modifier, created_at, updated_at, + rec_status + + + + + delete from t_wps_file_version + where id = #{id,jdbcType=BIGINT} + + + delete from t_wps_file_version + + + + + + insert into t_wps_file_version (id, file_id, version, + name, size, download_url, + modifier, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{fileId,jdbcType=BIGINT}, #{version,jdbcType=INTEGER}, + #{name,jdbcType=VARCHAR}, #{size,jdbcType=BIGINT}, #{downloadUrl,jdbcType=VARCHAR}, + #{modifier,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_wps_file_version + + + id, + + + file_id, + + + version, + + + name, + + + size, + + + download_url, + + + modifier, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{fileId,jdbcType=BIGINT}, + + + #{version,jdbcType=INTEGER}, + + + #{name,jdbcType=VARCHAR}, + + + #{size,jdbcType=BIGINT}, + + + #{downloadUrl,jdbcType=VARCHAR}, + + + #{modifier,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_wps_file_version + + + id = #{record.id,jdbcType=BIGINT}, + + + file_id = #{record.fileId,jdbcType=BIGINT}, + + + version = #{record.version,jdbcType=INTEGER}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + size = #{record.size,jdbcType=BIGINT}, + + + download_url = #{record.downloadUrl,jdbcType=VARCHAR}, + + + modifier = #{record.modifier,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_wps_file_version + set id = #{record.id,jdbcType=BIGINT}, + file_id = #{record.fileId,jdbcType=BIGINT}, + version = #{record.version,jdbcType=INTEGER}, + name = #{record.name,jdbcType=VARCHAR}, + size = #{record.size,jdbcType=BIGINT}, + download_url = #{record.downloadUrl,jdbcType=VARCHAR}, + modifier = #{record.modifier,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_wps_file_version + + + file_id = #{fileId,jdbcType=BIGINT}, + + + version = #{version,jdbcType=INTEGER}, + + + name = #{name,jdbcType=VARCHAR}, + + + size = #{size,jdbcType=BIGINT}, + + + download_url = #{downloadUrl,jdbcType=VARCHAR}, + + + modifier = #{modifier,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_wps_file_version + set file_id = #{fileId,jdbcType=BIGINT}, + version = #{version,jdbcType=INTEGER}, + name = #{name,jdbcType=VARCHAR}, + size = #{size,jdbcType=BIGINT}, + download_url = #{downloadUrl,jdbcType=VARCHAR}, + modifier = #{modifier,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/WpsNotifyMapper.xml b/tall/src/main/resources/mapper_raw/WpsNotifyMapper.xml new file mode 100644 index 00000000..89f01ec9 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/WpsNotifyMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, cmd, body, created_at, updated_at, rec_status + + + + + delete from t_wps_notify + where id = #{id,jdbcType=BIGINT} + + + delete from t_wps_notify + + + + + + insert into t_wps_notify (id, cmd, body, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{cmd,jdbcType=VARCHAR}, #{body,jdbcType=VARCHAR}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_wps_notify + + + id, + + + cmd, + + + body, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{cmd,jdbcType=VARCHAR}, + + + #{body,jdbcType=VARCHAR}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_wps_notify + + + id = #{record.id,jdbcType=BIGINT}, + + + cmd = #{record.cmd,jdbcType=VARCHAR}, + + + body = #{record.body,jdbcType=VARCHAR}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_wps_notify + set id = #{record.id,jdbcType=BIGINT}, + cmd = #{record.cmd,jdbcType=VARCHAR}, + body = #{record.body,jdbcType=VARCHAR}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_wps_notify + + + cmd = #{cmd,jdbcType=VARCHAR}, + + + body = #{body,jdbcType=VARCHAR}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_wps_notify + set cmd = #{cmd,jdbcType=VARCHAR}, + body = #{body,jdbcType=VARCHAR}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/util/src/main/java/com/ccsens/util/CodeEnum.java b/util/src/main/java/com/ccsens/util/CodeEnum.java index e573e4ea..c42252e0 100644 --- a/util/src/main/java/com/ccsens/util/CodeEnum.java +++ b/util/src/main/java/com/ccsens/util/CodeEnum.java @@ -117,10 +117,17 @@ public enum CodeEnum { NOT_MESSAGE_TYPE(99,"找不到消息类型,请检查名称是否正确",true), NOT_LABEL(100,"标签不存在,请检查后操作",true), REPEAT_LABEL(101,"标签已存在,请勿重复添加",true), + NICKNAME_REPEAT(102,"改名字已经存在,请换一个再试",true), NEW_PASSWORD_REPEAT_OLD(103,"新密码不能和旧密码相同",true), PASSWORD_ERROR(104,"密码错误",true), NOT_ACCOUNT(105,"未找到该账号",true), + + FILE_NOT_FOUND(106,"未找到对应的文件,请检查后操作",true), + SIGNATURE_FAIL(107,"签名验证失败",true), + + + ; public CodeEnum addMsg(String msg){ diff --git a/util/src/main/java/com/ccsens/util/WebConstant.java b/util/src/main/java/com/ccsens/util/WebConstant.java index fd154ebd..18eccbc0 100644 --- a/util/src/main/java/com/ccsens/util/WebConstant.java +++ b/util/src/main/java/com/ccsens/util/WebConstant.java @@ -32,6 +32,43 @@ public class WebConstant { } } + public static final class Wps{ + public static final String APPID = "09d77d2eb919438e8ae4f2a9ec6ec8dd"; + public static final String APPKEY = "1b52d9ef8b1c4019be49f211b84c4f90"; + public static final String PERMISSION_READ = "read"; + public static final String PERMISSION_WRITE = "write"; + public static final String FILE_TYPE_ALL = "doc, dot, wps, wpt, docx, dotx, docm, dotm, xls, xlt, et, xlsx, xltx, csv, xlsm, xltm, ppt,pptx,pptm,ppsx,ppsm,pps,potx,potm,dpt,dps, pdf"; + public static final String FILE_TYPE_WORD = "doc, dot, wps, wpt, docx, dotx, docm, dotm"; + public static final String FILE_TYPE_TABLE = "xls, xlt, et, xlsx, xltx, csv, xlsm, xltm"; + public static final String FILE_TYPE_DEMO = " ppt,pptx,pptm,ppsx,ppsm,pps,potx,potm,dpt,dps"; + public static final String FILE_TYPE_PDF = "pdf"; + + public static final Byte USER_OPERATION_NEW = 0; + public static final Byte USER_OPERATION_READ = 1; + public static final Byte USER_OPERATION_WRITE = 2; + public static final Byte USER_OPERATION_SAVE = 3; + public static final Byte USER_OPERATION_OLD = 4; + public static final Byte USER_OPERATION_RENAME = 5; + + /** + * 获取文件类型 + * @param suffix + * @return + */ + public static String getFileType(String suffix) { + if (FILE_TYPE_WORD.contains(suffix)) { + return "w"; + }else if (FILE_TYPE_TABLE.contains(suffix)) { + return "s"; + } else if (FILE_TYPE_DEMO.contains(suffix)) { + return "p"; + } else if (FILE_TYPE_PDF.contains(suffix)) { + return "f"; + } + return null; + } + + } public static final class Message{ public static final byte TYPE_TEXT = 0; @@ -57,7 +94,6 @@ public class WebConstant { public static final long EXPIRE_TIME = 1 * 60 * 60; public static final String DOMAIN = PropUtil.wxPrefix; public static final String TEMPLATE_SEND = DOMAIN + "template/send"; - } /**注册来源*/ @@ -119,11 +155,14 @@ public class WebConstant { public static final String UPLOAD_PATH_DELIVER = UPLOAD_PATH_BASE + File.separator + "delivers"; public static final String UPLOAD_PATH_DELIVER1 ="delivers"; + + public static final String UPLOAD_PATH_WPS ="wps"; public static final String UPLOAD_PATH_AVATAR_URL ="avatarUrl"; public static final String UPLOAD_PATH_REMARK ="remarks"; public static final String UPLOAD_PROJECT_WBS = UPLOAD_PATH_BASE + File.separator + "project"; public static final String UPLOAD_AVATAR_URL = UPLOAD_PATH_BASE + File.separator + "avatarUrl/"; - public static final String URL_BASE = "https://api.ccsens.com/ptpro/uploads/"; +// public static final String URL_BASE = "https://api.ccsens.com/ptpro/uploads/"; + public static final String TEST_URL = "https://test.tall.wiki/"; public static final String TEST_URL_GAME_SQ = TEST_URL + "game-dev/"; public static final String TEST_URL_GAME_SP = TEST_URL + "game-sp/"; diff --git a/util/src/main/java/com/ccsens/util/WpsSignature.java b/util/src/main/java/com/ccsens/util/WpsSignature.java new file mode 100644 index 00000000..c6b70761 --- /dev/null +++ b/util/src/main/java/com/ccsens/util/WpsSignature.java @@ -0,0 +1,95 @@ +package com.ccsens.util; + +import cn.hutool.core.codec.Base64; + +import javax.crypto.Mac; +import javax.crypto.spec.SecretKeySpec; +import java.io.UnsupportedEncodingException; +import java.net.URLEncoder; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.util.*; + + +/** + * @description: + * @author: whj + * @time: 2020/6/17 9:59 + */ +public class WpsSignature { + + public static void main(String args[]) throws UnsupportedEncodingException { + Map paramMap= new HashMap<>(); + paramMap.put("_w_appid", WebConstant.Wps.APPID); +// paramMap.put("_w_fname", "222.docx"); +// paramMap.put("_w_userid", "id1000"); + String signature = getSignature(paramMap,WebConstant.Wps.APPKEY); + System.out.println(getUrlParam(paramMap) + "&_w_signature=" + signature); + } + + + + public static String getUrlParam(Map params) throws UnsupportedEncodingException { + StringBuilder builder = new StringBuilder(); + for (Map.Entry entry : params.entrySet()) { + if (builder.length() > 0) { + builder.append('&'); + } + builder.append(URLEncoder.encode(entry.getKey(), "utf-8")).append('=').append(URLEncoder.encode(entry.getValue(), "utf-8")); + } + return builder.toString(); + } + + public static String getSignature(Map params, String appSecret) { + List keys=new ArrayList(); + for (Map.Entry entry : params.entrySet()) { + keys.add(entry.getKey()); + } + + // 将所有参数按key的升序排序 + Collections.sort(keys, new Comparator() { + @Override + public int compare(String o1, String o2) { + return o1.compareTo(o2); + } + }); + + // 构造签名的源字符串 + StringBuilder contents=new StringBuilder(""); + for (String key : keys) { + if (key=="_w_signature"){ + continue; + } + contents.append(key+"=").append(params.get(key)); + System.out.println("key:"+key+",value:"+params.get(key)); + } + contents.append("_w_secretkey=").append(appSecret); + + // 进行hmac sha1 签名 + byte[] bytes= hmacSha1(appSecret.getBytes(),contents.toString().getBytes()); + //字符串经过Base64编码 + String sign= Base64.encode(bytes); + try { + sign = URLEncoder.encode( sign, "UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + System.out.println(sign); + return sign; + } + + public static byte[] hmacSha1(byte[] key, byte[] data) { + try { + SecretKeySpec signingKey = new SecretKeySpec(key, "HmacSHA1"); + Mac mac = Mac.getInstance(signingKey.getAlgorithm()); + mac.init(signingKey); + return mac.doFinal(data); + } + catch (NoSuchAlgorithmException e) { + e.printStackTrace(); + } catch (InvalidKeyException e) { + e.printStackTrace(); + } + return null; + } +} diff --git a/util/src/test/java/com/ccsens/util/TestWpsSignature.java b/util/src/test/java/com/ccsens/util/TestWpsSignature.java new file mode 100644 index 00000000..9ae9b463 --- /dev/null +++ b/util/src/test/java/com/ccsens/util/TestWpsSignature.java @@ -0,0 +1,23 @@ +package com.ccsens.util; + +import org.junit.Test; + +import java.util.HashMap; +import java.util.Map; + +/** + * @description: + * @author: whj + * @time: 2020/6/23 11:17 + */ +public class TestWpsSignature { + @Test + public void test01(){ + Map paramMap= new HashMap<>(); + paramMap.put("_w_appid", WebConstant.Wps.APPID); +// paramMap.put("_w_fname", "222.docx"); +// paramMap.put("_w_userid", "id1000"); + String signature = WpsSignature.getSignature(paramMap,WebConstant.Wps.APPKEY); + System.out.println(signature); + } +}