diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/PluginDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/PluginDto.java index 670aec7a..a1b83302 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/PluginDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/PluginDto.java @@ -201,5 +201,11 @@ public class PluginDto { private Long taskId; } + @Data + @ApiModel("查询插件所有类型") + public static class FindPluginAllType { + @ApiModelProperty("插件父级id") + private Long parentId; + } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java index 7fe7fd1b..e13a5eaa 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetail.java @@ -60,6 +60,8 @@ public class ProTaskDetail implements Serializable { private String milestone; + private Long buildUser; + private static final long serialVersionUID = 1L; public Long getId() { @@ -286,6 +288,14 @@ public class ProTaskDetail implements Serializable { this.milestone = milestone == null ? null : milestone.trim(); } + public Long getBuildUser() { + return buildUser; + } + + public void setBuildUser(Long buildUser) { + this.buildUser = buildUser; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -320,6 +330,7 @@ public class ProTaskDetail implements Serializable { sb.append(", recStatus=").append(recStatus); sb.append(", priority=").append(priority); sb.append(", milestone=").append(milestone); + sb.append(", buildUser=").append(buildUser); sb.append("]"); return sb.toString(); } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java index 82303f41..e7b86b5a 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProTaskDetailExample.java @@ -1844,6 +1844,66 @@ public class ProTaskDetailExample { addCriterion("milestone not between", value1, value2, "milestone"); return (Criteria) this; } + + public Criteria andBuildUserIsNull() { + addCriterion("build_user is null"); + return (Criteria) this; + } + + public Criteria andBuildUserIsNotNull() { + addCriterion("build_user is not null"); + return (Criteria) this; + } + + public Criteria andBuildUserEqualTo(Long value) { + addCriterion("build_user =", value, "buildUser"); + return (Criteria) this; + } + + public Criteria andBuildUserNotEqualTo(Long value) { + addCriterion("build_user <>", value, "buildUser"); + return (Criteria) this; + } + + public Criteria andBuildUserGreaterThan(Long value) { + addCriterion("build_user >", value, "buildUser"); + return (Criteria) this; + } + + public Criteria andBuildUserGreaterThanOrEqualTo(Long value) { + addCriterion("build_user >=", value, "buildUser"); + return (Criteria) this; + } + + public Criteria andBuildUserLessThan(Long value) { + addCriterion("build_user <", value, "buildUser"); + return (Criteria) this; + } + + public Criteria andBuildUserLessThanOrEqualTo(Long value) { + addCriterion("build_user <=", value, "buildUser"); + return (Criteria) this; + } + + public Criteria andBuildUserIn(List values) { + addCriterion("build_user in", values, "buildUser"); + return (Criteria) this; + } + + public Criteria andBuildUserNotIn(List values) { + addCriterion("build_user not in", values, "buildUser"); + return (Criteria) this; + } + + public Criteria andBuildUserBetween(Long value1, Long value2) { + addCriterion("build_user between", value1, value2, "buildUser"); + return (Criteria) this; + } + + public Criteria andBuildUserNotBetween(Long value1, Long value2) { + addCriterion("build_user not between", value1, value2, "buildUser"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysPluginType.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysPluginType.java new file mode 100644 index 00000000..7d2d8e37 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysPluginType.java @@ -0,0 +1,95 @@ +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class SysPluginType implements Serializable { + private Long id; + + private String typeName; + + private Long parentId; + + private Byte pluginCode; + + 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 getTypeName() { + return typeName; + } + + public void setTypeName(String typeName) { + this.typeName = typeName == null ? null : typeName.trim(); + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public Byte getPluginCode() { + return pluginCode; + } + + public void setPluginCode(Byte pluginCode) { + this.pluginCode = pluginCode; + } + + 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(", typeName=").append(typeName); + sb.append(", parentId=").append(parentId); + sb.append(", pluginCode=").append(pluginCode); + 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/SysPluginTypeExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysPluginTypeExample.java new file mode 100644 index 00000000..caf179c0 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysPluginTypeExample.java @@ -0,0 +1,631 @@ +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SysPluginTypeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysPluginTypeExample() { + 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 andTypeNameIsNull() { + addCriterion("type_name is null"); + return (Criteria) this; + } + + public Criteria andTypeNameIsNotNull() { + addCriterion("type_name is not null"); + return (Criteria) this; + } + + public Criteria andTypeNameEqualTo(String value) { + addCriterion("type_name =", value, "typeName"); + return (Criteria) this; + } + + public Criteria andTypeNameNotEqualTo(String value) { + addCriterion("type_name <>", value, "typeName"); + return (Criteria) this; + } + + public Criteria andTypeNameGreaterThan(String value) { + addCriterion("type_name >", value, "typeName"); + return (Criteria) this; + } + + public Criteria andTypeNameGreaterThanOrEqualTo(String value) { + addCriterion("type_name >=", value, "typeName"); + return (Criteria) this; + } + + public Criteria andTypeNameLessThan(String value) { + addCriterion("type_name <", value, "typeName"); + return (Criteria) this; + } + + public Criteria andTypeNameLessThanOrEqualTo(String value) { + addCriterion("type_name <=", value, "typeName"); + return (Criteria) this; + } + + public Criteria andTypeNameLike(String value) { + addCriterion("type_name like", value, "typeName"); + return (Criteria) this; + } + + public Criteria andTypeNameNotLike(String value) { + addCriterion("type_name not like", value, "typeName"); + return (Criteria) this; + } + + public Criteria andTypeNameIn(List values) { + addCriterion("type_name in", values, "typeName"); + return (Criteria) this; + } + + public Criteria andTypeNameNotIn(List values) { + addCriterion("type_name not in", values, "typeName"); + return (Criteria) this; + } + + public Criteria andTypeNameBetween(String value1, String value2) { + addCriterion("type_name between", value1, value2, "typeName"); + return (Criteria) this; + } + + public Criteria andTypeNameNotBetween(String value1, String value2) { + addCriterion("type_name not between", value1, value2, "typeName"); + 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 andPluginCodeIsNull() { + addCriterion("plugin_code is null"); + return (Criteria) this; + } + + public Criteria andPluginCodeIsNotNull() { + addCriterion("plugin_code is not null"); + return (Criteria) this; + } + + public Criteria andPluginCodeEqualTo(Byte value) { + addCriterion("plugin_code =", value, "pluginCode"); + return (Criteria) this; + } + + public Criteria andPluginCodeNotEqualTo(Byte value) { + addCriterion("plugin_code <>", value, "pluginCode"); + return (Criteria) this; + } + + public Criteria andPluginCodeGreaterThan(Byte value) { + addCriterion("plugin_code >", value, "pluginCode"); + return (Criteria) this; + } + + public Criteria andPluginCodeGreaterThanOrEqualTo(Byte value) { + addCriterion("plugin_code >=", value, "pluginCode"); + return (Criteria) this; + } + + public Criteria andPluginCodeLessThan(Byte value) { + addCriterion("plugin_code <", value, "pluginCode"); + return (Criteria) this; + } + + public Criteria andPluginCodeLessThanOrEqualTo(Byte value) { + addCriterion("plugin_code <=", value, "pluginCode"); + return (Criteria) this; + } + + public Criteria andPluginCodeIn(List values) { + addCriterion("plugin_code in", values, "pluginCode"); + return (Criteria) this; + } + + public Criteria andPluginCodeNotIn(List values) { + addCriterion("plugin_code not in", values, "pluginCode"); + return (Criteria) this; + } + + public Criteria andPluginCodeBetween(Byte value1, Byte value2) { + addCriterion("plugin_code between", value1, value2, "pluginCode"); + return (Criteria) this; + } + + public Criteria andPluginCodeNotBetween(Byte value1, Byte value2) { + addCriterion("plugin_code not between", value1, value2, "pluginCode"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Date value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Date value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Date value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Date value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Date value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Date value1, Date value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Date value1, Date value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Date value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Date value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Date value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Date value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Date value1, Date value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNull() { + addCriterion("rec_status is null"); + return (Criteria) this; + } + + public Criteria andRecStatusIsNotNull() { + addCriterion("rec_status is not null"); + return (Criteria) this; + } + + public Criteria andRecStatusEqualTo(Byte value) { + addCriterion("rec_status =", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotEqualTo(Byte value) { + addCriterion("rec_status <>", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThan(Byte value) { + addCriterion("rec_status >", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { + addCriterion("rec_status >=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThan(Byte value) { + addCriterion("rec_status <", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusLessThanOrEqualTo(Byte value) { + addCriterion("rec_status <=", value, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusIn(List values) { + addCriterion("rec_status in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotIn(List values) { + addCriterion("rec_status not in", values, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusBetween(Byte value1, Byte value2) { + addCriterion("rec_status between", value1, value2, "recStatus"); + return (Criteria) this; + } + + public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { + addCriterion("rec_status not between", value1, value2, "recStatus"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java index 1f7597df..2e57d621 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/PluginVo.java @@ -138,6 +138,10 @@ public class PluginVo { private String description; @ApiModelProperty("插件作者") private Long pluginAuthor; + @ApiModelProperty("插件类型") + private Byte pluginClass; + @ApiModelProperty("插件类型名称") + private String typeName; @ApiModelProperty("插件预览图片") private List previewImgs = new ArrayList<>(); @JsonIgnore @@ -165,4 +169,15 @@ public class PluginVo { } + @ApiModel("插件的所有类型") + @Data + public static class PluginAllType{ + @ApiModelProperty("插件类型id") + private Long typeId; + @ApiModelProperty("插件类型名称") + private String typeName; + @ApiModelProperty("插件类型名称") + private Byte typeCode; + } + } 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 e1d61885..acd62ac0 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 @@ -74,8 +74,11 @@ public class TaskVo { private Byte routineLocation; @ApiModelProperty("入参") private String importParam; + @ApiModelProperty("任务创建人(userId)") + private String buildUser; @ApiModelProperty("任务配置") private ProTaskShow proTaskConfig = new ProTaskShow(); + public Long getDuration(){ if(ObjectUtil.isNotNull(beginTime) && ObjectUtil.isNotNull(endTime)) { return endTime - beginTime; @@ -172,6 +175,9 @@ public class TaskVo { private List outputDoc; @ApiModelProperty("提醒的信息") private List remindInfoList; + @ApiModelProperty("任务创建人(userId)") + private String buildUser; + public Long getDuration(){ if(ObjectUtil.isNotNull(beginTime) && ObjectUtil.isNotNull(endTime)) { return endTime - beginTime; diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysPluginTypeDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysPluginTypeDao.java new file mode 100644 index 00000000..91622c42 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysPluginTypeDao.java @@ -0,0 +1,22 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.bean.vo.PluginVo; +import com.ccsens.tall.persist.mapper.SysPluginTypeMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * @author 马 + */ +@Repository +public interface SysPluginTypeDao extends SysPluginTypeMapper { + + /** + * 查询插件的类型 + * @param parentId 插件类型的父级id + * @return 插件的类型 + */ + List findPluginAllType(@Param("parentId") Long parentId); +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/SysPluginTypeMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysPluginTypeMapper.java new file mode 100644 index 00000000..58cbebb1 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/SysPluginTypeMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.SysPluginType; +import com.ccsens.tall.bean.po.SysPluginTypeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysPluginTypeMapper { + long countByExample(SysPluginTypeExample example); + + int deleteByExample(SysPluginTypeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysPluginType record); + + int insertSelective(SysPluginType record); + + List selectByExample(SysPluginTypeExample example); + + SysPluginType selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysPluginType record, @Param("example") SysPluginTypeExample example); + + int updateByExample(@Param("record") SysPluginType record, @Param("example") SysPluginTypeExample example); + + int updateByPrimaryKeySelective(SysPluginType record); + + int updateByPrimaryKey(SysPluginType record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/service/ISysPluginService.java b/tall/src/main/java/com/ccsens/tall/service/ISysPluginService.java index 0f9748c8..88c8c4a2 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ISysPluginService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ISysPluginService.java @@ -49,4 +49,11 @@ public interface ISysPluginService { * @param userId */ void deletePluginForTask(PluginDto.DeletePluginForTask param, Long userId); + + /** + * 查询插件所有类型 + * @param param 类型的父级id + * @return 插件类型列表 + */ + List findPluginAllType(PluginDto.FindPluginAllType param); } diff --git a/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java b/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java index 3e902ef2..543e5300 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java @@ -1380,7 +1380,30 @@ public class ProTaskDetailService implements IProTaskDetailService { } //用户在项目中的最高权限 int power = proRoleService.selectPowerByRoleName(currentUserId, taskDetail.getProjectId()); - if (power > 1) { + boolean flag = false; + ProRole executorRole = proRoleDao.selectByPrimaryKey(taskDetail.getExecutorRole()); + if (executorRole.getName().equalsIgnoreCase(WebConstant.ROLE_NAME.AllMember.phase)) { + flag = true; + } else { + ProMemberExample memberExample = new ProMemberExample(); + memberExample.createCriteria().andUserIdEqualTo(currentUserId).andProjectIdEqualTo(taskDetail.getProjectId()); + List memberList = proMemberDao.selectByExample(memberExample); + if (CollectionUtil.isNotEmpty(memberList)) { + if (ObjectUtil.isNotNull(executorRole)) { + ProMemberRoleExample memberRoleExample = new ProMemberRoleExample(); + memberRoleExample.createCriteria().andRoleIdEqualTo(executorRole.getId()).andMemberIdEqualTo(memberList.get(0).getId()); + if (proMemberRoleDao.countByExample(memberRoleExample) != 0) { + flag = true; + } + } + } + } + //判断用户是否是此任务的的创建人 + if(taskDetail.getBuildUser().equals(currentUserId)){ + flag = true; + } + + if (power > WebConstant.ROLE_POWER.LOOK_POWER.value || flag) { if (ObjectUtil.isNotNull(taskDetail)) { //修改任务删除状态 taskDetail.setRecStatus(WebConstant.REC_STATUS.Deleted.value); @@ -1441,7 +1464,8 @@ public class ProTaskDetailService implements IProTaskDetailService { if (ObjectUtil.isNotNull(taskSubTime)) { taskDetail = taskDetailDao.selectByPrimaryKey(taskSubTime.getTaskDetailId()); } else { - taskDetail = taskDetailDao.selectByPrimaryKey(updateTaskInfo.getId()); //任务详情 + //任务详情 + taskDetail = taskDetailDao.selectByPrimaryKey(updateTaskInfo.getId()); } if (ObjectUtil.isNotNull(taskDetail)) { @@ -1468,8 +1492,12 @@ public class ProTaskDetailService implements IProTaskDetailService { } } } + //判断用户是否是此任务的的创建人 + if(taskDetail.getBuildUser().equals(currentUserId)){ + flag = true; + } - if (power > 1 || flag) { + if (power > WebConstant.ROLE_POWER.LOOK_POWER.value || flag) { //任务名 if (StrUtil.isNotEmpty(updateTaskInfo.getName())) { taskDetail.setName(updateTaskInfo.getName()); @@ -1632,9 +1660,9 @@ public class ProTaskDetailService implements IProTaskDetailService { taskDetailDao.updateByPrimaryKeySelective(proTaskDetail); }); - for (ProTaskDetail proTaskDetail : proTaskDetailList) { - - } +// for (ProTaskDetail proTaskDetail : proTaskDetailList) { +// +// } } } else { //父任务id diff --git a/tall/src/main/java/com/ccsens/tall/service/SysPluginService.java b/tall/src/main/java/com/ccsens/tall/service/SysPluginService.java index 80e76cc5..6a5e4d55 100644 --- a/tall/src/main/java/com/ccsens/tall/service/SysPluginService.java +++ b/tall/src/main/java/com/ccsens/tall/service/SysPluginService.java @@ -34,15 +34,15 @@ import java.util.List; @Service @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) public class SysPluginService implements ISysPluginService{ - @Autowired + @Resource private SysPluginDao sysPluginDao; - @Autowired + @Resource private TaskPluginDao taskPluginDao; - @Autowired + @Resource private TaskDetailDao taskDetailDao; - @Autowired + @Resource private ProPluginSigninDao pluginSigninDao; - @Autowired + @Resource private SigninFieldDao signinFieldDao; @Resource private Snowflake snowflake; @@ -58,10 +58,12 @@ public class SysPluginService implements ISysPluginService{ private ProMemberRoleDao proMemberRoleDao; @Resource private TaskSubTimeDao taskSubTimeDao; + @Resource + private SysPluginTypeDao pluginTypeDao; /** * 添加插件 - * @param param + * @param param 插件的字段 */ @Override public void saveSysPlugin(PluginDto.SaveSysPlugin param,Long userId) { @@ -313,6 +315,8 @@ public class SysPluginService implements ISysPluginService{ } } + + @Override public List getPluginAll() { List pluginInfoList = sysPluginDao.selectPluginAll(); @@ -402,4 +406,9 @@ public class SysPluginService implements ISysPluginService{ } + @Override + public List findPluginAllType(PluginDto.FindPluginAllType param) { + return pluginTypeDao.findPluginAllType(param.getParentId()); + } + } diff --git a/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java b/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java index b063d9cd..5bc740df 100644 --- a/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java +++ b/tall/src/main/java/com/ccsens/tall/service/TaskSubTimeService.java @@ -363,6 +363,7 @@ public class TaskSubTimeService implements ITaskSubTimeService { detail.setParentId(addTask.getParentTaskId()); detail.setExecutorRole(addTask.getExecutorId()); detail.setMilestone(addTask.getMilestone()); + detail.setBuildUser(currentUserId); //添加任务优先级 if(ObjectUtil.isNotNull(addTask.getPriority())){ detail.setPriority(addTask.getPriority()); diff --git a/tall/src/main/java/com/ccsens/tall/web/PluginController.java b/tall/src/main/java/com/ccsens/tall/web/PluginController.java index 686554c2..ce96a1bc 100644 --- a/tall/src/main/java/com/ccsens/tall/web/PluginController.java +++ b/tall/src/main/java/com/ccsens/tall/web/PluginController.java @@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import java.util.List; @Slf4j @@ -27,11 +28,13 @@ import java.util.List; @RestController @RequestMapping("/plugins") public class PluginController { - @Autowired + @Resource private ITaskPluginService taskPluginService; - @Autowired + @Resource private ISysPluginService sysPluginService; + + @MustLoginTall @ApiOperation(value = "添加插件(插件总表)", notes = "") @ApiImplicitParams({ @@ -43,6 +46,17 @@ public class PluginController { return JsonResponse.newInstance().ok(); } + @ApiOperation(value = "查询插件的所有分类", notes = "") + @ApiImplicitParams({ + }) + @RequestMapping(value = "/findPluginAllType", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) + public JsonResponse> findPluginAllType(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { + log.info("查询插件的所有分类:{}",params); + List allTypes = sysPluginService.findPluginAllType(params.getParam()); + log.info("查询插件的所有分类:{}",allTypes); + return JsonResponse.newInstance().ok(allTypes); + } + @ApiOperation(value = "根据任务id查询插件列表(该任务已添加的)", notes = "") @ApiImplicitParams({ }) diff --git a/tall/src/main/resources/application.yml b/tall/src/main/resources/application.yml index b5408a3a..ebc544af 100644 --- a/tall/src/main/resources/application.yml +++ b/tall/src/main/resources/application.yml @@ -1,5 +1,5 @@ spring: profiles: - active: dev - include: util-dev,common + active: test + include: util-test,common diff --git a/tall/src/main/resources/mapper_dao/ProMemberRoleDao.xml b/tall/src/main/resources/mapper_dao/ProMemberRoleDao.xml index d717ed22..98438e01 100644 --- a/tall/src/main/resources/mapper_dao/ProMemberRoleDao.xml +++ b/tall/src/main/resources/mapper_dao/ProMemberRoleDao.xml @@ -58,7 +58,7 @@ WHERE r.parent_id = pr.id AND rec_status = 0 - ) NOT IN ('MoneyStakeholder') + ) NOT IN ('MoneyStakeholder','God','ManageRepresent','Stakeholder') AND r.rec_status = 0 \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysPluginTypeDao.xml b/tall/src/main/resources/mapper_dao/SysPluginTypeDao.xml new file mode 100644 index 00000000..50330491 --- /dev/null +++ b/tall/src/main/resources/mapper_dao/SysPluginTypeDao.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/TaskDetailDao.xml b/tall/src/main/resources/mapper_dao/TaskDetailDao.xml index 0558492a..8838dae6 100644 --- a/tall/src/main/resources/mapper_dao/TaskDetailDao.xml +++ b/tall/src/main/resources/mapper_dao/TaskDetailDao.xml @@ -41,6 +41,7 @@ + @@ -99,7 +100,8 @@ sp.show_type as spShowType, d.priority as priority, d.milestone as milestone, - d.parent_id AS tParentId + d.parent_id AS tParentId, + d.build_user AS buildUser FROM t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id @@ -258,7 +260,8 @@ sp.id as spid, sp.show_type as spShowType, d.milestone as milestone, - d.parent_id AS tParentId + d.parent_id AS tParentId, + d.build_user AS buildUser FROM t_pro_task_sub_time s LEFT JOIN t_pro_task_detail d ON s.task_detail_id = d.id LEFT JOIN t_pro_task_plugin p ON p.task_detail_id = d.id diff --git a/tall/src/main/resources/mapper_dao/TaskPluginDao.xml b/tall/src/main/resources/mapper_dao/TaskPluginDao.xml index b75acc90..bd5b2338 100644 --- a/tall/src/main/resources/mapper_dao/TaskPluginDao.xml +++ b/tall/src/main/resources/mapper_dao/TaskPluginDao.xml @@ -10,6 +10,8 @@ tf.visit_location AS iconUrl, sp.description AS description, sp.plugin_author AS pluginAuthor, + sp.plugin_class AS pluginClass, + pt.type_name AS typeName, ptp.task_detail_id, ptp.member_role_id, CONCAT_WS(',',GROUP_CONCAT(DISTINCT sp.plugin_icon),GROUP_CONCAT(DISTINCT pppf.file_id)) AS fileIdList @@ -17,6 +19,7 @@ t_pro_task_plugin AS ptp LEFT JOIN t_sys_plugin AS sp ON ptp.plugin_id = sp.id AND sp.rec_status = 0 LEFT JOIN t_file AS tf ON sp.plugin_icon = tf.id AND tf.rec_status = 0 + LEFT JOIN t_sys_plugin_type AS pt ON pt.plugin_code = sp.plugin_class AND pt.rec_status = 0 LEFT JOIN t_pro_plugin_preview_file AS pppf ON sp.id = pppf.plugin_id AND pppf.rec_status = 0 AND sp.rec_status = 0 WHERE @@ -39,11 +42,14 @@ sp.plugin_icon AS pluginIcon, tf.visit_location AS iconUrl, sp.description AS description, + sp.plugin_class AS pluginClass, + pt.type_name AS typeName, sp.plugin_author AS pluginAuthor, CONCAT_WS(',',GROUP_CONCAT(DISTINCT sp.plugin_icon),GROUP_CONCAT(DISTINCT pppf.file_id)) AS fileIdList FROM t_sys_plugin AS sp LEFT JOIN t_file AS tf ON sp.plugin_icon = tf.id + LEFT JOIN t_sys_plugin_type AS pt ON pt.plugin_code = sp.plugin_class AND pt.rec_status = 0 LEFT JOIN t_pro_plugin_preview_file AS pppf ON sp.id = pppf.plugin_id AND pppf.rec_status = 0 WHERE sp.id NOT IN ( diff --git a/tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml b/tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml index 2aa7ca77..2c384c30 100644 --- a/tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml +++ b/tall/src/main/resources/mapper_raw/ProTaskDetailMapper.xml @@ -30,6 +30,7 @@ + @@ -93,7 +94,7 @@ id, project_id, name, description, begin_time, end_time, cycle, parent_id, sub_task, sub_project_id, sub_project, executor_role, checker_role, money, delay, delay_time, loop_to, loop_times, virtual, level, has_group, finish_need_all, all_member, created_at, - updated_at, rec_status, priority, milestone + updated_at, rec_status, priority, milestone, build_user @@ -415,6 +422,9 @@ milestone = #{record.milestone,jdbcType=VARCHAR}, + + build_user = #{record.buildUser,jdbcType=BIGINT}, + @@ -449,7 +459,8 @@ updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, rec_status = #{record.recStatus,jdbcType=TINYINT}, priority = #{record.priority,jdbcType=TINYINT}, - milestone = #{record.milestone,jdbcType=VARCHAR} + milestone = #{record.milestone,jdbcType=VARCHAR}, + build_user = #{record.buildUser,jdbcType=BIGINT} @@ -538,6 +549,9 @@ milestone = #{milestone,jdbcType=VARCHAR}, + + build_user = #{buildUser,jdbcType=BIGINT}, + where id = #{id,jdbcType=BIGINT} @@ -569,7 +583,8 @@ updated_at = #{updatedAt,jdbcType=TIMESTAMP}, rec_status = #{recStatus,jdbcType=TINYINT}, priority = #{priority,jdbcType=TINYINT}, - milestone = #{milestone,jdbcType=VARCHAR} + milestone = #{milestone,jdbcType=VARCHAR}, + build_user = #{buildUser,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysPluginTypeMapper.xml b/tall/src/main/resources/mapper_raw/SysPluginTypeMapper.xml new file mode 100644 index 00000000..e121ea80 --- /dev/null +++ b/tall/src/main/resources/mapper_raw/SysPluginTypeMapper.xml @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, type_name, parent_id, plugin_code, created_at, updated_at, rec_status + + + + + delete from t_sys_plugin_type + where id = #{id,jdbcType=BIGINT} + + + delete from t_sys_plugin_type + + + + + + insert into t_sys_plugin_type (id, type_name, parent_id, + plugin_code, created_at, updated_at, + rec_status) + values (#{id,jdbcType=BIGINT}, #{typeName,jdbcType=VARCHAR}, #{parentId,jdbcType=BIGINT}, + #{pluginCode,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, + #{recStatus,jdbcType=TINYINT}) + + + insert into t_sys_plugin_type + + + id, + + + type_name, + + + parent_id, + + + plugin_code, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{typeName,jdbcType=VARCHAR}, + + + #{parentId,jdbcType=BIGINT}, + + + #{pluginCode,jdbcType=TINYINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_sys_plugin_type + + + id = #{record.id,jdbcType=BIGINT}, + + + type_name = #{record.typeName,jdbcType=VARCHAR}, + + + parent_id = #{record.parentId,jdbcType=BIGINT}, + + + plugin_code = #{record.pluginCode,jdbcType=TINYINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_sys_plugin_type + set id = #{record.id,jdbcType=BIGINT}, + type_name = #{record.typeName,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=BIGINT}, + plugin_code = #{record.pluginCode,jdbcType=TINYINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_sys_plugin_type + + + type_name = #{typeName,jdbcType=VARCHAR}, + + + parent_id = #{parentId,jdbcType=BIGINT}, + + + plugin_code = #{pluginCode,jdbcType=TINYINT}, + + + created_at = #{createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{recStatus,jdbcType=TINYINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_sys_plugin_type + set type_name = #{typeName,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=BIGINT}, + plugin_code = #{pluginCode,jdbcType=TINYINT}, + created_at = #{createdAt,jdbcType=TIMESTAMP}, + updated_at = #{updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{recStatus,jdbcType=TINYINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file