Browse Source

智能机器人

master
zy_Java 5 years ago
parent
commit
30aa805b0f
  1. 63
      tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java
  2. 128
      tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java
  3. 841
      tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java
  4. 84
      tall/src/main/java/com/ccsens/tall/bean/po/SysProjectLabel.java
  5. 561
      tall/src/main/java/com/ccsens/tall/bean/po/SysProjectLabelExample.java
  6. 84
      tall/src/main/java/com/ccsens/tall/bean/po/SysRelevanceProject.java
  7. 561
      tall/src/main/java/com/ccsens/tall/bean/po/SysRelevanceProjectExample.java
  8. 31
      tall/src/main/java/com/ccsens/tall/bean/vo/LabelVo.java
  9. 45
      tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java
  10. 1
      tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java
  11. 3
      tall/src/main/java/com/ccsens/tall/config/SpringConfig.java
  12. 15
      tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java
  13. 7
      tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java
  14. 8
      tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectLabelDao.java
  15. 8
      tall/src/main/java/com/ccsens/tall/persist/dao/SysRelevanceProjectDao.java
  16. 30
      tall/src/main/java/com/ccsens/tall/persist/mapper/SysLabelMapper.java
  17. 30
      tall/src/main/java/com/ccsens/tall/persist/mapper/SysProjectLabelMapper.java
  18. 30
      tall/src/main/java/com/ccsens/tall/persist/mapper/SysRelevanceProjectMapper.java
  19. 10
      tall/src/main/java/com/ccsens/tall/service/ExcelService.java
  20. 20
      tall/src/main/java/com/ccsens/tall/service/ILabelService.java
  21. 6
      tall/src/main/java/com/ccsens/tall/service/IProjectService.java
  22. 2
      tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java
  23. 197
      tall/src/main/java/com/ccsens/tall/service/LabelService.java
  24. 87
      tall/src/main/java/com/ccsens/tall/service/ProjectService.java
  25. 40
      tall/src/main/java/com/ccsens/tall/service/WbsSubSheetService.java
  26. 94
      tall/src/main/java/com/ccsens/tall/web/LabelController.java
  27. 42
      tall/src/main/java/com/ccsens/tall/web/ProjectController.java
  28. 31
      tall/src/main/resources/mapper_dao/SysLabelDao.xml
  29. 147
      tall/src/main/resources/mapper_dao/SysProjectDao.xml
  30. 290
      tall/src/main/resources/mapper_raw/SysLabelMapper.xml
  31. 228
      tall/src/main/resources/mapper_raw/SysProjectLabelMapper.xml
  32. 228
      tall/src/main/resources/mapper_raw/SysRelevanceProjectMapper.xml
  33. 2
      util/src/main/java/com/ccsens/util/CodeEnum.java

63
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<Long> labelList;
}
}

128
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();
}
}

841
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<Criteria> oredCriteria;
public SysLabelExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> 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<String> values) {
addCriterion("name in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> 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<String> values) {
addCriterion("code in", values, "code");
return (Criteria) this;
}
public Criteria andCodeNotIn(List<String> 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<String> values) {
addCriterion("color in", values, "color");
return (Criteria) this;
}
public Criteria andColorNotIn(List<String> 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<String> values) {
addCriterion("description in", values, "description");
return (Criteria) this;
}
public Criteria andDescriptionNotIn(List<String> 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<Byte> values) {
addCriterion("level in", values, "level");
return (Criteria) this;
}
public Criteria andLevelNotIn(List<Byte> 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<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> 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<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> 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);
}
}
}

84
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();
}
}

561
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<Criteria> oredCriteria;
public SysProjectLabelExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> 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<Long> values) {
addCriterion("project_id in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotIn(List<Long> 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<Long> values) {
addCriterion("label_id in", values, "labelId");
return (Criteria) this;
}
public Criteria andLabelIdNotIn(List<Long> 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<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> 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);
}
}
}

84
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();
}
}

561
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<Criteria> oredCriteria;
public SysRelevanceProjectExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> 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<Long> values) {
addCriterion("project_id in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotIn(List<Long> 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<Long> values) {
addCriterion("relevance_project_id in", values, "relevanceProjectId");
return (Criteria) this;
}
public Criteria andRelevanceProjectIdNotIn(List<Long> 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<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> 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<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> 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<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> 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);
}
}
}

31
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;
}
}

