diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java new file mode 100644 index 00000000..29c43506 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java @@ -0,0 +1,63 @@ +package com.ccsens.tall.bean.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotEmpty; +import javax.validation.constraints.NotNull; +import java.util.List; + +@Data +public class LabelDto { + @Data + @ApiModel("添加标签") + public static class AddLabel{ + @NotEmpty + @ApiModelProperty("标签名") + private String name; + @ApiModelProperty("标签code") + private String code; + @ApiModelProperty("颜色") + private String color; + @ApiModelProperty("备注信息") + private String description; + @ApiModelProperty("优先级") + private int level; + } + @Data + @ApiModel("删除标签") + public static class DelLabel{ + @NotNull + @ApiModelProperty("标签id") + private Long id; + } + + @Data + @ApiModel("修改标签") + public static class ChangeLabel{ + @NotNull + @ApiModelProperty("标签id") + private Long id; + @ApiModelProperty("标签名") + private String name; + @ApiModelProperty("标签code") + private String code; + @ApiModelProperty("颜色") + private String color; + @ApiModelProperty("备注信息") + private String description; + @ApiModelProperty("优先级") + private int level; + } + + @Data + @ApiModel("给项目添加标签") + public static class ProjectLabel{ + @NotNull + @ApiModelProperty("项目id") + private Long projectId; + @ApiModelProperty("项目id") + private List labelList; + } +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java new file mode 100644 index 00000000..63e30b09 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java @@ -0,0 +1,128 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysLabel implements Serializable { + private Long id; + + private String name; + + private String code; + + private String color; + + private String description; + + private Byte level; + + private Long userId; + + 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 getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code == null ? null : code.trim(); + } + + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color == null ? null : color.trim(); + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description == null ? null : description.trim(); + } + + public Byte getLevel() { + return level; + } + + public void setLevel(Byte level) { + this.level = level; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + 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(", name=").append(name); + sb.append(", code=").append(code); + sb.append(", color=").append(color); + sb.append(", description=").append(description); + sb.append(", level=").append(level); + sb.append(", userId=").append(userId); + 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/SysLabelExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java new file mode 100644 index 00000000..5abb17a5 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java @@ -0,0 +1,841 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysLabelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysLabelExample() { + 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 andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andColorIsNull() { + addCriterion("color is null"); + return (Criteria) this; + } + + public Criteria andColorIsNotNull() { + addCriterion("color is not null"); + return (Criteria) this; + } + + public Criteria andColorEqualTo(String value) { + addCriterion("color =", value, "color"); + return (Criteria) this; + } + + public Criteria andColorNotEqualTo(String value) { + addCriterion("color <>", value, "color"); + return (Criteria) this; + } + + public Criteria andColorGreaterThan(String value) { + addCriterion("color >", value, "color"); + return (Criteria) this; + } + + public Criteria andColorGreaterThanOrEqualTo(String value) { + addCriterion("color >=", value, "color"); + return (Criteria) this; + } + + public Criteria andColorLessThan(String value) { + addCriterion("color <", value, "color"); + return (Criteria) this; + } + + public Criteria andColorLessThanOrEqualTo(String value) { + addCriterion("color <=", value, "color"); + return (Criteria) this; + } + + public Criteria andColorLike(String value) { + addCriterion("color like", value, "color"); + return (Criteria) this; + } + + public Criteria andColorNotLike(String value) { + addCriterion("color not like", value, "color"); + return (Criteria) this; + } + + public Criteria andColorIn(List values) { + addCriterion("color in", values, "color"); + return (Criteria) this; + } + + public Criteria andColorNotIn(List values) { + addCriterion("color not in", values, "color"); + return (Criteria) this; + } + + public Criteria andColorBetween(String value1, String value2) { + addCriterion("color between", value1, value2, "color"); + return (Criteria) this; + } + + public Criteria andColorNotBetween(String value1, String value2) { + addCriterion("color not between", value1, value2, "color"); + 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 andLevelIsNull() { + addCriterion("level is null"); + return (Criteria) this; + } + + public Criteria andLevelIsNotNull() { + addCriterion("level is not null"); + return (Criteria) this; + } + + public Criteria andLevelEqualTo(Byte value) { + addCriterion("level =", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotEqualTo(Byte value) { + addCriterion("level <>", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThan(Byte value) { + addCriterion("level >", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelGreaterThanOrEqualTo(Byte value) { + addCriterion("level >=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThan(Byte value) { + addCriterion("level <", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelLessThanOrEqualTo(Byte value) { + addCriterion("level <=", value, "level"); + return (Criteria) this; + } + + public Criteria andLevelIn(List values) { + addCriterion("level in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotIn(List values) { + addCriterion("level not in", values, "level"); + return (Criteria) this; + } + + public Criteria andLevelBetween(Byte value1, Byte value2) { + addCriterion("level between", value1, value2, "level"); + return (Criteria) this; + } + + public Criteria andLevelNotBetween(Byte value1, Byte value2) { + addCriterion("level not between", value1, value2, "level"); + 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 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/SysProjectLabel.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectLabel.java new file mode 100644 index 00000000..7cd9ce83 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectLabel.java @@ -0,0 +1,84 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysProjectLabel implements Serializable { + private Long id; + + private Long projectId; + + private Long labelId; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getLabelId() { + return labelId; + } + + public void setLabelId(Long labelId) { + this.labelId = labelId; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectId=").append(projectId); + sb.append(", labelId=").append(labelId); + 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/SysProjectLabelExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectLabelExample.java new file mode 100644 index 00000000..00e8720d --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectLabelExample.java @@ -0,0 +1,561 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysProjectLabelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysProjectLabelExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andLabelIdIsNull() { + addCriterion("label_id is null"); + return (Criteria) this; + } + + public Criteria andLabelIdIsNotNull() { + addCriterion("label_id is not null"); + return (Criteria) this; + } + + public Criteria andLabelIdEqualTo(Long value) { + addCriterion("label_id =", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdNotEqualTo(Long value) { + addCriterion("label_id <>", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdGreaterThan(Long value) { + addCriterion("label_id >", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdGreaterThanOrEqualTo(Long value) { + addCriterion("label_id >=", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdLessThan(Long value) { + addCriterion("label_id <", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdLessThanOrEqualTo(Long value) { + addCriterion("label_id <=", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdIn(List values) { + addCriterion("label_id in", values, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdNotIn(List values) { + addCriterion("label_id not in", values, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdBetween(Long value1, Long value2) { + addCriterion("label_id between", value1, value2, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdNotBetween(Long value1, Long value2) { + addCriterion("label_id not between", value1, value2, "labelId"); + 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/SysRelevanceProject.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysRelevanceProject.java new file mode 100644 index 00000000..55725907 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysRelevanceProject.java @@ -0,0 +1,84 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysRelevanceProject implements Serializable { + private Long id; + + private Long projectId; + + private Long relevanceProjectId; + + private Date createdAt; + + private Date updatedAt; + + private Byte recStatus; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getProjectId() { + return projectId; + } + + public void setProjectId(Long projectId) { + this.projectId = projectId; + } + + public Long getRelevanceProjectId() { + return relevanceProjectId; + } + + public void setRelevanceProjectId(Long relevanceProjectId) { + this.relevanceProjectId = relevanceProjectId; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public Byte getRecStatus() { + return recStatus; + } + + public void setRecStatus(Byte recStatus) { + this.recStatus = recStatus; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectId=").append(projectId); + sb.append(", relevanceProjectId=").append(relevanceProjectId); + 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/SysRelevanceProjectExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysRelevanceProjectExample.java new file mode 100644 index 00000000..1f1e9ed9 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysRelevanceProjectExample.java @@ -0,0 +1,561 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysRelevanceProjectExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysRelevanceProjectExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNull() { + addCriterion("project_id is null"); + return (Criteria) this; + } + + public Criteria andProjectIdIsNotNull() { + addCriterion("project_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectIdEqualTo(Long value) { + addCriterion("project_id =", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotEqualTo(Long value) { + addCriterion("project_id <>", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThan(Long value) { + addCriterion("project_id >", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_id >=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThan(Long value) { + addCriterion("project_id <", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdLessThanOrEqualTo(Long value) { + addCriterion("project_id <=", value, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdIn(List values) { + addCriterion("project_id in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotIn(List values) { + addCriterion("project_id not in", values, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdBetween(Long value1, Long value2) { + addCriterion("project_id between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andProjectIdNotBetween(Long value1, Long value2) { + addCriterion("project_id not between", value1, value2, "projectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdIsNull() { + addCriterion("relevance_project_id is null"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdIsNotNull() { + addCriterion("relevance_project_id is not null"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdEqualTo(Long value) { + addCriterion("relevance_project_id =", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdNotEqualTo(Long value) { + addCriterion("relevance_project_id <>", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdGreaterThan(Long value) { + addCriterion("relevance_project_id >", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdGreaterThanOrEqualTo(Long value) { + addCriterion("relevance_project_id >=", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdLessThan(Long value) { + addCriterion("relevance_project_id <", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdLessThanOrEqualTo(Long value) { + addCriterion("relevance_project_id <=", value, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdIn(List values) { + addCriterion("relevance_project_id in", values, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdNotIn(List values) { + addCriterion("relevance_project_id not in", values, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdBetween(Long value1, Long value2) { + addCriterion("relevance_project_id between", value1, value2, "relevanceProjectId"); + return (Criteria) this; + } + + public Criteria andRelevanceProjectIdNotBetween(Long value1, Long value2) { + addCriterion("relevance_project_id not between", value1, value2, "relevanceProjectId"); + 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/LabelVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/LabelVo.java new file mode 100644 index 00000000..975b269c --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/LabelVo.java @@ -0,0 +1,31 @@ +package com.ccsens.tall.bean.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.beans.BeanUtils; + +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import java.math.BigDecimal; + +@Data +public class LabelVo { + @Data + @ApiModel("查询标签返回") + public static class SelectLabel{ + @ApiModelProperty("标签id") + private Long id; + @ApiModelProperty("标签名") + private String name; + @ApiModelProperty("标签code") + private String code; + @ApiModelProperty("颜色") + private String color; + @ApiModelProperty("备注信息") + private String description; + @ApiModelProperty("优先级") + private int level; + } + +} diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java index f3f71c44..277142b4 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java @@ -9,6 +9,7 @@ import lombok.Data; import lombok.Getter; import lombok.Setter; +import java.util.ArrayList; import java.util.List; @Data public class ProjectVo { @@ -30,13 +31,15 @@ public class ProjectVo { @ApiModelProperty("项目进行状态:0未开始,1进行中,2已过期") private Integer process; @ApiModelProperty("当前用户在本项目中的角色") - private List roles; + private List roles = new ArrayList<>(); @ApiModelProperty("当前用户在本项目中的最高权限") private int power; @ApiModelProperty("当前用户是否是本项目的创建者") private boolean creator; @ApiModelProperty("项目配置") private ProjectConfig projectConfig; + @ApiModelProperty("标签信息") + private List labelList; public Long getTotalDuration(){ if(ObjectUtil.isNotNull(endTime) && ObjectUtil.isNotNull(beginTime)){ @@ -69,7 +72,7 @@ public class ProjectVo { return false; } ProjectInfo o = (ProjectInfo)obj; - if(this.id == o.id) { + if(this.id.equals(o.id)) { return true; } return false; @@ -77,7 +80,7 @@ public class ProjectVo { @Override public int hashCode(){ - return (int)((id.longValue() / 1000)); + return (int)((id / 1000)); } } @@ -85,15 +88,15 @@ public class ProjectVo { @Data public static class ProjectConfig{ @ApiModelProperty("上下滑动类型 0:上下滑动 1:只支持向下滑 2:只支持上滑 4:上下都不滑动") - private int slide; + private int slide = 0; @ApiModelProperty("筛选框显示 0:都显示 1:都不显示 2.只展示时间轴/清单") - private int filter; + private int filter = 0; @ApiModelProperty("是否展示添加任务按钮 0:不展示 1:展示") - private int createTask; + private int createTask = 1; @ApiModelProperty("是否展示MVP 0:不展示 1:展示") - private int showMvp; + private int showMvp = 1; @JsonIgnore//0日程,1天,2周,3月 - private int selectTaskType; + private int selectTaskType = 0; @ApiModelProperty("查询任务类型") private String selectType; @@ -111,6 +114,7 @@ public class ProjectVo { } } + @ApiModel @Data public static class RoleInfo{ @@ -265,5 +269,30 @@ public class ProjectVo { private String name; } + @ApiModel + @Data + public static class RelevanceProject { + @ApiModelProperty("项目id") + private Long id; + @ApiModelProperty("项目名称") + private String name; + @ApiModelProperty("地点") + private String address; + @ApiModelProperty("项目开始时间(milltime)") + private Long beginTime; + @ApiModelProperty("项目时长(milltime)") + private Long totalDuration; + @ApiModelProperty("项目结束时间(milltime)") + private Long endTime; + @ApiModelProperty("标签信息") + private List labelList; + + public Long getTotalDuration() { + if (ObjectUtil.isNotNull(endTime) && ObjectUtil.isNotNull(beginTime)) { + return endTime - beginTime; + } + return null; + } + } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java index f79bab9e..e15df8c7 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java @@ -138,7 +138,6 @@ public class TaskVo { private int sequence; @ApiModelProperty("任务配置") private ProTaskShow proTaskConfig; - @ApiModelProperty("页面/接口路径") private String webPath; @ApiModelProperty("程序位置 0:tall内部,1外部") diff --git a/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java b/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java index 38610bb1..0d363e44 100644 --- a/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java +++ b/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java @@ -153,7 +153,8 @@ public class SpringConfig implements WebMvcConfigurer { .excludePathPatterns("/tasks/projectId") .addPathPatterns("/members/**") .addPathPatterns("/templates/**") - .addPathPatterns("/hardware/**"); + .addPathPatterns("/hardware/**") + .addPathPatterns("/labels/**"); //super.addInterceptors(registry); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java new file mode 100644 index 00000000..21c3fecf --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java @@ -0,0 +1,15 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.bean.vo.LabelVo; +import com.ccsens.tall.persist.mapper.SysLabelMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface SysLabelDao extends SysLabelMapper { + List selectLabelByUserId(@Param("userId")Long userId); + + List selectLabelByProjectId(@Param("projectId")Long projectId); +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java index 5b7a9d02..dad2aa8e 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java @@ -16,4 +16,11 @@ public interface SysProjectDao extends SysProjectMapper{ List selectByTemplateStatus(@Param("templateStatus") Integer templateStatus); List getProjectByKey(@Param("userId") Long userId, @Param("key") String key); + + List findProjectIdByUserId01(@Param("userId") Long currentUserId, @Param("startTime") Long startTime, + @Param("endTime") Long endTime,@Param("orderType")Integer orderType,@Param("order")Integer order); + + List selectByLabelName(@Param("userId")Long currentUserId, @Param("labelName")String labelName); + + List selectRelevanceProject(@Param("labelName")Long projectId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectLabelDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectLabelDao.java new file mode 100644 index 00000000..d84b2aeb --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectLabelDao.java @@ -0,0 +1,8 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.persist.mapper.SysProjectLabelMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface SysProjectLabelDao extends SysProjectLabelMapper { +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysRelevanceProjectDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysRelevanceProjectDao.java new file mode 100644 index 00000000..5500c20f --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysRelevanceProjectDao.java @@ -0,0 +1,8 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.persist.mapper.SysRelevanceProjectMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface SysRelevanceProjectDao extends SysRelevanceProjectMapper { +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysLabelMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysLabelMapper.java new file mode 100644 index 00000000..ab9513c2 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysLabelMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysLabel; +import com.ccsens.tall.bean.po.SysLabelExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysLabelMapper { + long countByExample(SysLabelExample example); + + int deleteByExample(SysLabelExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysLabel record); + + int insertSelective(SysLabel record); + + List selectByExample(SysLabelExample example); + + SysLabel selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysLabel record, @Param("example") SysLabelExample example); + + int updateByExample(@Param("record") SysLabel record, @Param("example") SysLabelExample example); + + int updateByPrimaryKeySelective(SysLabel record); + + int updateByPrimaryKey(SysLabel record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysProjectLabelMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysProjectLabelMapper.java new file mode 100644 index 00000000..bd83af8e --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysProjectLabelMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysProjectLabel; +import com.ccsens.tall.bean.po.SysProjectLabelExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysProjectLabelMapper { + long countByExample(SysProjectLabelExample example); + + int deleteByExample(SysProjectLabelExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysProjectLabel record); + + int insertSelective(SysProjectLabel record); + + List selectByExample(SysProjectLabelExample example); + + SysProjectLabel selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysProjectLabel record, @Param("example") SysProjectLabelExample example); + + int updateByExample(@Param("record") SysProjectLabel record, @Param("example") SysProjectLabelExample example); + + int updateByPrimaryKeySelective(SysProjectLabel record); + + int updateByPrimaryKey(SysProjectLabel record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysRelevanceProjectMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysRelevanceProjectMapper.java new file mode 100644 index 00000000..a5a24aa9 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysRelevanceProjectMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysRelevanceProject; +import com.ccsens.tall.bean.po.SysRelevanceProjectExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysRelevanceProjectMapper { + long countByExample(SysRelevanceProjectExample example); + + int deleteByExample(SysRelevanceProjectExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysRelevanceProject record); + + int insertSelective(SysRelevanceProject record); + + List selectByExample(SysRelevanceProjectExample example); + + SysRelevanceProject selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysRelevanceProject record, @Param("example") SysRelevanceProjectExample example); + + int updateByExample(@Param("record") SysRelevanceProject record, @Param("example") SysRelevanceProjectExample example); + + int updateByPrimaryKeySelective(SysRelevanceProject record); + + int updateByPrimaryKey(SysRelevanceProject record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/service/ExcelService.java b/tall/src/main/java/com/ccsens/tall/service/ExcelService.java index 0c9d1b89..76297eb9 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ExcelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ExcelService.java @@ -8,6 +8,7 @@ import cn.hutool.core.util.StrUtil; import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.persist.dao.SysPluginDao; +import com.ccsens.tall.persist.dao.SysProjectDao; import com.ccsens.tall.persist.dao.TaskDetailDao; import com.ccsens.util.*; import com.ccsens.util.cron.CronConstant; @@ -40,6 +41,8 @@ public class ExcelService implements IExcelService { @Autowired private IProjectService projectService; @Autowired + private SysProjectDao sysProjectDao; + @Autowired private IProShowService proShowService; @Autowired private Snowflake snowflake; @@ -151,6 +154,8 @@ public class ExcelService implements IExcelService { wbsSubSheetService.getSigninSheet(sysProject.getId(),xssfWorkbook,taskDetails); //读取智能助手表 wbsSubSheetService.getRoBotSheet(sysProject.getId(),xssfWorkbook); + //读取关联项目表 + wbsSubSheetService.readRelevanceProject(sysProject.getId(),xssfWorkbook); return sysProject; } @@ -685,10 +690,11 @@ public class ExcelService implements IExcelService { taskDetail.setAllMember((byte) 1); //子项目 if (StrUtil.isNotEmpty(subProject)) { - SysProject project = projectService.selectByNameAndUserId(subProject, currentUserId); +// SysProject project = projectService.selectByNameAndUserId(subProject, currentUserId); + SysProject project = sysProjectDao.selectByPrimaryKey(Long.valueOf(subProject)); if (ObjectUtil.isNotNull(project)) { taskDetail.setSubProjectId(project.getId()); - taskDetail.setSubProject(subProject); + taskDetail.setSubProject(project.getName()); project.setParentTaskId(taskDetail.getId()); projectService.updateProject(project); } diff --git a/tall/src/main/java/com/ccsens/tall/service/ILabelService.java b/tall/src/main/java/com/ccsens/tall/service/ILabelService.java new file mode 100644 index 00000000..10fc6836 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/ILabelService.java @@ -0,0 +1,20 @@ +package com.ccsens.tall.service; + +import com.ccsens.tall.bean.dto.LabelDto; +import com.ccsens.tall.bean.vo.LabelVo; + +import java.util.List; + +public interface ILabelService { + List addLabel(Long userId,List labelList); + + List selectLabel(Long currentUserId); + + void delLabel(Long currentUserId, LabelDto.DelLabel delLabel); + + void changeLabel(Long currentUserId, LabelDto.ChangeLabel changeLabel); + + void projectAddLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel); + + void projectRemoveLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel); +} diff --git a/tall/src/main/java/com/ccsens/tall/service/IProjectService.java b/tall/src/main/java/com/ccsens/tall/service/IProjectService.java index 240b87ad..3f9d39e3 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProjectService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProjectService.java @@ -13,7 +13,7 @@ public interface IProjectService { SysProject selectByNameAndUserId(String subProject, Long currentUserId)throws Exception; - List getProjectInfo(Long currentUserId, String date)throws Exception; + List getProjectInfo(Long currentUserId, String date,Integer orderType,Integer order)throws Exception; List haveProjectDay(Long currentUserId, String date) throws Exception; @@ -32,4 +32,8 @@ public interface IProjectService { ProjectVo.ProjectInfo copyProject(Long userId, ProjectDto.ProjectIdDto projectDto); ProjectVo.ProjectInfo changeProjectInfo(Long currentUserId, ProjectDto.ProjectInfoDto projectInfoDto); + + List selectByLabelName(Long currentUserId, String labelName); + + List selectRelevanceProject(Long currentUserId, Long projectId); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java b/tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java index 948a58b7..cdcb1488 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java @@ -20,4 +20,6 @@ public interface IWbsSubSheetService { void getPluginConfig(Long id, XSSFWorkbook xssfWorkbook, List taskDetails) throws Exception; void getRoBotSheet(Long projectId, XSSFWorkbook xssfWorkbook); + + void readRelevanceProject(Long id, XSSFWorkbook xssfWorkbook); } diff --git a/tall/src/main/java/com/ccsens/tall/service/LabelService.java b/tall/src/main/java/com/ccsens/tall/service/LabelService.java new file mode 100644 index 00000000..16e10ae8 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/service/LabelService.java @@ -0,0 +1,197 @@ +package com.ccsens.tall.service; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.ccsens.tall.bean.dto.LabelDto; +import com.ccsens.tall.bean.po.*; +import com.ccsens.tall.bean.vo.LabelVo; +import com.ccsens.tall.persist.dao.SysLabelDao; +import com.ccsens.tall.persist.dao.SysProjectDao; +import com.ccsens.tall.persist.dao.SysProjectLabelDao; +import com.ccsens.util.CodeEnum; +import com.ccsens.util.WebConstant; +import com.ccsens.util.exception.BaseException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class LabelService implements ILabelService{ + @Autowired + private Snowflake snowflake; + @Autowired + private SysLabelDao sysLabelDao; + @Autowired + private SysProjectDao sysProjectDao; + @Autowired + private SysProjectLabelDao sysProjectLabelDao; + @Autowired + private ProRoleService proRoleService; + + /** + * 添加标签 + * @param labelList 添加的标签信息 + */ + @Override + public List addLabel(Long userId,List labelList) { + if(CollectionUtil.isNotEmpty(labelList)){ + labelList.forEach(label->{ + SysLabelExample sysLabelExample = new SysLabelExample(); + sysLabelExample.createCriteria().andNameEqualTo(label.getName()); + List sysLabels = sysLabelDao.selectByExample(sysLabelExample); + if(CollectionUtil.isNotEmpty(sysLabels)){ + throw new BaseException(CodeEnum.REPEAT_LABEL); + } + SysLabel sysLabel = new SysLabel(); + sysLabel.setId(snowflake.nextId()); + sysLabel.setUserId(userId); + BeanUtil.copyProperties(label,sysLabel); + sysLabelDao.insertSelective(sysLabel); + }); + } + return sysLabelDao.selectLabelByUserId(userId); + } + + /** + * 查找此用户的所有标签 + * @param currentUserId userId + * @return 返回该用户添加的所有标签 + */ + @Override + public List selectLabel(Long currentUserId) { + return sysLabelDao.selectLabelByUserId(currentUserId); + } + + /** + * 删除标签 + * @param currentUserId userID + * @param delLabel 被删除的标签id + */ + @Override + public void delLabel(Long currentUserId, LabelDto.DelLabel delLabel) { + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(delLabel.getId()); + if(ObjectUtil.isNull(sysLabel)){ + throw new BaseException(CodeEnum.NOT_LABEL); + } + if(sysLabel.getUserId().longValue() != currentUserId){ + throw new BaseException(CodeEnum.NOT_POWER); + } + sysLabel.setRecStatus((byte) 2); + sysLabelDao.updateByPrimaryKeySelective(sysLabel); + } + + /** + * 修改标签 + * @param currentUserId userid + * @param changeLabel 修改后的标签信息 + */ + @Override + public void changeLabel(Long currentUserId, LabelDto.ChangeLabel changeLabel) { + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(changeLabel.getId()); + if(ObjectUtil.isNull(sysLabel)){ + throw new BaseException(CodeEnum.NOT_LABEL); + } + if(sysLabel.getUserId().longValue() != currentUserId){ + throw new BaseException(CodeEnum.NOT_POWER); + } + + if(StrUtil.isNotEmpty(changeLabel.getName())){ + sysLabel.setName(changeLabel.getName()); + } + if(StrUtil.isNotEmpty(changeLabel.getCode())){ + sysLabel.setCode(changeLabel.getCode()); + } + if(StrUtil.isNotEmpty(changeLabel.getColor())){ + sysLabel.setColor(changeLabel.getColor()); + } + if(StrUtil.isNotEmpty(changeLabel.getDescription())){ + sysLabel.setDescription(changeLabel.getDescription()); + } + if(ObjectUtil.isNotNull(changeLabel.getLevel())){ + sysLabel.setLevel((byte) changeLabel.getLevel()); + } + sysLabelDao.updateByPrimaryKeySelective(sysLabel); + } + + /** + * 给项目添加标签 + * @param currentUserId userid + * @param projectLabel 项目id和标签id + */ + @Override + public void projectAddLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel) { + SysProject project = sysProjectDao.selectByPrimaryKey(projectLabel.getProjectId()); + if (ObjectUtil.isNotNull(project)) { + //用户在项目中的最高权限 + int power = proRoleService.selectPowerByRoleName(currentUserId, projectLabel.getProjectId()); + if (power > 1) { + if(CollectionUtil.isNotEmpty(projectLabel.getLabelList())){ + projectLabel.getLabelList().forEach(labelId->{ + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); + if(ObjectUtil.isNull(sysLabel)){ + throw new BaseException(CodeEnum.NOT_LABEL); + } + if(sysLabel.getUserId().longValue() != currentUserId){ + throw new BaseException(CodeEnum.NOT_POWER); + } + //添加项目和标签的关联信息 + SysProjectLabel sysProjectLabel = new SysProjectLabel(); + sysProjectLabel.setId(snowflake.nextId()); + sysProjectLabel.setProjectId(projectLabel.getProjectId()); + sysProjectLabel.setLabelId(labelId); + sysProjectLabelDao.insertSelective(sysProjectLabel); + }); + } + } else { + throw new BaseException(CodeEnum.NOT_POWER); + } + } else { + throw new BaseException(CodeEnum.NOT_PROJECT); + } + } + + /** + * 删除项目关联的标签 + * @param currentUserId userID + * @param projectLabel 项目id和被删除的标签的id + */ + @Override + public void projectRemoveLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel) { + SysProject project = sysProjectDao.selectByPrimaryKey(projectLabel.getProjectId()); + if (ObjectUtil.isNotNull(project)) { + //用户在项目中的最高权限 + int power = proRoleService.selectPowerByRoleName(currentUserId, projectLabel.getProjectId()); + if (power > 1) { + if(CollectionUtil.isNotEmpty(projectLabel.getLabelList())){ + projectLabel.getLabelList().forEach(labelId -> { + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); + if(ObjectUtil.isNull(sysLabel)){ + throw new BaseException(CodeEnum.NOT_LABEL); + } + if(sysLabel.getUserId().longValue() != currentUserId){ + throw new BaseException(CodeEnum.NOT_POWER); + } + //添加项目和标签的关联信息 + SysProjectLabelExample sysProjectLabelExample = new SysProjectLabelExample(); + sysProjectLabelExample.createCriteria().andProjectIdEqualTo(projectLabel.getProjectId()).andLabelIdEqualTo(labelId); + List sysProjectLabelList = sysProjectLabelDao.selectByExample(sysProjectLabelExample); + if(CollectionUtil.isNotEmpty(sysProjectLabelList)){ + sysProjectLabelList.forEach(label -> { + label.setRecStatus((byte) 2); + sysProjectLabelDao.updateByPrimaryKeySelective(label); + }); + } + }); + } + } else { + throw new BaseException(CodeEnum.NOT_POWER); + } + } else { + throw new BaseException(CodeEnum.NOT_PROJECT); + } + } +} diff --git a/tall/src/main/java/com/ccsens/tall/service/ProjectService.java b/tall/src/main/java/com/ccsens/tall/service/ProjectService.java index ffd2ee70..bdd8a025 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProjectService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProjectService.java @@ -8,6 +8,7 @@ import cn.hutool.core.util.StrUtil; import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.DomainVo; +import com.ccsens.tall.bean.vo.LabelVo; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.persist.dao.*; import com.ccsens.util.CodeEnum; @@ -54,6 +55,8 @@ public class ProjectService implements IProjectService { private Snowflake snowflake; @Autowired private SysDomainDao sysDomainDao; + @Autowired + private SysLabelDao sysLabelDao; @Override public void saveProject(SysProject sysProject) { @@ -141,18 +144,59 @@ public class ProjectService implements IProjectService { * @throws Exception */ @Override - public List getProjectInfo(Long currentUserId, String date) throws Exception { - List projectInfoList = new ArrayList<>(); + public List getProjectInfo(Long currentUserId, String date,Integer orderType,Integer order) throws Exception { //获取日期的开始结束时间 Map timeMap = new HashMap<>(); timeMap = DateUtil.projectFormatDateTime(date); Long startMillisTime = timeMap.get("startMillisTime"); Long endMillisTime = timeMap.get("endMillisTime") + 1; //查找此用户关注的项目 - List projectList = sysProjectDao.findProjectIdByUserId(currentUserId, startMillisTime, endMillisTime); - projectInfoList = projectInfoByProject(projectList, currentUserId); + List projectInfoList = sysProjectDao.findProjectIdByUserId01(currentUserId, startMillisTime, endMillisTime,orderType,order); + projectByProject(projectInfoList,currentUserId); return projectInfoList; } + private void projectByProject(List projectInfoList, Long currentUserId){ + if (CollectionUtil.isNotEmpty(projectInfoList)) { + projectInfoList.forEach(projectInfo -> { + //是否是创建者 + if (projectInfo.isCreator()) { + projectInfo.getRoles().add(WebConstant.ROLE_NAME.Creator.phase); + } + //本用户在项目中的角色 + List proRoles = proRoleService.getProRoleByProjectIdAndUserId(projectInfo.getId(), currentUserId); + if (CollectionUtil.isNotEmpty(proRoles)) { + for (ProRole proRole : proRoles) { + projectInfo.getRoles().add(proRole.getDescription()); + } + } + if (CollectionUtil.isEmpty(projectInfo.getRoles())) { + projectInfo.getRoles().add(WebConstant.ROLE_NAME.Attention.phase); + } + //用户在项目中的最高权限 + int power = proRoleService.selectPowerByRoleName(currentUserId, projectInfo.getId()); + projectInfo.setPower(power); + //获取项目配置 + ProShowExample proShowExample = new ProShowExample(); + proShowExample.createCriteria().andProjectIdEqualTo(projectInfo.getId()); + List proShowList = proShowDao.selectByExample(proShowExample); + if (CollectionUtil.isNotEmpty(proShowList)) { + ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig(); + projectConfig.setSlide(proShowList.get(0).getSlide()); + projectConfig.setCreateTask(proShowList.get(0).getCreateTask()); + projectConfig.setFilter(proShowList.get(0).getFilter()); + projectConfig.setShowMvp(proShowList.get(0).getIsShowMvp()); + projectConfig.setSelectTaskType(proShowList.get(0).getSelectTaskType()); + projectInfo.setProjectConfig(projectConfig); + } else { + ProjectVo.ProjectConfig projectConfig = new ProjectVo.ProjectConfig(); + projectConfig.setFilter(0); + projectConfig.setSlide(0); + projectConfig.setCreateTask(1); + projectInfo.setProjectConfig(projectConfig); + } + }); + } + } private List projectInfoByProject(List projectList, Long currentUserId) { List projectInfoList = new ArrayList<>(); @@ -200,7 +244,11 @@ public class ProjectService implements IProjectService { projectConfig.setCreateTask(1); projectInfo.setProjectConfig(projectConfig); } - + //获取项目下的标签信息 + List labelList = sysLabelDao.selectLabelByProjectId(project.getId()); + if(CollectionUtil.isNotEmpty(labelList)){ + projectInfo.setLabelList(labelList); + } projectInfoList.add(projectInfo); } } @@ -217,6 +265,9 @@ public class ProjectService implements IProjectService { @Override public ProjectVo.ProjectInfo getProjectInfoById(Long userId, Long projectId) { SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); + if(ObjectUtil.isNull(sysProject)){ + throw new BaseException(CodeEnum.NOT_PROJECT); + } ProjectVo.ProjectInfo projectInfo = new ProjectVo.ProjectInfo(); BeanUtil.copyProperties(sysProject, projectInfo); projectInfo.setCreator(false); @@ -258,7 +309,11 @@ public class ProjectService implements IProjectService { projectConfig.setCreateTask(1); projectInfo.setProjectConfig(projectConfig); } - + //获取项目下的标签信息 + List labelList = sysLabelDao.selectLabelByProjectId(projectId); + if(CollectionUtil.isNotEmpty(labelList)){ + projectInfo.setLabelList(labelList); + } return projectInfo; } @@ -338,6 +393,7 @@ public class ProjectService implements IProjectService { List projectList = sysProjectDao.findProjectIdByUserId(currentUserId, startMillisTime, endMillisTime); // List projectList = attentionService.findProjectIdByUserId(currentUserId); projectInfoList = projectInfoByProject(projectList, currentUserId); + //关键字模糊查询和是否创建者 if (CollectionUtil.isNotEmpty(projectInfoList) && StrUtil.isNotEmpty(key)) { Iterator it = projectInfoList.iterator(); @@ -711,4 +767,23 @@ public class ProjectService implements IProjectService { } return getProjectInfoById(currentUserId, project.getId()); } + + /** + * 根据标签查找项目 + * @param currentUserId userId + * @param labelName 标签名 + * @return + */ + @Override + public List selectByLabelName(Long currentUserId, String labelName) { + List projectInfoList = sysProjectDao.selectByLabelName(currentUserId,labelName); + projectByProject(projectInfoList,currentUserId); + return projectInfoList; + } + + @Override + public List selectRelevanceProject(Long currentUserId, Long projectId) { + List projectInfoList = sysProjectDao.selectRelevanceProject(projectId); + return projectInfoList; + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/WbsSubSheetService.java b/tall/src/main/java/com/ccsens/tall/service/WbsSubSheetService.java index daecfc3f..7cea343a 100644 --- a/tall/src/main/java/com/ccsens/tall/service/WbsSubSheetService.java +++ b/tall/src/main/java/com/ccsens/tall/service/WbsSubSheetService.java @@ -12,23 +12,29 @@ import com.ccsens.util.ExcelUtil; import com.ccsens.util.StringUtil; import com.ccsens.util.WebConstant; import com.ccsens.util.exception.BaseException; +import lombok.extern.slf4j.Slf4j; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; import java.util.ArrayList; import java.util.List; import java.util.Map; - +@Slf4j @Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class WbsSubSheetService implements IWbsSubSheetService { @Autowired private Snowflake snowflake; @Autowired + private SysProjectDao sysProjectDao; + @Autowired private ITaskMemberService taskMemberService; @Autowired private IProTaskDetailService proTaskDetailService; @@ -54,6 +60,8 @@ public class WbsSubSheetService implements IWbsSubSheetService { private SysMessageTypeDao sysMessageTypeDao; @Autowired private SysProjectRobotMessageDao projectRobotMessageDao; + @Autowired + private SysRelevanceProjectDao relevanceProjectDao; /** * 读取子任务表 @@ -121,7 +129,7 @@ public class WbsSubSheetService implements IWbsSubSheetService { if ("重复时间".equals(str)) { subTask.setCycle(repeatCell); } - if ("相对时间".equals(str)) { + if ("时间".equals(str)) { subTask.setBeginTime(startTime); Long relative = StringUtil.severalDay(repeatCell); if (ObjectUtil.isNotNull(relative)) { @@ -494,7 +502,9 @@ public class WbsSubSheetService implements IWbsSubSheetService { sysRobot.setId(snowflake.nextId()); sysRobot.setName(robotName); sysRobot.setWebHook(webHookPath); - sysRobot.setClientType(Byte.valueOf(robotType)); + if(StrUtil.isNotEmpty(robotType)) { + sysRobot.setClientType(Byte.valueOf(robotType)); + } sysRobotDao.insertSelective(sysRobot); SysProjectRobot sysProjectRobot = new SysProjectRobot(); sysProjectRobot.setId(snowflake.nextId()); @@ -536,4 +546,30 @@ public class WbsSubSheetService implements IWbsSubSheetService { } } } + + /** + * 读取关联项目表 + * @param projectId + * @param xssfWorkbook + */ + @Override + public void readRelevanceProject(Long projectId, XSSFWorkbook xssfWorkbook) { + XSSFSheet relevanceSheet = xssfWorkbook.getSheet("关联项目表"); + if(ObjectUtil.isNotNull(relevanceSheet)){ + for (int i = 1; i <= relevanceSheet.getLastRowNum(); i++) { + String relevanceProjectId = ExcelUtil.getCellValue(relevanceSheet.getRow(i).getCell(2)); + if(StrUtil.isNotEmpty(relevanceProjectId)){ + SysProject sysProject = sysProjectDao.selectByPrimaryKey(Long.valueOf(relevanceProjectId)); + if(ObjectUtil.isNull(sysProject)){ + throw new BaseException(CodeEnum.NOT_PROJECT.addMsg("关联项目表" + i)); + } + SysRelevanceProject sysRelevanceProject = new SysRelevanceProject(); + sysRelevanceProject.setId(snowflake.nextId()); + sysRelevanceProject.setProjectId(projectId); + sysRelevanceProject.setRelevanceProjectId(Long.valueOf(relevanceProjectId)); + relevanceProjectDao.insertSelective(sysRelevanceProject); + } + } + } + } } diff --git a/tall/src/main/java/com/ccsens/tall/web/LabelController.java b/tall/src/main/java/com/ccsens/tall/web/LabelController.java new file mode 100644 index 00000000..1537b961 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/web/LabelController.java @@ -0,0 +1,94 @@ +package com.ccsens.tall.web; + +import com.ccsens.tall.bean.dto.LabelDto; +import com.ccsens.tall.bean.dto.ProjectDto; +import com.ccsens.tall.bean.vo.DomainVo; +import com.ccsens.tall.bean.vo.LabelVo; +import com.ccsens.tall.service.ILabelService; +import com.ccsens.util.JsonResponse; +import com.ccsens.util.WebConstant; +import io.jsonwebtoken.Claims; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletRequest; +import java.util.List; + +@Api(tags = "标签相关" , description = "") +@RestController +@RequestMapping("/labels") +public class LabelController { + @Autowired + private ILabelService labelService; + + @ApiOperation(value = "搜索标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> selectLabel(HttpServletRequest request) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List selectLabelList = labelService.selectLabel(currentUserId); + return JsonResponse.newInstance().ok(selectLabelList); + } + + @ApiOperation(value = "添加标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> addLabel(HttpServletRequest request, + @Validated @RequestBody List labelList ) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List selectLabelList = labelService.addLabel(currentUserId,labelList); + return JsonResponse.newInstance().ok(selectLabelList); + } + + @ApiOperation(value = "删除标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse delLabel(HttpServletRequest request, + @Validated @RequestBody LabelDto.DelLabel delLabel) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + labelService.delLabel(currentUserId,delLabel); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "修改标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/change", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse changeLabel(HttpServletRequest request, + @Validated @RequestBody LabelDto.ChangeLabel changeLabel) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + labelService.changeLabel(currentUserId,changeLabel); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "给项目添加标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/project", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse projectAddLabel(HttpServletRequest request, + @Validated @RequestBody LabelDto.ProjectLabel projectLabel) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + labelService.projectAddLabel(currentUserId,projectLabel); + return JsonResponse.newInstance().ok(); + } + + @ApiOperation(value = "删除项目关联的标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/project/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse projectRemoveLabel(HttpServletRequest request, + @Validated @RequestBody LabelDto.ProjectLabel projectLabel) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + labelService.projectRemoveLabel(currentUserId,projectLabel); + return JsonResponse.newInstance().ok(); + } + +} diff --git a/tall/src/main/java/com/ccsens/tall/web/ProjectController.java b/tall/src/main/java/com/ccsens/tall/web/ProjectController.java index 6b954176..258203f9 100644 --- a/tall/src/main/java/com/ccsens/tall/web/ProjectController.java +++ b/tall/src/main/java/com/ccsens/tall/web/ProjectController.java @@ -1,5 +1,6 @@ package com.ccsens.tall.web; +import com.ccsens.tall.bean.dto.LabelDto; import com.ccsens.tall.bean.dto.ProjectDto; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.bean.vo.TaskVo; @@ -47,16 +48,23 @@ public class ProjectController { @ApiOperation(value = "根据日期获取项目列表",notes = "按照优先级倒序+时间正序排序") @ApiImplicitParams({ - @ApiImplicitParam(name = "date", value = "日期(格式:yy-[MM]-[dd])", required = true, paramType = "query",dataType = "string",example = "2019-02-13") + @ApiImplicitParam(name = "date", value = "日期(格式:yy-[MM]-[dd])", required = true, paramType = "query",dataType = "string",example = "2019-02-13"), + @ApiImplicitParam(name = "orderType", value = "排序方式 0时间排序 1项目名称 2标签,没有则默认时间排序",paramType = "query",dataType = "string"), + @ApiImplicitParam(name = "order", value = "排序方式 0倒序 1正序 默认倒序",paramType = "query") }) @RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) - public JsonResponse> getProjectByDate(HttpServletRequest request, @RequestParam(required = true) String date) throws Exception { + public JsonResponse> getProjectByDate(HttpServletRequest request, + @RequestParam(required = true) String date, + @RequestParam(required = false) Integer orderType, + @RequestParam(required = false) Integer order) throws Exception { + orderType = orderType == null ? 0 : orderType; + order = order == null ? 0 : order; Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - List projectInfoList = projectService.getProjectInfo(currentUserId,date); + List projectInfoList = projectService.getProjectInfo(currentUserId,date,orderType,order); return JsonResponse.newInstance().ok(projectInfoList); } - @ApiOperation(value = "根据id获取项目",notes = "按照优先级倒序+时间正序排序") + @ApiOperation(value = "根据id获取项目",notes = "") @ApiImplicitParams({ @ApiImplicitParam(name = "projectId", value = "项目id", required = true, paramType = "query",dataType = "Long") }) @@ -140,7 +148,8 @@ public class ProjectController { @ApiImplicitParams({ }) @RequestMapping(value = "forever", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) - public JsonResponse> getForever(HttpServletRequest request, @RequestParam(required = false) String domainName) throws Exception { + public JsonResponse> getForever(HttpServletRequest request, + @RequestParam(required = false) String domainName) throws Exception { List forever = projectService.getForever(domainName); return JsonResponse.newInstance().ok(forever); @@ -216,4 +225,27 @@ public class ProjectController { ProjectVo.ProjectInfo projectInfo = projectService.changeProjectInfo(currentUserId,projectInfoDto); return JsonResponse.newInstance().ok(projectInfo); } + + @ApiOperation(value = "根据标签查找项目",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/label", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> selectByLabelName(HttpServletRequest request, + @RequestParam(required = false) String labelName) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List projectInfoList = projectService.selectByLabelName(currentUserId,labelName); + return JsonResponse.newInstance().ok(projectInfoList); + } + +// @ApiOperation(value = "查找关联的项目",notes = "") +// @ApiImplicitParams({ +// }) +// @RequestMapping(value = "/relevance", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) +// public JsonResponse> selectRelevanceProject(HttpServletRequest request, +// @RequestParam(required = false) Long projectId) throws Exception { +// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); +// List projectInfoList = projectService.selectRelevanceProject(currentUserId,projectId); +// return JsonResponse.newInstance().ok(projectInfoList); +// } + } diff --git a/tall/src/main/resources/mapper_dao/SysLabelDao.xml b/tall/src/main/resources/mapper_dao/SysLabelDao.xml new file mode 100644 index 00000000..a5ea7bfe --- /dev/null +++ b/tall/src/main/resources/mapper_dao/SysLabelDao.xml @@ -0,0 +1,31 @@ + + + + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysProjectDao.xml b/tall/src/main/resources/mapper_dao/SysProjectDao.xml index bc1b984f..8956f898 100644 --- a/tall/src/main/resources/mapper_dao/SysProjectDao.xml +++ b/tall/src/main/resources/mapper_dao/SysProjectDao.xml @@ -11,6 +11,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -82,5 +115,119 @@ s.rec_status = 0 + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysLabelMapper.xml b/tall/src/main/resources/mapper_raw/SysLabelMapper.xml new file mode 100644 index 00000000..9885577b --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysLabelMapper.xml @@ -0,0 +1,290 @@ + + + + + + + + + + + + + + + + + + + + + + + + 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, name, code, color, description, level, user_id, created_at, updated_at, rec_status + + + + + delete from t_sys_label + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_label + + + + + + insert into t_sys_label (id, name, code, + color, description, level, + user_id, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, + #{color,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{level,jdbcType=TINYINT}, + #{userId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_sys_label + + + id, + + + name, + + + code, + + + color, + + + description, + + + level, + + + user_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{code,jdbcType=VARCHAR}, + + + #{color,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{level,jdbcType=TINYINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_label + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + code = #{record.code,jdbcType=VARCHAR}, + + + color = #{record.color,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + level = #{record.level,jdbcType=TINYINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_label + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + code = #{record.code,jdbcType=VARCHAR}, + color = #{record.color,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + level = #{record.level,jdbcType=TINYINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_label + + + name = #{name,jdbcType=VARCHAR}, + + + code = #{code,jdbcType=VARCHAR}, + + + color = #{color,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + level = #{level,jdbcType=TINYINT}, + + + user_id = #{userId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_label + set name = #{name,jdbcType=VARCHAR}, + code = #{code,jdbcType=VARCHAR}, + color = #{color,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + level = #{level,jdbcType=TINYINT}, + user_id = #{userId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysProjectLabelMapper.xml b/tall/src/main/resources/mapper_raw/SysProjectLabelMapper.xml new file mode 100644 index 00000000..720b9e27 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysProjectLabelMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, label_id, created_at, updated_at, rec_status + + + + + delete from t_sys_project_label + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_project_label + + + + + + insert into t_sys_project_label (id, project_id, label_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{labelId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_sys_project_label + + + id, + + + project_id, + + + label_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{labelId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_project_label + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + label_id = #{record.labelId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_project_label + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + label_id = #{record.labelId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_project_label + + + project_id = #{projectId,jdbcType=BIGINT}, + + + label_id = #{labelId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_project_label + set project_id = #{projectId,jdbcType=BIGINT}, + label_id = #{labelId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysRelevanceProjectMapper.xml b/tall/src/main/resources/mapper_raw/SysRelevanceProjectMapper.xml new file mode 100644 index 00000000..5bc03772 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysRelevanceProjectMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, project_id, relevance_project_id, created_at, updated_at, rec_status + + + + + delete from t_sys_relevance_project + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_relevance_project + + + + + + insert into t_sys_relevance_project (id, project_id, relevance_project_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{relevanceProjectId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_sys_relevance_project + + + id, + + + project_id, + + + relevance_project_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{projectId,jdbcType=BIGINT}, + + + #{relevanceProjectId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_relevance_project + + + id = #{record.id,jdbcType=BIGINT}, + + + project_id = #{record.projectId,jdbcType=BIGINT}, + + + relevance_project_id = #{record.relevanceProjectId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_relevance_project + set id = #{record.id,jdbcType=BIGINT}, + project_id = #{record.projectId,jdbcType=BIGINT}, + relevance_project_id = #{record.relevanceProjectId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_relevance_project + + + project_id = #{projectId,jdbcType=BIGINT}, + + + relevance_project_id = #{relevanceProjectId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_relevance_project + set project_id = #{projectId,jdbcType=BIGINT}, + relevance_project_id = #{relevanceProjectId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/util/src/main/java/com/ccsens/util/CodeEnum.java b/util/src/main/java/com/ccsens/util/CodeEnum.java index f0f19437..f4fb6e7b 100644 --- a/util/src/main/java/com/ccsens/util/CodeEnum.java +++ b/util/src/main/java/com/ccsens/util/CodeEnum.java @@ -115,6 +115,8 @@ public enum CodeEnum { TASK_PREPARATION(97,"任务已经开始了,请勿重复操作",true), NOT_COMMENT(98,"该评论不存在",true), NOT_MESSAGE_TYPE(99,"找不到消息类型,请检查名称是否正确",true), + NOT_LABEL(100,"标签不存在,请检查后操作",true), + REPEAT_LABEL(100,"标签已存在,请勿重复添加",true), ; public CodeEnum addMsg(String msg){