From bbbd851c65417c28b7713f644ed1517858b7b9ed Mon Sep 17 00:00:00 2001 From: zy_Java <654600784@qq.com> Date: Thu, 15 Oct 2020 18:07:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=BB=E5=8A=A1=E6=A0=87?= =?UTF-8?q?=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ccsens/mt/service/CompeteService.java | 5 + mt/src/main/resources/application.yml | 4 +- .../com/ccsens/tall/bean/dto/LabelDto.java | 14 + .../com/ccsens/tall/bean/po/ProTaskLabel.java | 84 +++ .../tall/bean/po/ProTaskLabelExample.java | 561 ++++++++++++++++++ .../com/ccsens/tall/bean/po/SysLabel.java | 11 + .../ccsens/tall/bean/po/SysLabelExample.java | 60 ++ .../com/ccsens/tall/bean/po/SysProject.java | 33 ++ .../tall/bean/po/SysProjectExample.java | 180 ++++++ .../com/ccsens/tall/bean/vo/ProjectVo.java | 9 + .../java/com/ccsens/tall/bean/vo/TaskVo.java | 2 + .../ccsens/tall/persist/dao/ProRoleDao.java | 2 +- .../ccsens/tall/persist/dao/SysLabelDao.java | 10 +- .../persist/mapper/ProTaskLabelMapper.java | 30 + .../ccsens/tall/service/ILabelService.java | 18 +- .../ccsens/tall/service/IProRoleService.java | 2 +- .../com/ccsens/tall/service/LabelService.java | 245 +++++--- .../ccsens/tall/service/ProRoleService.java | 39 +- .../ccsens/tall/service/ProjectService.java | 38 +- .../com/ccsens/tall/web/LabelController.java | 32 +- .../com/ccsens/tall/web/RoleController.java | 9 +- tall/src/main/resources/application.yml | 4 +- .../main/resources/mapper_dao/ProRoleDao.xml | 26 +- .../main/resources/mapper_dao/SysLabelDao.xml | 33 +- .../resources/mapper_dao/SysProjectDao.xml | 9 + .../resources/mapper_dao/TaskDetailDao.xml | 1 + .../mapper_raw/ProTaskLabelMapper.xml | 228 +++++++ .../resources/mapper_raw/SysLabelMapper.xml | 26 +- .../resources/mapper_raw/SysProjectMapper.xml | 58 +- 29 files changed, 1652 insertions(+), 121 deletions(-) create mode 100644 tall/src/main/java/com/ccsens/tall/bean/po/ProTaskLabel.java create mode 100644 tall/src/main/java/com/ccsens/tall/bean/po/ProTaskLabelExample.java create mode 100644 tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskLabelMapper.java create mode 100644 tall/src/main/resources/mapper_raw/ProTaskLabelMapper.xml diff --git a/mt/src/main/java/com/ccsens/mt/service/CompeteService.java b/mt/src/main/java/com/ccsens/mt/service/CompeteService.java index 433051ff..21793177 100644 --- a/mt/src/main/java/com/ccsens/mt/service/CompeteService.java +++ b/mt/src/main/java/com/ccsens/mt/service/CompeteService.java @@ -544,6 +544,11 @@ public class CompeteService implements ICompeteService{ if (project == null) { throw new BaseException(CodeEnum.PARAM_ERROR); } + CompeteProjectGroupExample projectGroupExample = new CompeteProjectGroupExample(); + projectGroupExample.createCriteria().andProjectIdEqualTo(project.getId()).andGroupIdEqualTo(projectAndGroup.getGroupId()); + if(competeProjectGroupMapper.countByExample(projectGroupExample) == 0){ + throw new BaseException(CodeEnum.PARAM_ERROR); + } //单人项目直接添加信息和分组 if (project.getTeam() == Constant.Compete.TEAM_NO) { // 个人赛 diff --git a/mt/src/main/resources/application.yml b/mt/src/main/resources/application.yml index d082c0ea..5c2cd5c4 100644 --- a/mt/src/main/resources/application.yml +++ b/mt/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: prod - include: common, util-prod \ No newline at end of file + active: dev + include: common, util-dev \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java index c448d2f1..b380e25c 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/LabelDto.java @@ -25,6 +25,8 @@ public class LabelDto { private String description; @ApiModelProperty("优先级") private int level; + @ApiModelProperty("标签类型 0项目标签 1任务标签") + private byte type = 0; } @Data @ApiModel("删除标签") @@ -50,6 +52,8 @@ public class LabelDto { private String description; @ApiModelProperty("优先级") private int level; + @ApiModelProperty("标签类型 0项目标签 1任务标签") + private Byte type; } @Data @@ -61,4 +65,14 @@ public class LabelDto { @ApiModelProperty("标签id") private List labelList; } + + @Data + @ApiModel("给项目添加标签") + public static class TaskLabel{ + @NotNull + @ApiModelProperty("项目id") + private Long taskId; + @ApiModelProperty("标签id") + private List labelList; + } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskLabel.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskLabel.java new file mode 100644 index 00000000..ee8f78ee --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskLabel.java @@ -0,0 +1,84 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProTaskLabel implements Serializable { + private Long id; + + private Long taskDetailId; + + 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 getTaskDetailId() { + return taskDetailId; + } + + public void setTaskDetailId(Long taskDetailId) { + this.taskDetailId = taskDetailId; + } + + 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(", taskDetailId=").append(taskDetailId); + sb.append(", labelId=").append(labelId); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", recStatus=").append(recStatus); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskLabelExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskLabelExample.java new file mode 100644 index 00000000..60eec890 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskLabelExample.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 ProTaskLabelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProTaskLabelExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdIsNull() { + addCriterion("task_detail_id is null"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdIsNotNull() { + addCriterion("task_detail_id is not null"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdEqualTo(Long value) { + addCriterion("task_detail_id =", value, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdNotEqualTo(Long value) { + addCriterion("task_detail_id <>", value, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdGreaterThan(Long value) { + addCriterion("task_detail_id >", value, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdGreaterThanOrEqualTo(Long value) { + addCriterion("task_detail_id >=", value, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdLessThan(Long value) { + addCriterion("task_detail_id <", value, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdLessThanOrEqualTo(Long value) { + addCriterion("task_detail_id <=", value, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdIn(List values) { + addCriterion("task_detail_id in", values, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdNotIn(List values) { + addCriterion("task_detail_id not in", values, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdBetween(Long value1, Long value2) { + addCriterion("task_detail_id between", value1, value2, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andTaskDetailIdNotBetween(Long value1, Long value2) { + addCriterion("task_detail_id not between", value1, value2, "taskDetailId"); + return (Criteria) this; + } + + public Criteria andLabelIdIsNull() { + addCriterion("label_id is null"); + return (Criteria) this; + } + + public Criteria andLabelIdIsNotNull() { + addCriterion("label_id is not null"); + return (Criteria) this; + } + + public Criteria andLabelIdEqualTo(Long value) { + addCriterion("label_id =", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdNotEqualTo(Long value) { + addCriterion("label_id <>", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdGreaterThan(Long value) { + addCriterion("label_id >", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdGreaterThanOrEqualTo(Long value) { + addCriterion("label_id >=", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdLessThan(Long value) { + addCriterion("label_id <", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdLessThanOrEqualTo(Long value) { + addCriterion("label_id <=", value, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdIn(List values) { + addCriterion("label_id in", values, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdNotIn(List values) { + addCriterion("label_id not in", values, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdBetween(Long value1, Long value2) { + addCriterion("label_id between", value1, value2, "labelId"); + return (Criteria) this; + } + + public Criteria andLabelIdNotBetween(Long value1, Long value2) { + addCriterion("label_id not between", value1, value2, "labelId"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java index 63e30b09..a5b1fe37 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabel.java @@ -24,6 +24,8 @@ public class SysLabel implements Serializable { private Byte recStatus; + private Byte businessType; + private static final long serialVersionUID = 1L; public Long getId() { @@ -106,6 +108,14 @@ public class SysLabel implements Serializable { this.recStatus = recStatus; } + public Byte getBusinessType() { + return businessType; + } + + public void setBusinessType(Byte businessType) { + this.businessType = businessType; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -122,6 +132,7 @@ public class SysLabel implements Serializable { sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); + sb.append(", businessType=").append(businessType); sb.append("]"); return sb.toString(); } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java index 5abb17a5..cfd729a5 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysLabelExample.java @@ -744,6 +744,66 @@ public class SysLabelExample { addCriterion("rec_status not between", value1, value2, "recStatus"); return (Criteria) this; } + + public Criteria andBusinessTypeIsNull() { + addCriterion("business_type is null"); + return (Criteria) this; + } + + public Criteria andBusinessTypeIsNotNull() { + addCriterion("business_type is not null"); + return (Criteria) this; + } + + public Criteria andBusinessTypeEqualTo(Byte value) { + addCriterion("business_type =", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeNotEqualTo(Byte value) { + addCriterion("business_type <>", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeGreaterThan(Byte value) { + addCriterion("business_type >", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("business_type >=", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeLessThan(Byte value) { + addCriterion("business_type <", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeLessThanOrEqualTo(Byte value) { + addCriterion("business_type <=", value, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeIn(List values) { + addCriterion("business_type in", values, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeNotIn(List values) { + addCriterion("business_type not in", values, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeBetween(Byte value1, Byte value2) { + addCriterion("business_type between", value1, value2, "businessType"); + return (Criteria) this; + } + + public Criteria andBusinessTypeNotBetween(Byte value1, Byte value2) { + addCriterion("business_type not between", value1, value2, "businessType"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysProject.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysProject.java index 1763d352..cb77a0fb 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysProject.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysProject.java @@ -32,6 +32,12 @@ public class SysProject implements Serializable { private Byte recStatus; + private Long parentId; + + private Byte homePageShow; + + private Byte highlight; + private static final long serialVersionUID = 1L; public Long getId() { @@ -146,6 +152,30 @@ public class SysProject implements Serializable { this.recStatus = recStatus; } + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public Byte getHomePageShow() { + return homePageShow; + } + + public void setHomePageShow(Byte homePageShow) { + this.homePageShow = homePageShow; + } + + public Byte getHighlight() { + return highlight; + } + + public void setHighlight(Byte highlight) { + this.highlight = highlight; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -166,6 +196,9 @@ public class SysProject implements Serializable { sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); + sb.append(", parentId=").append(parentId); + sb.append(", homePageShow=").append(homePageShow); + sb.append(", highlight=").append(highlight); sb.append("]"); return sb.toString(); } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectExample.java index 2c31c159..c7f63bed 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysProjectExample.java @@ -974,6 +974,186 @@ public class SysProjectExample { addCriterion("rec_status not between", value1, value2, "recStatus"); return (Criteria) this; } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andHomePageShowIsNull() { + addCriterion("home_page_show is null"); + return (Criteria) this; + } + + public Criteria andHomePageShowIsNotNull() { + addCriterion("home_page_show is not null"); + return (Criteria) this; + } + + public Criteria andHomePageShowEqualTo(Byte value) { + addCriterion("home_page_show =", value, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowNotEqualTo(Byte value) { + addCriterion("home_page_show <>", value, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowGreaterThan(Byte value) { + addCriterion("home_page_show >", value, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowGreaterThanOrEqualTo(Byte value) { + addCriterion("home_page_show >=", value, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowLessThan(Byte value) { + addCriterion("home_page_show <", value, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowLessThanOrEqualTo(Byte value) { + addCriterion("home_page_show <=", value, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowIn(List values) { + addCriterion("home_page_show in", values, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowNotIn(List values) { + addCriterion("home_page_show not in", values, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowBetween(Byte value1, Byte value2) { + addCriterion("home_page_show between", value1, value2, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHomePageShowNotBetween(Byte value1, Byte value2) { + addCriterion("home_page_show not between", value1, value2, "homePageShow"); + return (Criteria) this; + } + + public Criteria andHighlightIsNull() { + addCriterion("highlight is null"); + return (Criteria) this; + } + + public Criteria andHighlightIsNotNull() { + addCriterion("highlight is not null"); + return (Criteria) this; + } + + public Criteria andHighlightEqualTo(Byte value) { + addCriterion("highlight =", value, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightNotEqualTo(Byte value) { + addCriterion("highlight <>", value, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightGreaterThan(Byte value) { + addCriterion("highlight >", value, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightGreaterThanOrEqualTo(Byte value) { + addCriterion("highlight >=", value, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightLessThan(Byte value) { + addCriterion("highlight <", value, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightLessThanOrEqualTo(Byte value) { + addCriterion("highlight <=", value, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightIn(List values) { + addCriterion("highlight in", values, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightNotIn(List values) { + addCriterion("highlight not in", values, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightBetween(Byte value1, Byte value2) { + addCriterion("highlight between", value1, value2, "highlight"); + return (Criteria) this; + } + + public Criteria andHighlightNotBetween(Byte value1, Byte value2) { + addCriterion("highlight not between", value1, value2, "highlight"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java index 014b4d5a..4abbc5ba 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/ProjectVo.java @@ -45,6 +45,15 @@ public class ProjectVo { @ApiModelProperty("WPS文件信息") private List wpsFilePaths; + @ApiModelProperty("子项目信息") + private List subProjectList; + @ApiModelProperty("是否在首页展示 0否 1是") + private byte homePageShow; + @ApiModelProperty("是否高亮展示 0否 1是") + private byte highlight; + @ApiModelProperty("父项目id") + private Long parentId; + public Long getTotalDuration(){ if(ObjectUtil.isNotNull(endTime) && ObjectUtil.isNotNull(beginTime)){ return endTime - beginTime; diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java index cea8915e..cc2161d0 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java @@ -86,6 +86,8 @@ public class TaskVo { private String name; @ApiModelProperty("详细描述") private String description; + @ApiModelProperty("父任务名称") + private String parentName; @ApiModelProperty("所属项目id") private Long projectId; @ApiModelProperty("所属项目名称") diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleDao.java index 10535203..6b4a4c3e 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleDao.java @@ -50,7 +50,7 @@ public interface ProRoleDao extends ProRoleMapper{ */ String getMemberNameByProjectId(@Param("projectId")Long projectId,@Param("parentRoleName")String parentRoleName); -// ProjectVo.RoleInfo getRoleInfoByRoleId(Long roleId); + ProjectVo.RoleInfo getRoleInfoByRoleId(@Param("roleId")Long roleId); // /** // * 查找项目下的所有成员的名字用“,”分隔 diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java index 064794c6..4d783454 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysLabelDao.java @@ -9,7 +9,15 @@ import java.util.List; @Repository public interface SysLabelDao extends SysLabelMapper { - List selectLabelByUserId(@Param("userId")Long userId,@Param("key")String key); + List selectLabelByUserId(@Param("userId")Long userId,@Param("key")String key,@Param("type")Byte type); List selectLabelByProjectId(@Param("userId")Long userId,@Param("projectId")Long projectId); + + /** + * 查询任务下的标签信息 + * @param userId + * @param taskId + * @return + */ + List selectLabelByTaskId(@Param("userId")Long userId, @Param("taskId")Long taskId); } diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskLabelMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskLabelMapper.java new file mode 100644 index 00000000..ada5af7a --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProTaskLabelMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProTaskLabel; +import com.ccsens.tall.bean.po.ProTaskLabelExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProTaskLabelMapper { + long countByExample(ProTaskLabelExample example); + + int deleteByExample(ProTaskLabelExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProTaskLabel record); + + int insertSelective(ProTaskLabel record); + + List selectByExample(ProTaskLabelExample example); + + ProTaskLabel selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProTaskLabel record, @Param("example") ProTaskLabelExample example); + + int updateByExample(@Param("record") ProTaskLabel record, @Param("example") ProTaskLabelExample example); + + int updateByPrimaryKeySelective(ProTaskLabel record); + + int updateByPrimaryKey(ProTaskLabel record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/service/ILabelService.java b/tall/src/main/java/com/ccsens/tall/service/ILabelService.java index f921fee1..5796a001 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ILabelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ILabelService.java @@ -8,7 +8,7 @@ import java.util.List; public interface ILabelService { List addLabel(Long userId,LabelDto.AddLabel labelList); - List selectLabel(Long currentUserId,String key); + List selectLabel(Long currentUserId,String key,Byte type); void delLabel(Long currentUserId, LabelDto.DelLabel delLabel); @@ -17,4 +17,20 @@ public interface ILabelService { List projectAddLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel); List projectRemoveLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel); + + /** + * 给任务添加标签 + * @param currentUserId userId + * @param taskLabel 标签信息 + * @return 返回标签信息 + */ + List taskAddLabel(Long currentUserId, LabelDto.TaskLabel taskLabel); + + /** + * 删除任务的标签 + * @param currentUserId + * @param taskLabel + * @return + */ + List taskRemoveLabel(Long currentUserId, LabelDto.TaskLabel taskLabel); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java b/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java index f219bacf..eadf5e09 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java @@ -40,7 +40,7 @@ public interface IProRoleService { * @param projectId 项目id * @return 返回一级任务和里程碑 */ - List queryByProjectVirtualRole(RoleDto.ProjectId projectId); + List queryByProjectVirtualRole(RoleDto.ProjectId projectId); // /** // * 查找项目下的角色包含“全体成员” diff --git a/tall/src/main/java/com/ccsens/tall/service/LabelService.java b/tall/src/main/java/com/ccsens/tall/service/LabelService.java index 8b325520..fcc10701 100644 --- a/tall/src/main/java/com/ccsens/tall/service/LabelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/LabelService.java @@ -8,76 +8,86 @@ 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.tall.persist.dao.*; +import com.ccsens.tall.persist.mapper.ProTaskLabelMapper; +import com.ccsens.tall.persist.mapper.ProTaskSubTimeMapper; 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.retry.annotation.Recover; import org.springframework.stereotype.Service; +import javax.annotation.Resource; import java.util.ArrayList; import java.util.List; @Service -public class LabelService implements ILabelService{ - @Autowired +public class LabelService implements ILabelService { + @Resource private Snowflake snowflake; - @Autowired + @Resource private SysLabelDao sysLabelDao; - @Autowired + @Resource private SysProjectDao sysProjectDao; - @Autowired + @Resource private SysProjectLabelDao sysProjectLabelDao; - @Autowired - private ProRoleService proRoleService; + @Resource + private ProTaskLabelMapper proTaskLabelMapper; + @Resource + private ProTaskSubTimeMapper taskSubTimeMapper; + @Resource + private TaskDetailDao taskDetailDao; /** * 添加标签 + * * @param label 添加的标签信息 */ @Override - public List addLabel(Long userId,LabelDto.AddLabel label) { - if(ObjectUtil.isNotNull(label)){ + public List addLabel(Long userId, LabelDto.AddLabel label) { + if (ObjectUtil.isNotNull(label)) { SysLabelExample sysLabelExample = new SysLabelExample(); - sysLabelExample.createCriteria().andNameEqualTo(label.getName()).andUserIdEqualTo(userId); + sysLabelExample.createCriteria().andNameEqualTo(label.getName()).andUserIdEqualTo(userId).andBusinessTypeEqualTo(label.getType()); List sysLabels = sysLabelDao.selectByExample(sysLabelExample); - if(CollectionUtil.isNotEmpty(sysLabels)){ + 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); + sysLabel.setBusinessType(label.getType()); + BeanUtil.copyProperties(label, sysLabel); sysLabelDao.insertSelective(sysLabel); } - return sysLabelDao.selectLabelByUserId(userId,null); + return sysLabelDao.selectLabelByUserId(userId, null, label.getType()); } /** * 查找此用户的所有标签 + * * @param currentUserId userId - * @param key 标签名包含的关键字 + * @param key 标签名包含的关键字 * @return 返回该用户添加的所有标签 */ @Override - public List selectLabel(Long currentUserId,String key) { - return sysLabelDao.selectLabelByUserId(currentUserId,key); + public List selectLabel(Long currentUserId, String key, Byte type) { + return sysLabelDao.selectLabelByUserId(currentUserId, key, type); } /** * 删除标签 + * * @param currentUserId userID - * @param delLabel 被删除的标签id + * @param delLabel 被删除的标签id */ @Override public void delLabel(Long currentUserId, LabelDto.DelLabel delLabel) { SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(delLabel.getId()); - if(ObjectUtil.isNull(sysLabel)){ + if (ObjectUtil.isNull(sysLabel)) { throw new BaseException(CodeEnum.NOT_LABEL); } - if(sysLabel.getUserId().longValue() != currentUserId){ + if (sysLabel.getUserId().longValue() != currentUserId) { throw new BaseException(CodeEnum.NOT_POWER); } sysLabel.setRecStatus((byte) 2); @@ -86,41 +96,46 @@ public class LabelService implements ILabelService{ /** * 修改标签 + * * @param currentUserId userid - * @param changeLabel 修改后的标签信息 + * @param changeLabel 修改后的标签信息 */ @Override public void changeLabel(Long currentUserId, LabelDto.ChangeLabel changeLabel) { SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(changeLabel.getId()); - if(ObjectUtil.isNull(sysLabel)){ + if (ObjectUtil.isNull(sysLabel)) { throw new BaseException(CodeEnum.NOT_LABEL); } - if(sysLabel.getUserId().longValue() != currentUserId){ + if (sysLabel.getUserId().longValue() != currentUserId) { throw new BaseException(CodeEnum.NOT_POWER); } - if(StrUtil.isNotEmpty(changeLabel.getName())){ + if (StrUtil.isNotEmpty(changeLabel.getName())) { sysLabel.setName(changeLabel.getName()); } - if(StrUtil.isNotEmpty(changeLabel.getCode())){ + if (StrUtil.isNotEmpty(changeLabel.getCode())) { sysLabel.setCode(changeLabel.getCode()); } - if(StrUtil.isNotEmpty(changeLabel.getColor())){ + if (StrUtil.isNotEmpty(changeLabel.getColor())) { sysLabel.setColor(changeLabel.getColor()); } - if(StrUtil.isNotEmpty(changeLabel.getDescription())){ + if (StrUtil.isNotEmpty(changeLabel.getDescription())) { sysLabel.setDescription(changeLabel.getDescription()); } - if(ObjectUtil.isNotNull(changeLabel.getLevel())){ + if (ObjectUtil.isNotNull(changeLabel.getLevel())) { sysLabel.setLevel((byte) changeLabel.getLevel()); } + if (ObjectUtil.isNotNull(changeLabel.getType())) { + sysLabel.setBusinessType(changeLabel.getType()); + } sysLabelDao.updateByPrimaryKeySelective(sysLabel); } /** * 给项目添加标签 + * * @param currentUserId userid - * @param projectLabel 项目id和标签id + * @param projectLabel 项目id和标签id */ @Override public List projectAddLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel) { @@ -130,25 +145,25 @@ public class LabelService implements ILabelService{ //用户在项目中的最高权限 // 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); - }); - } - //查询项目内的标签信息 - selectLabelList = sysLabelDao.selectLabelByProjectId(currentUserId,project.getId()); + 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); + }); + } + //查询项目内的标签信息 + selectLabelList = sysLabelDao.selectLabelByProjectId(currentUserId, project.getId()); // } else { // throw new BaseException(CodeEnum.NOT_POWER); // } @@ -160,8 +175,9 @@ public class LabelService implements ILabelService{ /** * 删除项目关联的标签 + * * @param currentUserId userID - * @param projectLabel 项目id和被删除的标签的id + * @param projectLabel 项目id和被删除的标签的id */ @Override public List projectRemoveLabel(Long currentUserId, LabelDto.ProjectLabel projectLabel) { @@ -171,35 +187,110 @@ public class LabelService implements ILabelService{ //用户在项目中的最高权限 // int power = proRoleService.selectPowerByRoleName(currentUserId, projectLabel.getProjectId()); // if (power > 1) { - if(CollectionUtil.isNotEmpty(projectLabel.getLabelList())){ - projectLabel.getLabelList().forEach(labelId -> { - SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); - if(ObjectUtil.isNull(sysLabel)){ - throw new BaseException(CodeEnum.NOT_LABEL); - } - if(sysLabel.getUserId().longValue() != currentUserId){ - throw new BaseException(CodeEnum.NOT_POWER); - } - //添加项目和标签的关联信息 - SysProjectLabelExample sysProjectLabelExample = new SysProjectLabelExample(); - sysProjectLabelExample.createCriteria().andProjectIdEqualTo(projectLabel.getProjectId()).andLabelIdEqualTo(labelId); - List sysProjectLabelList = sysProjectLabelDao.selectByExample(sysProjectLabelExample); - if(CollectionUtil.isNotEmpty(sysProjectLabelList)){ - sysProjectLabelList.forEach(label -> { - label.setRecStatus((byte) 2); - sysProjectLabelDao.updateByPrimaryKeySelective(label); - }); - } - }); - } - //查询项目内的标签信息 - selectLabelList = sysLabelDao.selectLabelByProjectId(currentUserId,project.getId()); - } else { - throw new BaseException(CodeEnum.NOT_POWER); + if (CollectionUtil.isNotEmpty(projectLabel.getLabelList())) { + projectLabel.getLabelList().forEach(labelId -> { + SysLabel sysLabel = sysLabelDao.selectByPrimaryKey(labelId); + if (ObjectUtil.isNull(sysLabel)) { + throw new BaseException(CodeEnum.NOT_LABEL); + } + if (sysLabel.getUserId().longValue() != currentUserId) { + throw new BaseException(CodeEnum.NOT_POWER); + } + //项目和标签的关联信息 + SysProjectLabelExample sysProjectLabelExample = new SysProjectLabelExample(); + sysProjectLabelExample.createCriteria().andProjectIdEqualTo(projectLabel.getProjectId()).andLabelIdEqualTo(labelId); + List sysProjectLabelList = sysProjectLabelDao.selectByExample(sysProjectLabelExample); + if (CollectionUtil.isNotEmpty(sysProjectLabelList)) { + sysProjectLabelList.forEach(label -> { + label.setRecStatus((byte) 2); + sysProjectLabelDao.updateByPrimaryKeySelective(label); + }); + } + }); } + //查询项目内的标签信息 + selectLabelList = sysLabelDao.selectLabelByProjectId(currentUserId, project.getId()); // } else { -// throw new BaseException(CodeEnum.NOT_PROJECT); +// throw new BaseException(CodeEnum.NOT_POWER); // } + } else { + throw new BaseException(CodeEnum.NOT_PROJECT); + } + return selectLabelList; + } + + + @Override + public List taskAddLabel(Long currentUserId, LabelDto.TaskLabel taskLabel) { + Long taskId = taskLabel.getTaskId(); + ProTaskSubTime proTaskSubTime = taskSubTimeMapper.selectByPrimaryKey(taskLabel.getTaskId()); + if (ObjectUtil.isNotNull(proTaskSubTime)) { + taskId = proTaskSubTime.getTaskDetailId(); + } + List selectLabelList; + ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(taskId); + if (ObjectUtil.isNull(taskDetail)) { + throw new BaseException(CodeEnum.NOT_TASK); + } + if (CollectionUtil.isNotEmpty(taskLabel.getLabelList())) { + Long finalTaskId = taskId; + taskLabel.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); + } + //添加项目和标签的关联信息 + ProTaskLabel proTaskLabel = new ProTaskLabel(); + proTaskLabel.setId(snowflake.nextId()); + proTaskLabel.setTaskDetailId(finalTaskId); + proTaskLabel.setLabelId(labelId); + proTaskLabelMapper.insertSelective(proTaskLabel); + }); + } + //查询项目内的标签信息 + selectLabelList = sysLabelDao.selectLabelByTaskId(currentUserId, taskId); + return selectLabelList; + } + + @Override + public List taskRemoveLabel(Long currentUserId, LabelDto.TaskLabel taskLabel) { + Long taskId = taskLabel.getTaskId(); + ProTaskSubTime proTaskSubTime = taskSubTimeMapper.selectByPrimaryKey(taskLabel.getTaskId()); + if (ObjectUtil.isNotNull(proTaskSubTime)) { + taskId = proTaskSubTime.getTaskDetailId(); + } + List selectLabelList; + ProTaskDetail taskDetail = taskDetailDao.selectByPrimaryKey(taskId); + if (ObjectUtil.isNull(taskDetail)) { + throw new BaseException(CodeEnum.NOT_TASK); + } + if (CollectionUtil.isNotEmpty(taskLabel.getLabelList())) { + Long finalTaskId = taskId; + taskLabel.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); + } + //项目和标签的关联信息 + ProTaskLabelExample taskLabelExample = new ProTaskLabelExample(); + taskLabelExample.createCriteria().andTaskDetailIdEqualTo(finalTaskId).andLabelIdEqualTo(labelId); + List proTaskLabelList = proTaskLabelMapper.selectByExample(taskLabelExample); + if (CollectionUtil.isNotEmpty(proTaskLabelList)) { + proTaskLabelList.forEach(label -> { + label.setRecStatus((byte) 2); + proTaskLabelMapper.updateByPrimaryKeySelective(label); + }); + } + }); + } + //查询项目内的标签信息 + selectLabelList = sysLabelDao.selectLabelByTaskId(currentUserId, taskId); return selectLabelList; } } diff --git a/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java b/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java index 956dc7a5..8f7ad1f2 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java @@ -1,5 +1,6 @@ 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; @@ -387,6 +388,10 @@ public class ProRoleService implements IProRoleService { } //修改关联项目id if(ObjectUtil.isNotNull(updateRole.getRelevanceProjectId())){ + SysProject project = sysProjectDao.selectByPrimaryKey(updateRole.getRelevanceProjectId()); + if(ObjectUtil.isNull(project)){ + throw new BaseException(CodeEnum.NOT_PROJECT); + } //检查角色是否是角色项目 ProRole parentRole = proRoleDao.selectByPrimaryKey(proRole.getParentId()); if(parentRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.ProjectVirtualRole.value)){ @@ -394,8 +399,7 @@ public class ProRoleService implements IProRoleService { } } proRoleDao.updateByPrimaryKeySelective(proRole); - - return null; + return getRoleInfoByRoleId(proRole.getId()); } @Override @@ -448,8 +452,8 @@ public class ProRoleService implements IProRoleService { } @Override - public List queryByProjectVirtualRole(RoleDto.ProjectId projectId) { - List taskList = new ArrayList<>(); + public List queryByProjectVirtualRole(RoleDto.ProjectId projectId) { + List taskList = new ArrayList<>(); //查找项目 SysProject project = sysProjectDao.selectByPrimaryKey(projectId.getProjectId()); if (ObjectUtil.isNull(project)) { @@ -462,21 +466,32 @@ public class ProRoleService implements IProRoleService { log.info("查找到一级任务:{}",firstTaskDetailList); if (CollectionUtil.isNotEmpty(firstTaskDetailList)) { firstTaskDetailList.forEach(firstTaskDetail -> { - TaskVo.TaskListByProjectId firstTask = taskDetailDao.getTaskById(firstTaskDetail.getId()); + int sequence = 1; + TaskVo.NormalTask normalTask = new TaskVo.NormalTask(); + BeanUtil.copyProperties(firstTaskDetail, normalTask); + normalTask.setDetailId(firstTaskDetail.getId()); + normalTask.setSequence(sequence); + List secondTaskList = taskDetailDao.getTaskByParentId(firstTaskDetail.getId(),1); + List secondList = new ArrayList<>(); if(CollectionUtil.isNotEmpty(secondTaskList)){ - secondTaskList.forEach(secondTask -> secondTask.setParentName(firstTaskDetail.getName())); + secondTaskList.forEach(secondTask -> { + TaskVo.NormalTask second = new TaskVo.NormalTask(); + BeanUtil.copyProperties(secondTask, second); + second.setParentName(firstTaskDetail.getName()); + secondList.add(second); + }); } - firstTask.setSecondTasks(secondTaskList); - taskList.add(firstTask); + normalTask.setSecondTasks(secondList); + taskList.add(normalTask); }); } return taskList; } -// -// private ProjectVo.RoleInfo getRoleInfoByRoleId(Long roleId){ -// return proRoleDao.getRoleInfoByRoleId(roleId); -// } + + private ProjectVo.RoleInfo getRoleInfoByRoleId(Long roleId){ + return proRoleDao.getRoleInfoByRoleId(roleId); + } // @Override // public RoleVo.RoleByProjectId queryRoleByProjectId(Long projectId) { diff --git a/tall/src/main/java/com/ccsens/tall/service/ProjectService.java b/tall/src/main/java/com/ccsens/tall/service/ProjectService.java index 26505a75..5effaeb4 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProjectService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProjectService.java @@ -174,6 +174,7 @@ public class ProjectService implements IProjectService { //查找此用户关注的项目 List projectInfoList = sysProjectDao.findProjectIdByUserId01(currentUserId, startMillisTime, endMillisTime,orderType,order); projectByProject(projectInfoList,currentUserId,token); + return projectInfoList; } private void projectByProject(List projectInfoList, Long currentUserId,String token){ @@ -219,6 +220,12 @@ public class ProjectService implements IProjectService { projectInfo.setProjectUnreadMsg(unreadMsg); //获取wps文件路径 projectInfo.setWpsFilePaths(wpsService.queryVisitUrls(projectInfo.getId(), (byte) 0,token, null)); + //子项目 + projectInfo.setSubProjectList(queryProjectInfoByParentId(currentUserId,projectInfo.getId(),token)); + //是否首页展示 + if(projectInfo.getParentId() == 0 || projectInfo.getParentId() == null){ + projectInfo.setHomePageShow((byte) 1); + } }); } } @@ -300,13 +307,41 @@ public class ProjectService implements IProjectService { /** * 通过项目id查询项目 - * * @param userId 用户id * @param projectId 项目id * @return 返回项目信息 */ @Override public ProjectVo.ProjectInfo getProjectInfoById(Long userId, Long projectId,String token) { + ProjectVo.ProjectInfo projectInfo = getProjectInfoByProjectId(userId,projectId,token); + projectInfo.setHomePageShow((byte) 1); + //TODO 查看项目下的子任务 + projectInfo.setSubProjectList(queryProjectInfoByParentId(userId,projectInfo.getId(),token)); + return projectInfo; + } + + /** + * 查看项目下的子项目信息 + */ + private List queryProjectInfoByParentId(Long userId,Long parentId,String token){ + List projectInfoList = new ArrayList<>(); + //查询改项目下的子项目 + SysProjectExample sysProjectExample = new SysProjectExample(); + sysProjectExample.createCriteria().andParentIdEqualTo(parentId); + List sysProjectList = sysProjectDao.selectByExample(sysProjectExample); + if(CollectionUtil.isNotEmpty(sysProjectList)){ + sysProjectList.forEach(project ->{ + ProjectVo.ProjectInfo projectInfo = getProjectInfoByProjectId(userId,project.getId(),token); + projectInfoList.add(projectInfo); + }); + } + return projectInfoList; + } + + /** + * 通过项目id查询项目信息 + */ + private ProjectVo.ProjectInfo getProjectInfoByProjectId(Long userId, Long projectId,String token){ SysProject sysProject = sysProjectDao.selectByPrimaryKey(projectId); if(ObjectUtil.isNull(sysProject)){ throw new BaseException(CodeEnum.NOT_PROJECT); @@ -361,6 +396,7 @@ public class ProjectService implements IProjectService { return projectInfo; } + /** * 根据类型查项目 项目类型 0普通项目 1模板项目 2常驻项目 * @return 返回项目信息 diff --git a/tall/src/main/java/com/ccsens/tall/web/LabelController.java b/tall/src/main/java/com/ccsens/tall/web/LabelController.java index 5b6b95f1..3f161ba3 100644 --- a/tall/src/main/java/com/ccsens/tall/web/LabelController.java +++ b/tall/src/main/java/com/ccsens/tall/web/LabelController.java @@ -1,10 +1,7 @@ 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.bean.vo.ProjectVo; import com.ccsens.tall.service.ILabelService; import com.ccsens.util.JsonResponse; import com.ccsens.util.WebConstant; @@ -29,12 +26,14 @@ public class LabelController { @ApiOperation(value = "搜索标签",notes = "") @ApiImplicitParams({ + @ApiImplicitParam(name = "type", value = "标签类型 0项目标签 1任务标签", required = true, paramType = "query"), }) @RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) public JsonResponse> selectLabel(HttpServletRequest request, - @RequestParam(required = false)String key) throws Exception { + @RequestParam(required = false)String key,Byte type) throws Exception { + type = type == null ? 0 : type; Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - List selectLabelList = labelService.selectLabel(currentUserId,key); + List selectLabelList = labelService.selectLabel(currentUserId,key,type); return JsonResponse.newInstance().ok(selectLabelList); } @@ -93,4 +92,27 @@ public class LabelController { return JsonResponse.newInstance().ok(selectLabelList); } + + @ApiOperation(value = "给任务添加标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/task", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> taskAddLabel(HttpServletRequest request, + @Validated @RequestBody LabelDto.TaskLabel taskLabel) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List selectLabelList = labelService.taskAddLabel(currentUserId,taskLabel); + return JsonResponse.newInstance().ok(selectLabelList); + } + + @ApiOperation(value = "删除项目关联的标签",notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/task/del", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> taskRemoveLabel(HttpServletRequest request, + @Validated @RequestBody LabelDto.TaskLabel taskLabel) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); + List selectLabelList = labelService.taskRemoveLabel(currentUserId,taskLabel); + return JsonResponse.newInstance().ok(selectLabelList); + } + } diff --git a/tall/src/main/java/com/ccsens/tall/web/RoleController.java b/tall/src/main/java/com/ccsens/tall/web/RoleController.java index 4f5ca1ca..2544227f 100644 --- a/tall/src/main/java/com/ccsens/tall/web/RoleController.java +++ b/tall/src/main/java/com/ccsens/tall/web/RoleController.java @@ -2,7 +2,6 @@ package com.ccsens.tall.web; import com.ccsens.tall.bean.dto.RoleDto; import com.ccsens.tall.bean.vo.ProjectVo; -import com.ccsens.tall.bean.vo.RoleVo; import com.ccsens.tall.bean.vo.TaskVo; import com.ccsens.tall.service.IProRoleService; import com.ccsens.util.JsonResponse; @@ -57,7 +56,7 @@ public class RoleController { @ApiParam @Validated @RequestBody RoleDto.UpdateRole updateRole) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); ProjectVo.RoleInfo roleInfo = proRoleService.updateRole(currentUserId,updateRole); - return JsonResponse.newInstance().ok(); + return JsonResponse.newInstance().ok(roleInfo); } @ApiOperation(value = "给角色添加成员",notes = "") @@ -97,10 +96,10 @@ public class RoleController { @ApiImplicitParams({ }) @RequestMapping(value = "/ProjectVirtualRole", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse> queryByProjectVirtualRole(HttpServletRequest request, - @ApiParam @Validated @RequestBody RoleDto.ProjectId projectId) throws Exception { + public JsonResponse> queryByProjectVirtualRole(HttpServletRequest request, + @ApiParam @Validated @RequestBody RoleDto.ProjectId projectId) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - List taskListByProjectIdList = proRoleService.queryByProjectVirtualRole(projectId); + List taskListByProjectIdList = proRoleService.queryByProjectVirtualRole(projectId); return JsonResponse.newInstance().ok(taskListByProjectIdList); } diff --git a/tall/src/main/resources/application.yml b/tall/src/main/resources/application.yml index 4fc2efe4..c88e995d 100644 --- a/tall/src/main/resources/application.yml +++ b/tall/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: prod - include: util-prod,common + active: test + include: util-test,common diff --git a/tall/src/main/resources/mapper_dao/ProRoleDao.xml b/tall/src/main/resources/mapper_dao/ProRoleDao.xml index b6ce36c1..74370b2c 100644 --- a/tall/src/main/resources/mapper_dao/ProRoleDao.xml +++ b/tall/src/main/resources/mapper_dao/ProRoleDao.xml @@ -14,6 +14,8 @@ + + @@ -209,6 +211,28 @@ AND r1.`name` = #{parentRoleName} - + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysLabelDao.xml b/tall/src/main/resources/mapper_dao/SysLabelDao.xml index 27f92b6f..b3847b97 100644 --- a/tall/src/main/resources/mapper_dao/SysLabelDao.xml +++ b/tall/src/main/resources/mapper_dao/SysLabelDao.xml @@ -3,11 +3,21 @@ + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysProjectDao.xml b/tall/src/main/resources/mapper_dao/SysProjectDao.xml index b271a3aa..f8dde6c8 100644 --- a/tall/src/main/resources/mapper_dao/SysProjectDao.xml +++ b/tall/src/main/resources/mapper_dao/SysProjectDao.xml @@ -18,6 +18,9 @@ + + + @@ -131,6 +134,9 @@ p.address AS pAddress, p.begin_time AS pBeginTime, p.end_time AS pEndTime, + p.home_page_show as homePageShow, + p.highlight as highlight, + p.parent_id as parentId, if(p.creator_id = #{userId},true,false) as pCreator, l.id as lId, l.name as lName, @@ -190,6 +196,9 @@ p.address AS pAddress, p.begin_time AS pBeginTime, p.end_time AS pEndTime, + p.home_page_show as homePageShow, + p.highlight as highlight, + p.parent_id as parentId, if(p.creator_id = #{userId},true,false) as pCreator, l.id as lId, l.name as lName, diff --git a/tall/src/main/resources/mapper_dao/TaskDetailDao.xml b/tall/src/main/resources/mapper_dao/TaskDetailDao.xml index bae3cbf4..8c62ff37 100644 --- a/tall/src/main/resources/mapper_dao/TaskDetailDao.xml +++ b/tall/src/main/resources/mapper_dao/TaskDetailDao.xml @@ -551,6 +551,7 @@ t.cycle as cycle, t.money as money, t.project_id as projectId, + t.milestone as milestone, (SELECT `name` FROM t_sys_project WHERE id = t.project_id) as projectName, t.executor_role as executorRole, (SELECT `name` FROM t_pro_role WHERE id = t.executor_role) as executorRoleName, diff --git a/tall/src/main/resources/mapper_raw/ProTaskLabelMapper.xml b/tall/src/main/resources/mapper_raw/ProTaskLabelMapper.xml new file mode 100644 index 00000000..7dd42bf7 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/ProTaskLabelMapper.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, task_detail_id, label_id, created_at, updated_at, rec_status + + + + + delete from t_pro_task_label + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_task_label + + + + + + insert into t_pro_task_label (id, task_detail_id, label_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{taskDetailId,jdbcType=BIGINT}, #{labelId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_pro_task_label + + + id, + + + task_detail_id, + + + label_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{taskDetailId,jdbcType=BIGINT}, + + + #{labelId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_pro_task_label + + + id = #{record.id,jdbcType=BIGINT}, + + + task_detail_id = #{record.taskDetailId,jdbcType=BIGINT}, + + + label_id = #{record.labelId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_pro_task_label + set id = #{record.id,jdbcType=BIGINT}, + task_detail_id = #{record.taskDetailId,jdbcType=BIGINT}, + label_id = #{record.labelId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_pro_task_label + + + task_detail_id = #{taskDetailId,jdbcType=BIGINT}, + + + label_id = #{labelId,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_pro_task_label + set task_detail_id = #{taskDetailId,jdbcType=BIGINT}, + label_id = #{labelId,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysLabelMapper.xml b/tall/src/main/resources/mapper_raw/SysLabelMapper.xml index 9885577b..b8732f19 100644 --- a/tall/src/main/resources/mapper_raw/SysLabelMapper.xml +++ b/tall/src/main/resources/mapper_raw/SysLabelMapper.xml @@ -12,6 +12,7 @@ + @@ -72,7 +73,8 @@ - id, name, code, color, description, level, user_id, created_at, updated_at, rec_status + id, name, code, color, description, level, user_id, created_at, updated_at, rec_status, + business_type @@ -220,6 +228,9 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + business_type = #{record.businessType,jdbcType=TINYINT}, + @@ -236,7 +247,8 @@ user_id = #{record.userId,jdbcType=BIGINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + business_type = #{record.businessType,jdbcType=TINYINT} @@ -271,6 +283,9 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + business_type = #{businessType,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -284,7 +299,8 @@ user_id = #{userId,jdbcType=BIGINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + business_type = #{businessType,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysProjectMapper.xml b/tall/src/main/resources/mapper_raw/SysProjectMapper.xml index e543673b..b8c39700 100644 --- a/tall/src/main/resources/mapper_raw/SysProjectMapper.xml +++ b/tall/src/main/resources/mapper_raw/SysProjectMapper.xml @@ -16,6 +16,9 @@ + + + @@ -77,7 +80,8 @@ id, creator_id, parent_task_id, scene_id, name, description, begin_time, end_time, - address, published, template, created_at, updated_at, rec_status + address, published, template, created_at, updated_at, rec_status, parent_id, home_page_show, + highlight @@ -263,6 +287,15 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + parent_id = #{record.parentId,jdbcType=BIGINT}, + + + home_page_show = #{record.homePageShow,jdbcType=TINYINT}, + + + highlight = #{record.highlight,jdbcType=TINYINT}, + @@ -283,7 +316,10 @@ template = #{record.template,jdbcType=TINYINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + parent_id = #{record.parentId,jdbcType=BIGINT}, + home_page_show = #{record.homePageShow,jdbcType=TINYINT}, + highlight = #{record.highlight,jdbcType=TINYINT} @@ -330,6 +366,15 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + parent_id = #{parentId,jdbcType=BIGINT}, + + + home_page_show = #{homePageShow,jdbcType=TINYINT}, + + + highlight = #{highlight,jdbcType=TINYINT}, + where id = #{id,jdbcType=BIGINT} @@ -347,7 +392,10 @@ template = #{template,jdbcType=TINYINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + parent_id = #{parentId,jdbcType=BIGINT}, + home_page_show = #{homePageShow,jdbcType=TINYINT}, + highlight = #{highlight,jdbcType=TINYINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file