45
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<String> roles;
private List<String> roles = new ArrayList<>();
@ApiModelProperty("当前用户在本项目中的最高权限")
private int power;
@ApiModelProperty("当前用户是否是本项目的创建者")
private boolean creator;
@ApiModelProperty("项目配置")
private ProjectConfig projectConfig;
@ApiModelProperty("标签信息")
private List<LabelVo.SelectLabel> 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<LabelVo.SelectLabel> labelList;
public Long getTotalDuration() {
if (ObjectUtil.isNotNull(endTime) && ObjectUtil.isNotNull(beginTime)) {
return endTime - beginTime;
}
return null;
}
}
}

1
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外部")

3
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);
}

15
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<LabelVo.SelectLabel> selectLabelByUserId(@Param("userId")Long userId);
List<LabelVo.SelectLabel> selectLabelByProjectId(@Param("projectId")Long projectId);
}

7
tall/src/main/java/com/ccsens/tall/persist/dao/SysProjectDao.java

@ -16,4 +16,11 @@ public interface SysProjectDao extends SysProjectMapper{
List<ProjectVo.TemplateStatus> selectByTemplateStatus(@Param("templateStatus") Integer templateStatus);
List<ProjectVo.ProjectByKey> getProjectByKey(@Param("userId") Long userId, @Param("key") String key);
List<ProjectVo.ProjectInfo> findProjectIdByUserId01(@Param("userId") Long currentUserId, @Param("startTime") Long startTime,
@Param("endTime") Long endTime,@Param("orderType")Integer orderType,@Param("order")Integer order);
List<ProjectVo.ProjectInfo> selectByLabelName(@Param("userId")Long currentUserId, @Param("labelName")String labelName);
List<ProjectVo.RelevanceProject> selectRelevanceProject(@Param("labelName")Long projectId);
}

8
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 {
}

8
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 {
}

30
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<SysLabel> 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);
}

30
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<SysProjectLabel> 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);
}

30
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<SysRelevanceProject> 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);
}

10
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);
}

20
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<LabelVo.SelectLabel> addLabel(Long userId,List<LabelDto.AddLabel> labelList);
List<LabelVo.SelectLabel> 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);
}

6
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<ProjectVo.ProjectInfo> getProjectInfo(Long currentUserId, String date)throws Exception;
List<ProjectVo.ProjectInfo> getProjectInfo(Long currentUserId, String date,Integer orderType,Integer order)throws Exception;
List<String> 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<ProjectVo.ProjectInfo> selectByLabelName(Long currentUserId, String labelName);
List<ProjectVo.RelevanceProject> selectRelevanceProject(Long currentUserId, Long projectId);
}

2
tall/src/main/java/com/ccsens/tall/service/IWbsSubSheetService.java

@ -20,4 +20,6 @@ public interface IWbsSubSheetService {
void getPluginConfig(Long id, XSSFWorkbook xssfWorkbook, List<ProTaskDetail> taskDetails) throws Exception;
void getRoBotSheet(Long projectId, XSSFWorkbook xssfWorkbook);
void readRelevanceProject(Long id, XSSFWorkbook xssfWorkbook);
}

197
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<LabelVo.SelectLabel> addLabel(Long userId,List<LabelDto.AddLabel> labelList) {
if(CollectionUtil.isNotEmpty(labelList)){
labelList.forEach(label->{
SysLabelExample sysLabelExample = new SysLabelExample();
sysLabelExample.createCriteria().andNameEqualTo(label.getName());
List<SysLabel> 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<LabelVo.SelectLabel> 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<SysProjectLabel> 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);
}
}
}

