diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExeclude.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExclude.java similarity index 92% rename from tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExeclude.java rename to tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExclude.java index 63d736b8..c881d139 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExeclude.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExclude.java @@ -1,84 +1,84 @@ -package com.ccsens.tall.bean.po; - -import java.io.Serializable; -import java.util.Date; - -public class ProRoleExeclude implements Serializable { - private Long id; - - private Long roleId; - - private Long otherRoleId; - - 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 getRoleId() { - return roleId; - } - - public void setRoleId(Long roleId) { - this.roleId = roleId; - } - - public Long getOtherRoleId() { - return otherRoleId; - } - - public void setOtherRoleId(Long otherRoleId) { - this.otherRoleId = otherRoleId; - } - - 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(", roleId=").append(roleId); - sb.append(", otherRoleId=").append(otherRoleId); - sb.append(", createdAt=").append(createdAt); - sb.append(", updatedAt=").append(updatedAt); - sb.append(", recStatus=").append(recStatus); - sb.append("]"); - return sb.toString(); - } +package com.ccsens.tall.bean.po; + +import java.io.Serializable; +import java.util.Date; + +public class ProRoleExclude implements Serializable { + private Long id; + + private Long roleId; + + private Long otherRoleId; + + 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 getRoleId() { + return roleId; + } + + public void setRoleId(Long roleId) { + this.roleId = roleId; + } + + public Long getOtherRoleId() { + return otherRoleId; + } + + public void setOtherRoleId(Long otherRoleId) { + this.otherRoleId = otherRoleId; + } + + 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(", roleId=").append(roleId); + sb.append(", otherRoleId=").append(otherRoleId); + 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/ProRoleExecludeExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExcludeExample.java similarity index 96% rename from tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExecludeExample.java rename to tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExcludeExample.java index 480c42ab..b974c3c4 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExecludeExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/ProRoleExcludeExample.java @@ -1,561 +1,561 @@ -package com.ccsens.tall.bean.po; - -import java.util.ArrayList; -import java.util.Date; -import java.util.List; - -public class ProRoleExecludeExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public ProRoleExecludeExample() { - 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 andRoleIdIsNull() { - addCriterion("role_id is null"); - return (Criteria) this; - } - - public Criteria andRoleIdIsNotNull() { - addCriterion("role_id is not null"); - return (Criteria) this; - } - - public Criteria andRoleIdEqualTo(Long value) { - addCriterion("role_id =", value, "roleId"); - return (Criteria) this; - } - - public Criteria andRoleIdNotEqualTo(Long value) { - addCriterion("role_id <>", value, "roleId"); - return (Criteria) this; - } - - public Criteria andRoleIdGreaterThan(Long value) { - addCriterion("role_id >", value, "roleId"); - return (Criteria) this; - } - - public Criteria andRoleIdGreaterThanOrEqualTo(Long value) { - addCriterion("role_id >=", value, "roleId"); - return (Criteria) this; - } - - public Criteria andRoleIdLessThan(Long value) { - addCriterion("role_id <", value, "roleId"); - return (Criteria) this; - } - - public Criteria andRoleIdLessThanOrEqualTo(Long value) { - addCriterion("role_id <=", value, "roleId"); - return (Criteria) this; - } - - public Criteria andRoleIdIn(List values) { - addCriterion("role_id in", values, "roleId"); - return (Criteria) this; - } - - public Criteria andRoleIdNotIn(List values) { - addCriterion("role_id not in", values, "roleId"); - return (Criteria) this; - } - - public Criteria andRoleIdBetween(Long value1, Long value2) { - addCriterion("role_id between", value1, value2, "roleId"); - return (Criteria) this; - } - - public Criteria andRoleIdNotBetween(Long value1, Long value2) { - addCriterion("role_id not between", value1, value2, "roleId"); - return (Criteria) this; - } - - public Criteria andOtherRoleIdIsNull() { - addCriterion("other_role_id is null"); - return (Criteria) this; - } - - public Criteria andOtherRoleIdIsNotNull() { - addCriterion("other_role_id is not null"); - return (Criteria) this; - } - - public Criteria andOtherRoleIdEqualTo(Long value) { - addCriterion("other_role_id =", value, "otherRoleId"); - return (Criteria) this; - } - - public Criteria andOtherRoleIdNotEqualTo(Long value) { - addCriterion("other_role_id <>", value, "otherRoleId"); - return (Criteria) this; - } - - public Criteria andOtherRoleIdGreaterThan(Long value) { - addCriterion("other_role_id >", value, "otherRoleId"); - return (Criteria) this; - } - - public Criteria andOtherRoleIdGreaterThanOrEqualTo(Long value) { - addCriterion("other_role_id >=", value, "otherRoleId"); - return (Criteria) this; - } - - public Criteria andOtherRoleIdLessThan(Long value) { - addCriterion("other_role_id <", value, "otherRoleId"); - return (Criteria) this; - } - - public Criteria andOtherRoleIdLessThanOrEqualTo(Long value) { - addCriterion("other_role_id <=", value, "otherRoleId"); - return (Criteria) this; - } - - public Criteria andOtherRoleIdIn(List values) { - addCriterion("other_role_id in", values, "otherRoleId"); - return (Criteria) this; - } - - public Criteria andOtherRoleIdNotIn(List values) { - addCriterion("other_role_id not in", values, "otherRoleId"); - return (Criteria) this; - } - - public Criteria andOtherRoleIdBetween(Long value1, Long value2) { - addCriterion("other_role_id between", value1, value2, "otherRoleId"); - return (Criteria) this; - } - - public Criteria andOtherRoleIdNotBetween(Long value1, Long value2) { - addCriterion("other_role_id not between", value1, value2, "otherRoleId"); - 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); - } - } +package com.ccsens.tall.bean.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProRoleExcludeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProRoleExcludeExample() { + 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 andRoleIdIsNull() { + addCriterion("role_id is null"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNotNull() { + addCriterion("role_id is not null"); + return (Criteria) this; + } + + public Criteria andRoleIdEqualTo(Long value) { + addCriterion("role_id =", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotEqualTo(Long value) { + addCriterion("role_id <>", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThan(Long value) { + addCriterion("role_id >", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThanOrEqualTo(Long value) { + addCriterion("role_id >=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThan(Long value) { + addCriterion("role_id <", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThanOrEqualTo(Long value) { + addCriterion("role_id <=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdIn(List values) { + addCriterion("role_id in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotIn(List values) { + addCriterion("role_id not in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdBetween(Long value1, Long value2) { + addCriterion("role_id between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotBetween(Long value1, Long value2) { + addCriterion("role_id not between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andOtherRoleIdIsNull() { + addCriterion("other_role_id is null"); + return (Criteria) this; + } + + public Criteria andOtherRoleIdIsNotNull() { + addCriterion("other_role_id is not null"); + return (Criteria) this; + } + + public Criteria andOtherRoleIdEqualTo(Long value) { + addCriterion("other_role_id =", value, "otherRoleId"); + return (Criteria) this; + } + + public Criteria andOtherRoleIdNotEqualTo(Long value) { + addCriterion("other_role_id <>", value, "otherRoleId"); + return (Criteria) this; + } + + public Criteria andOtherRoleIdGreaterThan(Long value) { + addCriterion("other_role_id >", value, "otherRoleId"); + return (Criteria) this; + } + + public Criteria andOtherRoleIdGreaterThanOrEqualTo(Long value) { + addCriterion("other_role_id >=", value, "otherRoleId"); + return (Criteria) this; + } + + public Criteria andOtherRoleIdLessThan(Long value) { + addCriterion("other_role_id <", value, "otherRoleId"); + return (Criteria) this; + } + + public Criteria andOtherRoleIdLessThanOrEqualTo(Long value) { + addCriterion("other_role_id <=", value, "otherRoleId"); + return (Criteria) this; + } + + public Criteria andOtherRoleIdIn(List values) { + addCriterion("other_role_id in", values, "otherRoleId"); + return (Criteria) this; + } + + public Criteria andOtherRoleIdNotIn(List values) { + addCriterion("other_role_id not in", values, "otherRoleId"); + return (Criteria) this; + } + + public Criteria andOtherRoleIdBetween(Long value1, Long value2) { + addCriterion("other_role_id between", value1, value2, "otherRoleId"); + return (Criteria) this; + } + + public Criteria andOtherRoleIdNotBetween(Long value1, Long value2) { + addCriterion("other_role_id not between", value1, value2, "otherRoleId"); + 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/TaskVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/TaskVo.java index e70b40a8..73c9ccf5 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 @@ -89,10 +89,8 @@ public class TaskVo { private Long endTime; @ApiModelProperty("时长") private Long duration; - @ApiModelProperty("显示的开始时间") - private String showBeginTime; - @ApiModelProperty("显示的结束时间") - private String showEndTime; + @ApiModelProperty("显示的日期格式") + private String showTimeFormat; @ApiModelProperty("循环周期") private String cycle; @ApiModelProperty("跳转模式 -1手动,0自动,1延迟") diff --git a/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java b/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java index b52fd039..6065aed3 100644 --- a/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java +++ b/tall/src/main/java/com/ccsens/tall/config/SpringConfig.java @@ -101,6 +101,7 @@ public class SpringConfig implements WebMvcConfigurer { /** * 配置静态资源 */ + @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/upload/**") .addResourceLocations("classpath:/upload/"); diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleExcludeDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleExcludeDao.java new file mode 100644 index 00000000..b682cee2 --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleExcludeDao.java @@ -0,0 +1,8 @@ +package com.ccsens.tall.persist.dao; + +import com.ccsens.tall.persist.mapper.ProRoleExcludeMapper; +import org.springframework.stereotype.Repository; + +@Repository +public interface ProRoleExcludeDao extends ProRoleExcludeMapper { +} diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleExecludeDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleExecludeDao.java deleted file mode 100644 index dfe2632f..00000000 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/ProRoleExecludeDao.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.ccsens.tall.persist.dao; - -import com.ccsens.tall.persist.mapper.ProRoleExecludeMapper; -import org.springframework.stereotype.Repository; - -@Repository -public interface ProRoleExecludeDao extends ProRoleExecludeMapper{ -} diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleExcludeMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleExcludeMapper.java new file mode 100644 index 00000000..2d1f122d --- /dev/null +++ b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleExcludeMapper.java @@ -0,0 +1,30 @@ +package com.ccsens.tall.persist.mapper; + +import com.ccsens.tall.bean.po.ProRoleExclude; +import com.ccsens.tall.bean.po.ProRoleExcludeExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ProRoleExcludeMapper { + long countByExample(ProRoleExcludeExample example); + + int deleteByExample(ProRoleExcludeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProRoleExclude record); + + int insertSelective(ProRoleExclude record); + + List selectByExample(ProRoleExcludeExample example); + + ProRoleExclude selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProRoleExclude record, @Param("example") ProRoleExcludeExample example); + + int updateByExample(@Param("record") ProRoleExclude record, @Param("example") ProRoleExcludeExample example); + + int updateByPrimaryKeySelective(ProRoleExclude record); + + int updateByPrimaryKey(ProRoleExclude record); +} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleExecludeMapper.java b/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleExecludeMapper.java deleted file mode 100644 index d1e9d030..00000000 --- a/tall/src/main/java/com/ccsens/tall/persist/mapper/ProRoleExecludeMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.ccsens.tall.persist.mapper; - -import com.ccsens.tall.bean.po.ProRoleExeclude; -import com.ccsens.tall.bean.po.ProRoleExecludeExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface ProRoleExecludeMapper { - long countByExample(ProRoleExecludeExample example); - - int deleteByExample(ProRoleExecludeExample example); - - int deleteByPrimaryKey(Long id); - - int insert(ProRoleExeclude record); - - int insertSelective(ProRoleExeclude record); - - List selectByExample(ProRoleExecludeExample example); - - ProRoleExeclude selectByPrimaryKey(Long id); - - int updateByExampleSelective(@Param("record") ProRoleExeclude record, @Param("example") ProRoleExecludeExample example); - - int updateByExample(@Param("record") ProRoleExeclude record, @Param("example") ProRoleExecludeExample example); - - int updateByPrimaryKeySelective(ProRoleExeclude record); - - int updateByPrimaryKey(ProRoleExeclude record); -} \ No newline at end of file diff --git a/tall/src/main/java/com/ccsens/tall/service/ExcelService.java b/tall/src/main/java/com/ccsens/tall/service/ExcelService.java index 26457774..d865cfd2 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ExcelService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ExcelService.java @@ -359,7 +359,7 @@ public class ExcelService implements IExcelService { if (ObjectUtil.isNotNull(excludeRoleCells)) { for (int a = 0; a < excludeRoleCells.length; a++) { - ProRoleExeclude excludeRole = new ProRoleExeclude(); + ProRoleExclude excludeRole = new ProRoleExclude(); excludeRole.setId(snowflake.nextId()); excludeRole.setRoleId(proRoleId); if (CollectionUtil.isNotEmpty(proRoles)) { diff --git a/tall/src/main/java/com/ccsens/tall/service/ExcludeRoleService.java b/tall/src/main/java/com/ccsens/tall/service/ExcludeRoleService.java index 6d3f918b..0c74cc7e 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ExcludeRoleService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ExcludeRoleService.java @@ -1,7 +1,7 @@ package com.ccsens.tall.service; -import com.ccsens.tall.bean.po.ProRoleExeclude; -import com.ccsens.tall.persist.dao.ProRoleExecludeDao; +import com.ccsens.tall.bean.po.ProRoleExclude; +import com.ccsens.tall.persist.dao.ProRoleExcludeDao; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -13,9 +13,9 @@ import org.springframework.transaction.annotation.Transactional; @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) public class ExcludeRoleService implements IExcludeRoleService{ @Autowired - private ProRoleExecludeDao proRoleExecludeDao; + private ProRoleExcludeDao proRoleExecludeDao; @Override - public void saveExcludeRole(ProRoleExeclude excludeRole) { + public void saveExcludeRole(ProRoleExclude excludeRole) { proRoleExecludeDao.insertSelective(excludeRole); } } diff --git a/tall/src/main/java/com/ccsens/tall/service/IExcludeRoleService.java b/tall/src/main/java/com/ccsens/tall/service/IExcludeRoleService.java index 17beb419..3ba184df 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IExcludeRoleService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IExcludeRoleService.java @@ -1,7 +1,7 @@ package com.ccsens.tall.service; -import com.ccsens.tall.bean.po.ProRoleExeclude; +import com.ccsens.tall.bean.po.ProRoleExclude; public interface IExcludeRoleService { - void saveExcludeRole(ProRoleExeclude excludeRole); + void saveExcludeRole(ProRoleExclude excludeRole); } 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 ac300a81..5d9d768d 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProRoleService.java @@ -16,11 +16,13 @@ public interface IProRoleService { List getRealMemberRolesByProjectId(Long projectId); - int selectPowerByRoleName(List roles); + int selectPowerByRoleName(Long userId,Long projectId); TaskVo.RoleCheckList selectRoleByCheckOrExecutor(Long executorRole); ProRole getAllMember(Long projectId); - void deleteRoleByProjectId(Long userId,Long projectId); + void deleteRole(Long userId,Long roleId); + + void deleteRoleByProjectId(Long projectId); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IProShowService.java b/tall/src/main/java/com/ccsens/tall/service/IProShowService.java index bf05270e..9b1ccd6c 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProShowService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProShowService.java @@ -4,4 +4,6 @@ import com.ccsens.tall.bean.po.ProShow; public interface IProShowService{ void saveProShow(ProShow proShow); + + ProShow selectByProjectId(Long projectId)throws Exception; } diff --git a/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java b/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java index 7082e504..cc89780e 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IProTaskDetailService.java @@ -22,5 +22,5 @@ public interface IProTaskDetailService { void deleteTask(Long currentUserId,Long taskId); - void deleteTaskByTaskId(Long taskId); + void deleteTaskByRoleId(Long taskId); } 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 42d75716..df4ec2a7 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProRoleService.java @@ -2,15 +2,13 @@ package com.ccsens.tall.service; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; -import com.ccsens.tall.bean.po.ProMember; -import com.ccsens.tall.bean.po.ProRole; -import com.ccsens.tall.bean.po.ProRoleExample; +import com.ccsens.tall.bean.po.*; import com.ccsens.tall.bean.vo.ProjectVo; import com.ccsens.tall.bean.vo.TaskVo; -import com.ccsens.tall.persist.dao.ProMemberDao; -import com.ccsens.tall.persist.dao.ProMemberRoleDao; -import com.ccsens.tall.persist.dao.ProRoleDao; +import com.ccsens.tall.persist.dao.*; +import com.ccsens.util.CodeEnum; import com.ccsens.util.WebConstant; +import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -28,8 +26,16 @@ public class ProRoleService implements IProRoleService { @Autowired private ProMemberDao proMemberDao; @Autowired + private ProMemberRoleDao memberRoleDao; + @Autowired + private ProRoleExcludeDao excludeDao; + @Autowired + private SysProjectDao projectDao; + @Autowired private IProMemberService proMemberService; @Autowired + private IProTaskDetailService taskDetailService; + @Autowired private IUserService userService; @Override @@ -151,12 +157,16 @@ public class ProRoleService implements IProRoleService { /** * 获取用户在项目中的最高权限 - * @param roles 用户在项目中所属的一级角色的名字 * @return */ @Override - public int selectPowerByRoleName(List roles) { + public int selectPowerByRoleName(Long userId,Long projectId) { int power = 0; + SysProject project = projectDao.selectByPrimaryKey(projectId); + if(project.getCreatorId().longValue() == userId){ + power = 2; + } + List roles = getProRoleByProjectIdAndUserId(projectId,userId); if(CollectionUtil.isNotEmpty(roles)){ for(ProRole role:roles){ int i = proRoleDao.selectPowerByRoleName(role.getDescription()); @@ -201,12 +211,53 @@ public class ProRoleService implements IProRoleService { * 删除角色 */ @Override - public void deleteRoleByProjectId(Long userId,Long roleId) { + public void deleteRole(Long userId,Long roleId){ + ProRole role = proRoleDao.selectByPrimaryKey(roleId); + //本用户在项目中的角色 + List proRoles = getProRoleByProjectIdAndUserId(role.getProjectId(), userId); + //用户在项目中的最高权限 + int power = selectPowerByRoleName(userId,role.getProjectId()); + if (power > 1) { + deleteRoleByRoleId(roleId); + } else { + throw new BaseException(CodeEnum.NOT_POWER); + } + } + + /** + * 删除项目下的所有角色 + */ + @Override + public void deleteRoleByProjectId(Long projectId) { ProRoleExample roleExample = new ProRoleExample(); - roleExample.createCriteria().andProjectIdEqualTo(roleId); + roleExample.createCriteria().andProjectIdEqualTo(projectId); List roleList = proRoleDao.selectByExample(roleExample); - + if(CollectionUtil.isNotEmpty(roleList)){ + for(ProRole role:roleList){ + deleteRoleByRoleId(role.getId()); + } + } } + private void deleteRoleByRoleId(Long roleId){ + //删除角色下的任务 + taskDetailService.deleteTaskByRoleId(roleId); + //删除成员和成员角色关联表 + ProMemberRoleExample memberRoleExample = new ProMemberRoleExample(); + memberRoleExample.createCriteria().andRoleIdEqualTo(roleId); + List memberRoleList = memberRoleDao.selectByExample(memberRoleExample); + if(CollectionUtil.isNotEmpty(memberRoleList)){ + for(ProMemberRole memberRole:memberRoleList){ + proMemberDao.deleteByPrimaryKey(memberRole.getMemberId()); + memberRoleDao.deleteByPrimaryKey(memberRole.getId()); + } + } + //删除对谁不可见 + ProRoleExcludeExample excludeExample = new ProRoleExcludeExample(); + excludeExample.createCriteria().andRoleIdEqualTo(roleId); + excludeDao.deleteByExample(excludeExample); + //删除角色 + proRoleDao.deleteByPrimaryKey(roleId); + } } diff --git a/tall/src/main/java/com/ccsens/tall/service/ProShowService.java b/tall/src/main/java/com/ccsens/tall/service/ProShowService.java index d280139a..f1ede99d 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProShowService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProShowService.java @@ -1,10 +1,14 @@ package com.ccsens.tall.service; +import cn.hutool.core.collection.CollectionUtil; import com.ccsens.tall.bean.po.ProShow; +import com.ccsens.tall.bean.po.ProShowExample; import com.ccsens.tall.persist.dao.ProShowDao; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + @Service public class ProShowService implements IProShowService{ @Autowired @@ -14,4 +18,17 @@ public class ProShowService implements IProShowService{ public void saveProShow(ProShow proShow) { proShowDao.insertSelective(proShow); } + + @Override + public ProShow selectByProjectId(Long projectId) throws Exception { + ProShow proShow = null; + + ProShowExample proShowExample = new ProShowExample(); + proShowExample.createCriteria().andProjectIdEqualTo(projectId); + List proShowList = proShowDao.selectByExample(proShowExample); + if(CollectionUtil.isNotEmpty(proShowList)){ + proShow = proShowList.get(0); + } + return proShow; + } } 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 9a53b29d..e4d68d0e 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProTaskDetailService.java @@ -14,6 +14,7 @@ import com.ccsens.util.WebConstant; import com.ccsens.util.exception.BaseException; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Repository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -36,6 +37,8 @@ public class ProTaskDetailService implements IProTaskDetailService { @Autowired private IProMemberService proMemberService; @Autowired + private IProShowService proShowService; + @Autowired private TaskDetailDao taskDetailDao; @Autowired private TaskSubTimeDao taskSubTimeDao; @@ -93,6 +96,8 @@ public class ProTaskDetailService implements IProTaskDetailService { * 查看任务 项目经理 */ private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndPM(Long currentUserId, Long projectId, Long startTime, Long endTime, Integer process, Integer page, Integer pageSize) throws Exception { + ProShow proShow = proShowService.selectByProjectId(projectId); + TaskVo.ProTaskInfo proTaskInfo = new TaskVo.ProTaskInfo(); List globalTaskList = new ArrayList<>(); List normalTaskList = new ArrayList<>(); @@ -123,6 +128,14 @@ public class ProTaskDetailService implements IProTaskDetailService { task.setRealEndTime(subTimeMember.getRealFinishTime()); task.setProcess(subTimeMember.getComplatedStatus()); } + if(ObjectUtil.isNotNull(proShow)){ + task.setShowTimeFormat(proShow.getTimeShow()); + if(proShow.getDuration() == 1){ + task.setDuration(null); + } + }else { + task.setShowTimeFormat("MM-dd HH:mm"); + } } TaskUtil.Task task = TaskUtil.splitTask(secondNormalTaskList, startTime, endTime, process); if (CollectionUtil.isNotEmpty(task.getGlobalTask())) { @@ -157,6 +170,8 @@ public class ProTaskDetailService implements IProTaskDetailService { * 查看任务 项目成员 */ private TaskVo.ProTaskInfo getTaskInfoByProjectIdAndRoleId(Long currentUserId, Long projectId, Long roleId, Long startTime, Long endTime, Integer process, Integer page, Integer pageSize) throws Exception { + ProShow proShow = proShowService.selectByProjectId(projectId); + TaskVo.ProTaskInfo proTaskInfo = new TaskVo.ProTaskInfo(); List globalTaskList = new ArrayList<>(); List normalTaskList = new ArrayList<>(); @@ -176,6 +191,14 @@ public class ProTaskDetailService implements IProTaskDetailService { normalTask.setProcess(subTimeMember.getComplatedStatus()); normalTask.setRealEndTime(subTimeMember.getRealFinishTime()); } + if(ObjectUtil.isNotNull(proShow)){ + normalTask.setShowTimeFormat(proShow.getTimeShow()); + if(proShow.getDuration() == 1){ + normalTask.setDuration(null); + } + }else { + normalTask.setShowTimeFormat("MM-dd HH:mm"); + } } TaskUtil.Task task = TaskUtil.splitTask(secondTaskVoList, startTime, endTime, process); if (CollectionUtil.isNotEmpty(task.getGlobalTask())) { @@ -380,6 +403,8 @@ public class ProTaskDetailService implements IProTaskDetailService { */ @Override public TaskVo.NormalTask getTaskInfoByTaskId(Long currentUserId, Long projectId, Long taskId) throws Exception { + ProShow proShow = proShowService.selectByProjectId(projectId); + ProTaskSubTime subTime = taskSubTimeDao.selectByPrimaryKey(taskId); TaskVo.NormalTask taskDetail = null; if (ObjectUtil.isNotNull(subTime)) { @@ -390,6 +415,15 @@ public class ProTaskDetailService implements IProTaskDetailService { taskDetail.setProcess(subTimeMember.getComplatedStatus()); taskDetail.setRealEndTime(subTimeMember.getRealFinishTime()); } + //显示的日期格式和时长格式 + if(ObjectUtil.isNotNull(proShow)){ + taskDetail.setShowTimeFormat(proShow.getTimeShow()); + if(proShow.getDuration() == 1){ + taskDetail.setDuration(null); + } + }else { + taskDetail.setShowTimeFormat("MM-dd HH:mm"); + } //添加项目信息和插件信息 normalTaskAddPlugin(currentUserId, subTime.getTaskDetailId(), taskDetail); if (ObjectUtil.isNotNull(taskDetail)) { @@ -403,6 +437,15 @@ public class ProTaskDetailService implements IProTaskDetailService { groupTask.setProcess(proSubTimeMember.getComplatedStatus()); groupTask.setRealEndTime(proSubTimeMember.getRealFinishTime()); } + //显示的日期格式和时长格式 + if(ObjectUtil.isNotNull(proShow)){ + groupTask.setShowTimeFormat(proShow.getTimeShow()); + if(proShow.getDuration() == 1){ + groupTask.setDuration(null); + } + }else { + groupTask.setShowTimeFormat("MM-dd HH:mm"); + } //添加项目信息和插件信息 normalTaskAddPlugin(currentUserId, groupTask.getDetailId(), groupTask); //修改返回时子任务的名字(“任务名+(xx和XX)”) @@ -461,6 +504,7 @@ public class ProTaskDetailService implements IProTaskDetailService { return name; } + /** * 任务清单 */ @@ -773,7 +817,7 @@ public class ProTaskDetailService implements IProTaskDetailService { //本用户在项目中的角色 List proRoles = proRoleService.getProRoleByProjectIdAndUserId(taskDetail.getProjectId(), currentUserId); //用户在项目中的最高权限 - int power = proRoleService.selectPowerByRoleName(proRoles); + int power = proRoleService.selectPowerByRoleName(currentUserId,taskDetail.getProjectId()); if (power > 1) { if (ObjectUtil.isNotNull(taskDetail)) { deleteTaskByTaskId(taskDetail.getId()); @@ -784,7 +828,18 @@ public class ProTaskDetailService implements IProTaskDetailService { } @Override - public void deleteTaskByTaskId(Long taskId) { + public void deleteTaskByRoleId(Long roleId) { + ProTaskDetailExample taskDetailExample = new ProTaskDetailExample(); + taskDetailExample.createCriteria().andExecutorRoleEqualTo(roleId); + List detailList = taskDetailDao.selectByExample(taskDetailExample); + if(CollectionUtil.isNotEmpty(detailList)){ + for(ProTaskDetail taskDetail:detailList){ + deleteTaskByTaskId(taskDetail.getId()); + } + } + } + + private void deleteTaskByTaskId(Long taskId) { //1、删除交付物相关信息 taskDeliverService.deleteDeliverByTaskId(taskId); //2、删除插件 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 ba287f08..c858f597 100644 --- a/tall/src/main/java/com/ccsens/tall/service/ProjectService.java +++ b/tall/src/main/java/com/ccsens/tall/service/ProjectService.java @@ -31,7 +31,7 @@ public class ProjectService implements IProjectService { @Autowired private SysProjectDao sysProjectDao; @Autowired - private ProRoleExecludeDao roleExecludeDao; + private ProRoleExcludeDao roleExcludeDao; @Autowired private ProRoleDao proRoleDao; @Autowired @@ -197,7 +197,7 @@ public class ProjectService implements IProjectService { projectInfo.getRoles().add(WebConstant.ROLE_NAME.Attention.phase); } //用户在项目中的最高权限 - int power = proRoleService.selectPowerByRoleName(proRoles); + int power = proRoleService.selectPowerByRoleName(currentUserId,project.getId()); projectInfo.setPower(power); projectInfoList.add(projectInfo); @@ -235,7 +235,7 @@ public class ProjectService implements IProjectService { projectInfo.getRoles().add(WebConstant.ROLE_NAME.Attention.phase); } //用户在项目中的最高权限 - int power = proRoleService.selectPowerByRoleName(proRoles); + int power = proRoleService.selectPowerByRoleName(userId,projectId); projectInfo.setPower(power); //获取项目配置 ProShowExample proShowExample = new ProShowExample(); @@ -377,14 +377,14 @@ public class ProjectService implements IProjectService { //本用户在项目中的角色 List proRoles = proRoleService.getProRoleByProjectIdAndUserId(projectId, currentUserId); //用户在项目中的最高权限 - int power = proRoleService.selectPowerByRoleName(proRoles); + int power = proRoleService.selectPowerByRoleName(currentUserId,projectId); if(power>1){ - //修改项目状态 - SysProject project = sysProjectDao.selectByPrimaryKey(projectId); - project.setRecStatus((byte) 1); - sysProjectDao.updateByPrimaryKeySelective(project); +// //修改项目状态 +// SysProject project = sysProjectDao.selectByPrimaryKey(projectId); +// project.setRecStatus((byte) 1); +// sysProjectDao.updateByPrimaryKeySelective(project); //彻底删除项目 - + deleteProjectById(projectId); }else { throw new BaseException(CodeEnum.NOT_POWER); } @@ -393,7 +393,14 @@ public class ProjectService implements IProjectService { * 删除项目 */ private void deleteProjectById(Long projectId){ - + //删除任务下的角色 + proRoleService.deleteRoleByProjectId(projectId); + //删除这个项目被关注的信息 + UserAttentionExample attentionExample = new UserAttentionExample(); + attentionExample.createCriteria().andProjectIdEqualTo(projectId); + attentionDao.deleteByExample(attentionExample); + //删除项目 + sysProjectDao.deleteByPrimaryKey(projectId); } /** @@ -475,15 +482,15 @@ public class ProjectService implements IProjectService { private void copyRoleExeclude(List oldRoleList, Map oldRoleMap, Map newRoleMap){ if(CollectionUtil.isNotEmpty(oldRoleList)) { for (ProRole oldRole : oldRoleList) { - ProRoleExecludeExample execludeExample = new ProRoleExecludeExample(); + ProRoleExcludeExample execludeExample = new ProRoleExcludeExample(); execludeExample.createCriteria().andRoleIdEqualTo(oldRole.getId()); - List roleExecludeList = roleExecludeDao.selectByExample(execludeExample); + List roleExecludeList = roleExcludeDao.selectByExample(execludeExample); if(CollectionUtil.isNotEmpty(roleExecludeList)){ - for(ProRoleExeclude roleExeclude:roleExecludeList){ - ProRoleExeclude newRoleExeclude = new ProRoleExeclude(); + for(ProRoleExclude roleExeclude:roleExecludeList){ + ProRoleExclude newRoleExeclude = new ProRoleExclude(); newRoleExeclude.setRoleId(newRoleMap.get(oldRoleMap.get(roleExeclude.getRoleId()))); newRoleExeclude.setOtherRoleId(newRoleMap.get(oldRoleMap.get(roleExeclude.getRoleId()))); - roleExecludeDao.insertSelective(newRoleExeclude); + roleExcludeDao.insertSelective(newRoleExeclude); } } } diff --git a/tall/src/main/java/com/ccsens/tall/web/DebugController.java b/tall/src/main/java/com/ccsens/tall/web/DebugController.java index 408e78c6..5c5bca03 100644 --- a/tall/src/main/java/com/ccsens/tall/web/DebugController.java +++ b/tall/src/main/java/com/ccsens/tall/web/DebugController.java @@ -1,6 +1,5 @@ package com.ccsens.tall.web; -import cn.hutool.core.collection.CollectionUtil; import com.ccsens.util.JsonResponse; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParams; @@ -10,7 +9,6 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; -import java.util.Map; @Api(tags = "DEBUG" , description = "DebugController | ") @RestController diff --git a/tall/src/main/java/com/ccsens/tall/web/DomainController.java b/tall/src/main/java/com/ccsens/tall/web/DomainController.java index f2950665..dc8d305d 100644 --- a/tall/src/main/java/com/ccsens/tall/web/DomainController.java +++ b/tall/src/main/java/com/ccsens/tall/web/DomainController.java @@ -31,6 +31,6 @@ public class DomainController { public JsonResponse getDomainByName(HttpServletRequest request, @RequestParam(required = true) String domainName) throws Exception { DomainVo.DomainInfo domainInfo = domainService.getDomainByName(domainName); - return JsonResponse.newInstance().ok(); + return JsonResponse.newInstance().ok(domainInfo); } } diff --git a/tall/src/main/resources/application.yml b/tall/src/main/resources/application.yml index 1d881c2f..eca66951 100644 --- a/tall/src/main/resources/application.yml +++ b/tall/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: dev - include: util-dev,common \ No newline at end of file + active: test + include: util-test,common \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/ProRoleExecludeMapper.xml b/tall/src/main/resources/mapper_raw/ProRoleExcludeMapper.xml similarity index 93% rename from tall/src/main/resources/mapper_raw/ProRoleExecludeMapper.xml rename to tall/src/main/resources/mapper_raw/ProRoleExcludeMapper.xml index 30f73cfe..cca48655 100644 --- a/tall/src/main/resources/mapper_raw/ProRoleExecludeMapper.xml +++ b/tall/src/main/resources/mapper_raw/ProRoleExcludeMapper.xml @@ -1,228 +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, role_id, other_role_id, created_at, updated_at, rec_status - - - - - delete from t_pro_role_execlude - where id = #{id,jdbcType=BIGINT} - - - delete from t_pro_role_execlude - - - - - - insert into t_pro_role_execlude (id, role_id, other_role_id, - created_at, updated_at, rec_status - ) - values (#{id,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}, #{otherRoleId,jdbcType=BIGINT}, - #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} - ) - - - insert into t_pro_role_execlude - - - id, - - - role_id, - - - other_role_id, - - - created_at, - - - updated_at, - - - rec_status, - - - - - #{id,jdbcType=BIGINT}, - - - #{roleId,jdbcType=BIGINT}, - - - #{otherRoleId,jdbcType=BIGINT}, - - - #{createdAt,jdbcType=TIMESTAMP}, - - - #{updatedAt,jdbcType=TIMESTAMP}, - - - #{recStatus,jdbcType=TINYINT}, - - - - - - update t_pro_role_execlude - - - id = #{record.id,jdbcType=BIGINT}, - - - role_id = #{record.roleId,jdbcType=BIGINT}, - - - other_role_id = #{record.otherRoleId,jdbcType=BIGINT}, - - - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - - - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - - - rec_status = #{record.recStatus,jdbcType=TINYINT}, - - - - - - - - update t_pro_role_execlude - set id = #{record.id,jdbcType=BIGINT}, - role_id = #{record.roleId,jdbcType=BIGINT}, - other_role_id = #{record.otherRoleId,jdbcType=BIGINT}, - created_at = #{record.createdAt,jdbcType=TIMESTAMP}, - updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} - - - - - - update t_pro_role_execlude - - - role_id = #{roleId,jdbcType=BIGINT}, - - - other_role_id = #{otherRoleId,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_role_execlude - set role_id = #{roleId,jdbcType=BIGINT}, - other_role_id = #{otherRoleId,jdbcType=BIGINT}, - created_at = #{createdAt,jdbcType=TIMESTAMP}, - updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} - where id = #{id,jdbcType=BIGINT} - + + + + + + + + + + + + + + + + + + + + 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, role_id, other_role_id, created_at, updated_at, rec_status + + + + + delete from t_pro_role_execlude + where id = #{id,jdbcType=BIGINT} + + + delete from t_pro_role_execlude + + + + + + insert into t_pro_role_execlude (id, role_id, other_role_id, + created_at, updated_at, rec_status + ) + values (#{id,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}, #{otherRoleId,jdbcType=BIGINT}, + #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} + ) + + + insert into t_pro_role_execlude + + + id, + + + role_id, + + + other_role_id, + + + created_at, + + + updated_at, + + + rec_status, + + + + + #{id,jdbcType=BIGINT}, + + + #{roleId,jdbcType=BIGINT}, + + + #{otherRoleId,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=TIMESTAMP}, + + + #{updatedAt,jdbcType=TIMESTAMP}, + + + #{recStatus,jdbcType=TINYINT}, + + + + + + update t_pro_role_execlude + + + id = #{record.id,jdbcType=BIGINT}, + + + role_id = #{record.roleId,jdbcType=BIGINT}, + + + other_role_id = #{record.otherRoleId,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + + + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + + + rec_status = #{record.recStatus,jdbcType=TINYINT}, + + + + + + + + update t_pro_role_execlude + set id = #{record.id,jdbcType=BIGINT}, + role_id = #{record.roleId,jdbcType=BIGINT}, + other_role_id = #{record.otherRoleId,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=TIMESTAMP}, + updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, + rec_status = #{record.recStatus,jdbcType=TINYINT} + + + + + + update t_pro_role_execlude + + + role_id = #{roleId,jdbcType=BIGINT}, + + + other_role_id = #{otherRoleId,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_role_execlude + set role_id = #{roleId,jdbcType=BIGINT}, + other_role_id = #{otherRoleId,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