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 index c7ad4d48..5b1f93cc 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/WpsDto.java @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import javax.servlet.http.Part; import javax.validation.constraints.NotNull; /** @@ -15,6 +16,94 @@ import javax.validation.constraints.NotNull; @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{ @@ -39,5 +128,39 @@ public class WpsDto { @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/WpsFile.java b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFile.java index 784b0791..b023dfb1 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFile.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFile.java @@ -10,7 +10,7 @@ public class WpsFile implements Serializable { private String name; - private Integer size; + private Long size; private String downloadUrl; @@ -50,11 +50,11 @@ public class WpsFile implements Serializable { this.name = name == null ? null : name.trim(); } - public Integer getSize() { + public Long getSize() { return size; } - public void setSize(Integer size) { + public void setSize(Long size) { this.size = size; } 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 index 405a6e26..9292baca 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileExample.java @@ -305,52 +305,52 @@ public class WpsFileExample { return (Criteria) this; } - public Criteria andSizeEqualTo(Integer value) { + public Criteria andSizeEqualTo(Long value) { addCriterion("size =", value, "size"); return (Criteria) this; } - public Criteria andSizeNotEqualTo(Integer value) { + public Criteria andSizeNotEqualTo(Long value) { addCriterion("size <>", value, "size"); return (Criteria) this; } - public Criteria andSizeGreaterThan(Integer value) { + public Criteria andSizeGreaterThan(Long value) { addCriterion("size >", value, "size"); return (Criteria) this; } - public Criteria andSizeGreaterThanOrEqualTo(Integer value) { + public Criteria andSizeGreaterThanOrEqualTo(Long value) { addCriterion("size >=", value, "size"); return (Criteria) this; } - public Criteria andSizeLessThan(Integer value) { + public Criteria andSizeLessThan(Long value) { addCriterion("size <", value, "size"); return (Criteria) this; } - public Criteria andSizeLessThanOrEqualTo(Integer value) { + public Criteria andSizeLessThanOrEqualTo(Long value) { addCriterion("size <=", value, "size"); return (Criteria) this; } - public Criteria andSizeIn(List values) { + public Criteria andSizeIn(List values) { addCriterion("size in", values, "size"); return (Criteria) this; } - public Criteria andSizeNotIn(List values) { + public Criteria andSizeNotIn(List values) { addCriterion("size not in", values, "size"); return (Criteria) this; } - public Criteria andSizeBetween(Integer value1, Integer value2) { + public Criteria andSizeBetween(Long value1, Long value2) { addCriterion("size between", value1, value2, "size"); return (Criteria) this; } - public Criteria andSizeNotBetween(Integer value1, Integer value2) { + public Criteria andSizeNotBetween(Long value1, Long value2) { addCriterion("size not between", value1, value2, "size"); return (Criteria) this; } 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 index d615035f..039d3440 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersion.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersion.java @@ -12,7 +12,7 @@ public class WpsFileVersion implements Serializable { private String name; - private Integer size; + private Long size; private String downloadUrl; @@ -58,11 +58,11 @@ public class WpsFileVersion implements Serializable { this.name = name == null ? null : name.trim(); } - public Integer getSize() { + public Long getSize() { return size; } - public void setSize(Integer size) { + public void setSize(Long size) { this.size = size; } 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 index fe163ca7..3c8f7670 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersionExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/WpsFileVersionExample.java @@ -365,52 +365,52 @@ public class WpsFileVersionExample { return (Criteria) this; } - public Criteria andSizeEqualTo(Integer value) { + public Criteria andSizeEqualTo(Long value) { addCriterion("size =", value, "size"); return (Criteria) this; } - public Criteria andSizeNotEqualTo(Integer value) { + public Criteria andSizeNotEqualTo(Long value) { addCriterion("size <>", value, "size"); return (Criteria) this; } - public Criteria andSizeGreaterThan(Integer value) { + public Criteria andSizeGreaterThan(Long value) { addCriterion("size >", value, "size"); return (Criteria) this; } - public Criteria andSizeGreaterThanOrEqualTo(Integer value) { + public Criteria andSizeGreaterThanOrEqualTo(Long value) { addCriterion("size >=", value, "size"); return (Criteria) this; } - public Criteria andSizeLessThan(Integer value) { + public Criteria andSizeLessThan(Long value) { addCriterion("size <", value, "size"); return (Criteria) this; } - public Criteria andSizeLessThanOrEqualTo(Integer value) { + public Criteria andSizeLessThanOrEqualTo(Long value) { addCriterion("size <=", value, "size"); return (Criteria) this; } - public Criteria andSizeIn(List values) { + public Criteria andSizeIn(List values) { addCriterion("size in", values, "size"); return (Criteria) this; } - public Criteria andSizeNotIn(List values) { + public Criteria andSizeNotIn(List values) { addCriterion("size not in", values, "size"); return (Criteria) this; } - public Criteria andSizeBetween(Integer value1, Integer value2) { + public Criteria andSizeBetween(Long value1, Long value2) { addCriterion("size between", value1, value2, "size"); return (Criteria) this; } - public Criteria andSizeNotBetween(Integer value1, Integer value2) { + public Criteria andSizeNotBetween(Long value1, Long value2) { addCriterion("size not between", value1, value2, "size"); return (Criteria) this; } 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/WpsVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/WpsVo.java index 30432e7b..849d37a7 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/WpsVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/WpsVo.java @@ -4,10 +4,16 @@ 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 @@ -15,12 +21,92 @@ import lombok.Data; */ @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 @@ -31,11 +117,19 @@ public class WpsVo { @ApiModelProperty("文件名") private String name; @ApiModelProperty("当前版本号,位数小于11") - private Integer version; + @JsonProperty("version") + private Integer currentVersion; @ApiModelProperty("文件大小,单位为B") - private Integer size; + private Long size; @ApiModelProperty("文档下载地址") - private String download_url; + @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 @@ -57,7 +151,7 @@ public class WpsVo { @ApiModelProperty("当前版本号,位数小于11") private Integer version; @ApiModelProperty("文件大小,单位为B") - private Integer size; + private Long size; @ApiModelProperty("文档下载地址") private String download_url; @ApiModelProperty("创建者id,字符串长度小于40") @@ -73,7 +167,7 @@ public class WpsVo { @ApiModelProperty("水印") private Watermark watermark; - public File(String id, String name, Integer version, Integer size, String download_url, String creator, Long create_time, String modifier, Long modify_time) { + 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; 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 5669a84b..60b7fd4a 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 { @@ -32,4 +34,11 @@ public interface SysUserDao extends SysUserMapper { * @return */ UserVo.UserInfo getUserInfoByUserId(Long userId); + + /** + * 根据id查询用户信息 + * @param ids + * @return + */ + List listUserInfos(Long[] ids); } 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/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/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 87bf61fb..22820096 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IUserService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IUserService.java @@ -80,4 +80,11 @@ public interface IUserService { UserVo.Account systemRegister(UserDto.UserSignupSystem userSignup); String getUserNameByUserId(Long userId); + + /** + * 根据id查询用户信息 + * @param ids + * @return + */ + List listUserInfos(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 index 459f18f4..b404c1b9 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IWpsService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IWpsService.java @@ -4,6 +4,7 @@ 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 @@ -11,20 +12,68 @@ import javax.servlet.http.Part; public interface IWpsService { /** * 获取文件元数据 - * @param fileId - * @param token - * @return - * @throws Exception + * @param fileId 文件ID + * @param token token + * @return 文件信息 + * @throws Exception 异常 */ WpsVo.FileInfo getFileInfo(String fileId, String token) throws Exception; /** * 上传文件新版本 - * @param token - * @param fileId - * @param fileSave - * @param file - * @return + * @param token 身份识别 + * @param fileId 文件id + * @param fileSave 文件保存其他属性 + * @param file 文件 + * @return 保存结果 + * @throws Exception 异常 */ - WpsVo.FileSave fileSave(String token, String fileId, WpsDto.FileSave fileSave, Part file); + 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 2f5a43ef..9f2eaf6a 100644 --- a/tall/src/main/java/com/ccsens/tall/service/UserService.java +++ b/tall/src/main/java/com/ccsens/tall/service/UserService.java @@ -1573,4 +1573,11 @@ public class UserService implements IUserService { public String getUserNameByUserId(Long userId) { return userDao.getUserNameByUserId(userId); } + + @Override + public List listUserInfos(Long[] ids) { + + List infos = userDao.listUserInfos(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 index e27eab02..dc301378 100644 --- a/tall/src/main/java/com/ccsens/tall/service/WpsService.java +++ b/tall/src/main/java/com/ccsens/tall/service/WpsService.java @@ -1,28 +1,34 @@ 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.ProProjectFile; -import com.ccsens.tall.bean.po.ProProjectFileExample; -import com.ccsens.tall.bean.po.WpsFile; -import com.ccsens.tall.bean.po.WpsFileExample; +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.WpsFileMapper; +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: @@ -35,22 +41,109 @@ import java.util.List; public class WpsService implements IWpsService { @Resource - private WpsFileMapper wpsFileMapper; + 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 = wpsFileMapper.selectByPrimaryKey(Long.parseLong(fileId)); + WpsFile wpsFile = wpsFileDao.selectByPrimaryKey(Long.parseLong(fileId)); log.info("文件信息:{}", wpsFile); if (wpsFile == null) { throw new BaseException(CodeEnum.FILE_NOT_FOUND); @@ -64,6 +157,16 @@ public class WpsService implements IWpsService { } 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()); @@ -71,11 +174,11 @@ public class WpsService implements IWpsService { fileInfo.setUser(user); // 查询权限信息 - ProProjectFileExample projectFileExample = new ProProjectFileExample(); - projectFileExample.createCriteria().andFileIdEqualTo(wpsFile.getId()); - List proProjectFiles = proProjectFileMapper.selectByExample(projectFileExample); + List proProjectFiles = getProProjectFiles(wpsFile.getId()); log.info("文件项目关系:{}", proProjectFiles); if (CollectionUtil.isEmpty(proProjectFiles)) { + wpsFileUser.setOperation(WebConstant.Wps.USER_OPERATION_READ); + wpsFileUserMapper.insertSelective(wpsFileUser); return fileInfo; } @@ -84,19 +187,106 @@ public class WpsService implements IWpsService { 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) { - // 保存文件 + 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); - // 判断有无项目ID + // 返回参数 + 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); // 更新文件记录 - return null; + 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 { diff --git a/tall/src/main/java/com/ccsens/tall/web/WpsController.java b/tall/src/main/java/com/ccsens/tall/web/WpsController.java index 01ae473b..54131cc3 100644 --- a/tall/src/main/java/com/ccsens/tall/web/WpsController.java +++ b/tall/src/main/java/com/ccsens/tall/web/WpsController.java @@ -1,9 +1,13 @@ 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; @@ -13,11 +17,11 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import javax.servlet.ServletRequest; 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; /** @@ -33,6 +37,8 @@ public class WpsController { @Resource private IWpsService wpsService; + @Resource + private IUserService userService; @ApiOperation(value = "获取文件元数据", notes = "在预览或编辑的时候,通过接口校验权限并获取文件信息") @ApiImplicitParams({ @@ -43,7 +49,7 @@ public class WpsController { WpsHeader header = checkSignature(request, fileInfo.getSignature()); // 判断登录,查询userid WpsVo.FileInfo fileInfoVo = wpsService.getFileInfo(header.getFileId(), header.getToken()); - + log.info("获取文件元数据返回:{}", fileInfoVo); return fileInfoVo; } @@ -54,22 +60,29 @@ public class WpsController { @ApiImplicitParams({ }) @PostMapping(value = "user/info", produces = {"application/json;charset=UTF-8"}) - public String userInfo(HttpServletRequest request){ - - Map map = initMap(); - return null; + 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.listUserInfos(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){ + 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; } @@ -79,46 +92,72 @@ public class WpsController { @ApiImplicitParams({ }) @PostMapping(value = "file/online", produces = {"application/json;charset=UTF-8"}) - public String fileOnline(){ - return null; + 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 String fileVersion(@PathVariable("version") String version){ - return null; + 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 String fileRename(){ - return null; + 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 String fileHistory(){ - return null; + 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 String fileNew(){ - return null; + 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 String onnotify(){ - return null; + 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 @@ -164,6 +203,10 @@ public class WpsController { 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("签名验证失败"); diff --git a/tall/src/main/resources/mapper_dao/SysUserDao.xml b/tall/src/main/resources/mapper_dao/SysUserDao.xml index 8745e611..e6de09b7 100644 --- a/tall/src/main/resources/mapper_dao/SysUserDao.xml +++ b/tall/src/main/resources/mapper_dao/SysUserDao.xml @@ -108,4 +108,23 @@ u.id = #{userId} limit 1 + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/WpsFileDao.xml b/tall/src/main/resources/mapper_dao/WpsFileDao.xml new file mode 100644 index 00000000..8f688752 --- /dev/null +++ b/tall/src/main/resources/mapper_dao/WpsFileDao.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE t_wps_file f, + t_wps_file_version v + SET f.NAME = #{fileName}, + v.NAME = #{fileName} + WHERE + f.id = v.file_id + AND f.current_version = v.version + AND f.id = #{fileId} + AND f.rec_status = 0 + AND v.rec_status = 0 + + + + + \ 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/WpsFileMapper.xml b/tall/src/main/resources/mapper_raw/WpsFileMapper.xml index 9da31839..b5ba145d 100644 --- a/tall/src/main/resources/mapper_raw/WpsFileMapper.xml +++ b/tall/src/main/resources/mapper_raw/WpsFileMapper.xml @@ -5,7 +5,7 @@ - + @@ -111,7 +111,7 @@ modifier, created_at, updated_at, rec_status) values (#{id,jdbcType=BIGINT}, #{currentVersion,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, - #{size,jdbcType=INTEGER}, #{downloadUrl,jdbcType=VARCHAR}, #{creator,jdbcType=BIGINT}, + #{size,jdbcType=BIGINT}, #{downloadUrl,jdbcType=VARCHAR}, #{creator,jdbcType=BIGINT}, #{modifier,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) @@ -160,7 +160,7 @@ #{name,jdbcType=VARCHAR}, - #{size,jdbcType=INTEGER}, + #{size,jdbcType=BIGINT}, #{downloadUrl,jdbcType=VARCHAR}, @@ -201,7 +201,7 @@ name = #{record.name,jdbcType=VARCHAR}, - size = #{record.size,jdbcType=INTEGER}, + size = #{record.size,jdbcType=BIGINT}, download_url = #{record.downloadUrl,jdbcType=VARCHAR}, @@ -231,7 +231,7 @@ set id = #{record.id,jdbcType=BIGINT}, current_version = #{record.currentVersion,jdbcType=INTEGER}, name = #{record.name,jdbcType=VARCHAR}, - size = #{record.size,jdbcType=INTEGER}, + size = #{record.size,jdbcType=BIGINT}, download_url = #{record.downloadUrl,jdbcType=VARCHAR}, creator = #{record.creator,jdbcType=BIGINT}, modifier = #{record.modifier,jdbcType=BIGINT}, @@ -252,7 +252,7 @@ name = #{name,jdbcType=VARCHAR}, - size = #{size,jdbcType=INTEGER}, + size = #{size,jdbcType=BIGINT}, download_url = #{downloadUrl,jdbcType=VARCHAR}, @@ -279,7 +279,7 @@ update t_wps_file set current_version = #{currentVersion,jdbcType=INTEGER}, name = #{name,jdbcType=VARCHAR}, - size = #{size,jdbcType=INTEGER}, + size = #{size,jdbcType=BIGINT}, download_url = #{downloadUrl,jdbcType=VARCHAR}, creator = #{creator,jdbcType=BIGINT}, modifier = #{modifier,jdbcType=BIGINT}, 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 index a4d71aca..351a9680 100644 --- a/tall/src/main/resources/mapper_raw/WpsFileVersionMapper.xml +++ b/tall/src/main/resources/mapper_raw/WpsFileVersionMapper.xml @@ -6,7 +6,7 @@ - + @@ -111,7 +111,7 @@ modifier, created_at, updated_at, rec_status) values (#{id,jdbcType=BIGINT}, #{fileId,jdbcType=BIGINT}, #{version,jdbcType=INTEGER}, - #{name,jdbcType=VARCHAR}, #{size,jdbcType=INTEGER}, #{downloadUrl,jdbcType=VARCHAR}, + #{name,jdbcType=VARCHAR}, #{size,jdbcType=BIGINT}, #{downloadUrl,jdbcType=VARCHAR}, #{modifier,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) @@ -163,7 +163,7 @@ #{name,jdbcType=VARCHAR}, - #{size,jdbcType=INTEGER}, + #{size,jdbcType=BIGINT}, #{downloadUrl,jdbcType=VARCHAR}, @@ -204,7 +204,7 @@ name = #{record.name,jdbcType=VARCHAR}, - size = #{record.size,jdbcType=INTEGER}, + size = #{record.size,jdbcType=BIGINT}, download_url = #{record.downloadUrl,jdbcType=VARCHAR}, @@ -232,7 +232,7 @@ file_id = #{record.fileId,jdbcType=BIGINT}, version = #{record.version,jdbcType=INTEGER}, name = #{record.name,jdbcType=VARCHAR}, - size = #{record.size,jdbcType=INTEGER}, + size = #{record.size,jdbcType=BIGINT}, download_url = #{record.downloadUrl,jdbcType=VARCHAR}, modifier = #{record.modifier,jdbcType=BIGINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, @@ -255,7 +255,7 @@ name = #{name,jdbcType=VARCHAR}, - size = #{size,jdbcType=INTEGER}, + size = #{size,jdbcType=BIGINT}, download_url = #{downloadUrl,jdbcType=VARCHAR}, @@ -280,7 +280,7 @@ set file_id = #{fileId,jdbcType=BIGINT}, version = #{version,jdbcType=INTEGER}, name = #{name,jdbcType=VARCHAR}, - size = #{size,jdbcType=INTEGER}, + size = #{size,jdbcType=BIGINT}, download_url = #{downloadUrl,jdbcType=VARCHAR}, modifier = #{modifier,jdbcType=BIGINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, 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/WebConstant.java b/util/src/main/java/com/ccsens/util/WebConstant.java index be4014ea..944e0873 100644 --- a/util/src/main/java/com/ccsens/util/WebConstant.java +++ b/util/src/main/java/com/ccsens/util/WebConstant.java @@ -37,6 +37,37 @@ public class WebConstant { 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{ @@ -63,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"; - } /**注册来源*/ @@ -125,9 +155,10 @@ 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_REMARK ="remarks"; public static final String UPLOAD_PROJECT_WBS = UPLOAD_PATH_BASE + File.separator + "project"; - 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/";