87
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<ProjectVo.ProjectInfo> getProjectInfo(Long currentUserId, String date) throws Exception {
List<ProjectVo.ProjectInfo> projectInfoList = new ArrayList<>();
public List<ProjectVo.ProjectInfo> getProjectInfo(Long currentUserId, String date,Integer orderType,Integer order) throws Exception {
//获取日期的开始结束时间
Map<String, Long> timeMap = new HashMap<>();
timeMap = DateUtil.projectFormatDateTime(date);
Long startMillisTime = timeMap.get("startMillisTime");
Long endMillisTime = timeMap.get("endMillisTime") + 1;
//查找此用户关注的项目
List<SysProject> projectList = sysProjectDao.findProjectIdByUserId(currentUserId, startMillisTime, endMillisTime);
projectInfoList = projectInfoByProject(projectList, currentUserId);
List<ProjectVo.ProjectInfo> projectInfoList = sysProjectDao.findProjectIdByUserId01(currentUserId, startMillisTime, endMillisTime,orderType,order);
projectByProject(projectInfoList,currentUserId);
return projectInfoList;
}
private void projectByProject(List<ProjectVo.ProjectInfo> projectInfoList, Long currentUserId){
if (CollectionUtil.isNotEmpty(projectInfoList)) {
projectInfoList.forEach(projectInfo -> {
//是否是创建者
if (projectInfo.isCreator()) {
projectInfo.getRoles().add(WebConstant.ROLE_NAME.Creator.phase);
}
//本用户在项目中的角色
List<ProRole> 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<ProShow> 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<ProjectVo.ProjectInfo> projectInfoByProject(List<SysProject> projectList, Long currentUserId) {
List<ProjectVo.ProjectInfo> projectInfoList = new ArrayList<>();
@ -200,7 +244,11 @@ public class ProjectService implements IProjectService {
projectConfig.setCreateTask(1);
projectInfo.setProjectConfig(projectConfig);
}
//获取项目下的标签信息
List<LabelVo.SelectLabel> 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<LabelVo.SelectLabel> labelList = sysLabelDao.selectLabelByProjectId(projectId);
if(CollectionUtil.isNotEmpty(labelList)){
projectInfo.setLabelList(labelList);
}
return projectInfo;
}
@ -338,6 +393,7 @@ public class ProjectService implements IProjectService {
List<SysProject> projectList = sysProjectDao.findProjectIdByUserId(currentUserId, startMillisTime, endMillisTime);
// List<SysProject> projectList = attentionService.findProjectIdByUserId(currentUserId);
projectInfoList = projectInfoByProject(projectList, currentUserId);
//关键字模糊查询和是否创建者
if (CollectionUtil.isNotEmpty(projectInfoList) && StrUtil.isNotEmpty(key)) {
Iterator<ProjectVo.ProjectInfo> 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<ProjectVo.ProjectInfo> selectByLabelName(Long currentUserId, String labelName) {
List<ProjectVo.ProjectInfo> projectInfoList = sysProjectDao.selectByLabelName(currentUserId,labelName);
projectByProject(projectInfoList,currentUserId);
return projectInfoList;
}
@Override
public List<ProjectVo.RelevanceProject> selectRelevanceProject(Long currentUserId, Long projectId) {
List<ProjectVo.RelevanceProject> projectInfoList = sysProjectDao.selectRelevanceProject(projectId);
return projectInfoList;
}
}

40
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);
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);
}
}
}
}
}

94
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<List<LabelVo.SelectLabel>> selectLabel(HttpServletRequest request) throws Exception {
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
List<LabelVo.SelectLabel> 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<List<LabelVo.SelectLabel>> addLabel(HttpServletRequest request,
@Validated @RequestBody List<LabelDto.AddLabel> labelList ) throws Exception {
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
List<LabelVo.SelectLabel> 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();
}
}

42
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<List<ProjectVo.ProjectInfo>> getProjectByDate(HttpServletRequest request, @RequestParam(required = true) String date) throws Exception {
public JsonResponse<List<ProjectVo.ProjectInfo>> 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<ProjectVo.ProjectInfo> projectInfoList = projectService.getProjectInfo(currentUserId,date);
List<ProjectVo.ProjectInfo> 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<List<ProjectVo.TemplateStatus>> getForever(HttpServletRequest request, @RequestParam(required = false) String domainName) throws Exception {
public JsonResponse<List<ProjectVo.TemplateStatus>> getForever(HttpServletRequest request,
@RequestParam(required = false) String domainName) throws Exception {
List<ProjectVo.TemplateStatus> 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<List<ProjectVo.ProjectInfo>> selectByLabelName(HttpServletRequest request,
@RequestParam(required = false) String labelName) throws Exception {
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
List<ProjectVo.ProjectInfo> 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<List<ProjectVo.RelevanceProject>> selectRelevanceProject(HttpServletRequest request,
// @RequestParam(required = false) Long projectId) throws Exception {
// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
// List<ProjectVo.RelevanceProject> projectInfoList = projectService.selectRelevanceProject(currentUserId,projectId);
// return JsonResponse.newInstance().ok(projectInfoList);
// }
}

31
tall/src/main/resources/mapper_dao/SysLabelDao.xml

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tall.persist.dao.SysLabelDao">
<select id="selectLabelByUserId" parameterType="java.util.Map" resultType="com.ccsens.tall.bean.vo.LabelVo$SelectLabel">
select * from t_sys_label
where
rec_status = 0
and
user_id = #{userId}
</select>
<select id="selectLabelByProjectId" parameterType="java.util.Map" resultType="com.ccsens.tall.bean.vo.LabelVo$SelectLabel">
select
l.id as id,
l.`name` as `name`,
l.code as code,
l.color as color,
l.description as description,
l.`level` as `level`
from
t_sys_label l join t_sys_project_label p on l.id = p.label_id
where
p.rec_status = 0
and
l.rec_status = 0
and
p.project_id = #{projectId}
</select>
</mapper>

147
tall/src/main/resources/mapper_dao/SysProjectDao.xml

@ -11,6 +11,39 @@
<result column="pEndTime" property="endTime" />
</resultMap>
<resultMap id="resultMap_ProjectInfo01" type="com.ccsens.tall.bean.vo.ProjectVo$ProjectInfo">
<id column="pId" property="id" />
<result column="pName" property="name" />
<result column="pAddress" property="address" />
<result column="pBeginTime" property="beginTime" />
<result column="pEndTime" property="endTime" />
<result column="pCreator" property="creator" />
<collection property="labelList" ofType="com.ccsens.tall.bean.vo.LabelVo$SelectLabel">
<id column="lId" property="id"/>
<result column="lName" property="name"/>
<result column="lCode" property="code"/>
<result column="lColor" property="color"/>
<result column="lLevel" property="level"/>
<result column="lDescription" property="description"/>
</collection>
</resultMap>
<resultMap id="resultMap_Relevance_Project" type="com.ccsens.tall.bean.vo.ProjectVo$RelevanceProject">
<id column="pId" property="id" />
<result column="pName" property="name" />
<result column="pAddress" property="address" />
<result column="pBeginTime" property="beginTime" />
<result column="pEndTime" property="endTime" />
<collection property="labelList" ofType="com.ccsens.tall.bean.vo.LabelVo$SelectLabel">
<id column="lId" property="id"/>
<result column="lName" property="name"/>
<result column="lCode" property="code"/>
<result column="lColor" property="color"/>
<result column="lLevel" property="level"/>
<result column="lDescription" property="description"/>
</collection>
</resultMap>
<resultMap id="resultMap_template" type="com.ccsens.tall.bean.vo.ProjectVo$TemplateStatus">
<id column="pId" property="id" />
<result column="pName" property="name" />
@ -82,5 +115,119 @@
s.rec_status = 0
</select>
<select id="findProjectIdByUserId01" parameterType="java.util.Map" resultMap="resultMap_ProjectInfo01">
SELECT
p.id AS pId,
p.NAME AS pName,
p.address AS pAddress,
p.begin_time AS pBeginTime,
p.end_time AS pEndTime,
if(p.creator_id = #{userId},true,false) as pCreator,
l.id as lId,
l.name as lName,
l.code as lCode,
l.color as lColor,
l.level as lLevle,
l.description as lDescription
FROM
t_sys_user_attention a
left JOIN t_sys_project p ON a.project_id = p.id
left join t_sys_project_label pl on pl.project_id = p.id
left join t_sys_label l on pl.label_id = l.id
WHERE
a.user_id = #{userId}
AND
p.rec_status = 0
and
(l.rec_status = 0 or l.rec_status is null)
and
(pl.rec_status = 0 or pl.rec_status is null)
AND
p.template = 0
<if test="startTime != null">
<if test="endTime != null">
and
(
(p.begin_time &lt;= #{startTime} and p.end_time &gt;= #{endTime})
OR
(p.begin_time &gt;= #{startTime} and p.begin_time &lt;= #{endTime})
OR
(p.end_time &gt;= #{startTime} and p.end_time &lt;= #{endTime})
)
</if>
</if>
ORDER BY
<if test="orderType == 0">
p.created_at
</if>
<if test="orderType == 1">
p.name
</if>
<if test="orderType == 2">
l.name
</if>
<if test="order == 0">
DESC
</if>
</select>
<select id="selectByLabelName" parameterType="java.util.Map" resultMap="resultMap_ProjectInfo01">
SELECT
p.id AS pId,
p.NAME AS pName,
p.address AS pAddress,
p.begin_time AS pBeginTime,
p.end_time AS pEndTime,
if(p.creator_id = #{userId},true,false) as pCreator,
l.id as lId,
l.name as lName,
l.code as lCode,
l.color as lColor,
l.level as lLevle,
l.description as lDescription
FROM
t_sys_user_attention a
left JOIN t_sys_project p ON a.project_id = p.id
left join t_sys_project_label pl on pl.project_id = p.id
left join t_sys_label l on pl.label_id = l.id
WHERE
a.user_id = #{userId}
AND
p.rec_status = 0
and
(l.rec_status = 0 or l.rec_status is null)
and
(pl.rec_status = 0 or pl.rec_status is null)
AND
p.template = 0
and
l.name = #{labelName}
ORDER BY l.name
</select>
<select id="selectRelevanceProject" parameterType="java.util.Map" resultMap="resultMap_Relevance_Project">
SELECT
*
FROM
t_sys_project p LEFT JOIN
(SELECT
r.relevance_project_id as rProjectId
FROM
t_sys_relevance_project r left JOIN t_sys_project sp ON r.project_id = sp.id
WHERE
r.project_id = #{projectId}
) t
on p.id = t.rProjectId left join t_sys_project_label pl on pl.project_id = p.id
left join t_sys_label l on pl.label_id = l.id
WHERE
p.rec_status = 0
and
(l.rec_status = 0 or l.rec_status is null)
and
(pl.rec_status = 0 or pl.rec_status is null)
AND
p.template = 0
</select>
</mapper>

290
tall/src/main/resources/mapper_raw/SysLabelMapper.xml

@ -0,0 +1,290 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tall.persist.mapper.SysLabelMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.SysLabel">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="color" jdbcType="VARCHAR" property="color" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="level" jdbcType="TINYINT" property="level" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, name, code, color, description, level, user_id, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysLabelExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_sys_label
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_sys_label
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_sys_label
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.SysLabelExample">
delete from t_sys_label
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysLabel">
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>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysLabel">
insert into t_sys_label
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="code != null">
code,
</if>
<if test="color != null">
color,
</if>
<if test="description != null">
description,
</if>
<if test="level != null">
level,
</if>
<if test="userId != null">
user_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="color != null">
#{color,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="level != null">
#{level,jdbcType=TINYINT},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.SysLabelExample" resultType="java.lang.Long">
select count(*) from t_sys_label
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_sys_label
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.code != null">
code = #{record.code,jdbcType=VARCHAR},
</if>
<if test="record.color != null">
color = #{record.color,jdbcType=VARCHAR},
</if>
<if test="record.description != null">
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.level != null">
level = #{record.level,jdbcType=TINYINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.SysLabel">
update t_sys_label
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="color != null">
color = #{color,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="level != null">
level = #{level,jdbcType=TINYINT},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.SysLabel">
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}
</update>
</mapper>

228
tall/src/main/resources/mapper_raw/SysProjectLabelMapper.xml

@ -0,0 +1,228 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tall.persist.mapper.SysProjectLabelMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.SysProjectLabel">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="label_id" jdbcType="BIGINT" property="labelId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, project_id, label_id, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysProjectLabelExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_sys_project_label
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_sys_project_label
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_sys_project_label
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.SysProjectLabelExample">
delete from t_sys_project_label
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysProjectLabel">
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>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysProjectLabel">
insert into t_sys_project_label
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="labelId != null">
label_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="projectId != null">
#{projectId,jdbcType=BIGINT},
</if>
<if test="labelId != null">
#{labelId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.SysProjectLabelExample" resultType="java.lang.Long">
select count(*) from t_sys_project_label
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_sys_project_label
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=BIGINT},
</if>
<if test="record.labelId != null">
label_id = #{record.labelId,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.SysProjectLabel">
update t_sys_project_label
<set>
<if test="projectId != null">
project_id = #{projectId,jdbcType=BIGINT},
</if>
<if test="labelId != null">
label_id = #{labelId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.SysProjectLabel">
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}
</update>
</mapper>

228
tall/src/main/resources/mapper_raw/SysRelevanceProjectMapper.xml

@ -0,0 +1,228 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ccsens.tall.persist.mapper.SysRelevanceProjectMapper">
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.SysRelevanceProject">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="project_id" jdbcType="BIGINT" property="projectId" />
<result column="relevance_project_id" jdbcType="BIGINT" property="relevanceProjectId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, project_id, relevance_project_id, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysRelevanceProjectExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_sys_relevance_project
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_sys_relevance_project
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_sys_relevance_project
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.SysRelevanceProjectExample">
delete from t_sys_relevance_project
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysRelevanceProject">
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>
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysRelevanceProject">
insert into t_sys_relevance_project
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="relevanceProjectId != null">
relevance_project_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="projectId != null">
#{projectId,jdbcType=BIGINT},
</if>
<if test="relevanceProjectId != null">
#{relevanceProjectId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.SysRelevanceProjectExample" resultType="java.lang.Long">
select count(*) from t_sys_relevance_project
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_sys_relevance_project
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=BIGINT},
</if>
<if test="record.relevanceProjectId != null">
relevance_project_id = #{record.relevanceProjectId,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.SysRelevanceProject">
update t_sys_relevance_project
<set>
<if test="projectId != null">
project_id = #{projectId,jdbcType=BIGINT},
</if>
<if test="relevanceProjectId != null">
relevance_project_id = #{relevanceProjectId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.SysRelevanceProject">
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}
</update>
</mapper>

2
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){

Loading…
Cancel
Save