34 changed files with 2750 additions and 367 deletions
@ -0,0 +1,40 @@ |
|||||
|
package com.ccsens.common.bean.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
|
||||
|
/** |
||||
|
* @author AUSU |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CShareDto { |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("生成分享链接") |
||||
|
public static class CreateShareUrl{ |
||||
|
@NotNull(message = "请选择项目") |
||||
|
@ApiModelProperty("项目id") |
||||
|
private Long projectId; |
||||
|
@NotNull(message = "请选择角色") |
||||
|
@ApiModelProperty("角色id") |
||||
|
private Long roleId; |
||||
|
@NotBlank(message = "路径信息不能为空") |
||||
|
@ApiModelProperty("路径前缀") |
||||
|
private String path; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("点击分享链接") |
||||
|
public static class ClickShareUrl { |
||||
|
@NotBlank(message = "链接信息错误") |
||||
|
@ApiModelProperty("链接id") |
||||
|
private String shareId; |
||||
|
@NotBlank(message = "code信息错误") |
||||
|
@ApiModelProperty("加密code") |
||||
|
private String code; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,117 @@ |
|||||
|
package com.ccsens.common.bean.po; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class ProProjectShare implements Serializable { |
||||
|
private Long id; |
||||
|
|
||||
|
private Long userId; |
||||
|
|
||||
|
private String url; |
||||
|
|
||||
|
private String code; |
||||
|
|
||||
|
private Long projectId; |
||||
|
|
||||
|
private Long roleId; |
||||
|
|
||||
|
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 getUserId() { |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
public void setUserId(Long userId) { |
||||
|
this.userId = userId; |
||||
|
} |
||||
|
|
||||
|
public String getUrl() { |
||||
|
return url; |
||||
|
} |
||||
|
|
||||
|
public void setUrl(String url) { |
||||
|
this.url = url == null ? null : url.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code == null ? null : code.trim(); |
||||
|
} |
||||
|
|
||||
|
public Long getProjectId() { |
||||
|
return projectId; |
||||
|
} |
||||
|
|
||||
|
public void setProjectId(Long projectId) { |
||||
|
this.projectId = projectId; |
||||
|
} |
||||
|
|
||||
|
public Long getRoleId() { |
||||
|
return roleId; |
||||
|
} |
||||
|
|
||||
|
public void setRoleId(Long roleId) { |
||||
|
this.roleId = roleId; |
||||
|
} |
||||
|
|
||||
|
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(", userId=").append(userId); |
||||
|
sb.append(", url=").append(url); |
||||
|
sb.append(", code=").append(code); |
||||
|
sb.append(", projectId=").append(projectId); |
||||
|
sb.append(", roleId=").append(roleId); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", recStatus=").append(recStatus); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,761 @@ |
|||||
|
package com.ccsens.common.bean.po; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
public class ProProjectShareExample { |
||||
|
protected String orderByClause; |
||||
|
|
||||
|
protected boolean distinct; |
||||
|
|
||||
|
protected List<Criteria> oredCriteria; |
||||
|
|
||||
|
public ProProjectShareExample() { |
||||
|
oredCriteria = new ArrayList<Criteria>(); |
||||
|
} |
||||
|
|
||||
|
public void setOrderByClause(String orderByClause) { |
||||
|
this.orderByClause = orderByClause; |
||||
|
} |
||||
|
|
||||
|
public String getOrderByClause() { |
||||
|
return orderByClause; |
||||
|
} |
||||
|
|
||||
|
public void setDistinct(boolean distinct) { |
||||
|
this.distinct = distinct; |
||||
|
} |
||||
|
|
||||
|
public boolean isDistinct() { |
||||
|
return distinct; |
||||
|
} |
||||
|
|
||||
|
public List<Criteria> getOredCriteria() { |
||||
|
return oredCriteria; |
||||
|
} |
||||
|
|
||||
|
public void or(Criteria criteria) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
|
||||
|
public Criteria or() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
oredCriteria.add(criteria); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public Criteria createCriteria() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
if (oredCriteria.size() == 0) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
protected Criteria createCriteriaInternal() { |
||||
|
Criteria criteria = new Criteria(); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public void clear() { |
||||
|
oredCriteria.clear(); |
||||
|
orderByClause = null; |
||||
|
distinct = false; |
||||
|
} |
||||
|
|
||||
|
protected abstract static class GeneratedCriteria { |
||||
|
protected List<Criterion> criteria; |
||||
|
|
||||
|
protected GeneratedCriteria() { |
||||
|
super(); |
||||
|
criteria = new ArrayList<Criterion>(); |
||||
|
} |
||||
|
|
||||
|
public boolean isValid() { |
||||
|
return criteria.size() > 0; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getAllCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition) { |
||||
|
if (condition == null) { |
||||
|
throw new RuntimeException("Value for condition cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value, String property) { |
||||
|
if (value == null) { |
||||
|
throw new RuntimeException("Value for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
||||
|
if (value1 == null || value2 == null) { |
||||
|
throw new RuntimeException("Between values for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value1, value2)); |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNull() { |
||||
|
addCriterion("id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNotNull() { |
||||
|
addCriterion("id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdEqualTo(Long value) { |
||||
|
addCriterion("id =", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotEqualTo(Long value) { |
||||
|
addCriterion("id <>", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThan(Long value) { |
||||
|
addCriterion("id >", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("id >=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThan(Long value) { |
||||
|
addCriterion("id <", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("id <=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIn(List<Long> values) { |
||||
|
addCriterion("id in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotIn(List<Long> values) { |
||||
|
addCriterion("id not in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("id between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("id not between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIsNull() { |
||||
|
addCriterion("user_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIsNotNull() { |
||||
|
addCriterion("user_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdEqualTo(Long value) { |
||||
|
addCriterion("user_id =", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotEqualTo(Long value) { |
||||
|
addCriterion("user_id <>", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdGreaterThan(Long value) { |
||||
|
addCriterion("user_id >", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("user_id >=", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdLessThan(Long value) { |
||||
|
addCriterion("user_id <", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("user_id <=", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIn(List<Long> values) { |
||||
|
addCriterion("user_id in", values, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotIn(List<Long> values) { |
||||
|
addCriterion("user_id not in", values, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("user_id between", value1, value2, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("user_id not between", value1, value2, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlIsNull() { |
||||
|
addCriterion("url is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlIsNotNull() { |
||||
|
addCriterion("url is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlEqualTo(String value) { |
||||
|
addCriterion("url =", value, "url"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlNotEqualTo(String value) { |
||||
|
addCriterion("url <>", value, "url"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlGreaterThan(String value) { |
||||
|
addCriterion("url >", value, "url"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("url >=", value, "url"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlLessThan(String value) { |
||||
|
addCriterion("url <", value, "url"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlLessThanOrEqualTo(String value) { |
||||
|
addCriterion("url <=", value, "url"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlLike(String value) { |
||||
|
addCriterion("url like", value, "url"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlNotLike(String value) { |
||||
|
addCriterion("url not like", value, "url"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlIn(List<String> values) { |
||||
|
addCriterion("url in", values, "url"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlNotIn(List<String> values) { |
||||
|
addCriterion("url not in", values, "url"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlBetween(String value1, String value2) { |
||||
|
addCriterion("url between", value1, value2, "url"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUrlNotBetween(String value1, String value2) { |
||||
|
addCriterion("url not between", value1, value2, "url"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeIsNull() { |
||||
|
addCriterion("code is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeIsNotNull() { |
||||
|
addCriterion("code is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeEqualTo(String value) { |
||||
|
addCriterion("code =", value, "code"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeNotEqualTo(String value) { |
||||
|
addCriterion("code <>", value, "code"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeGreaterThan(String value) { |
||||
|
addCriterion("code >", value, "code"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("code >=", value, "code"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeLessThan(String value) { |
||||
|
addCriterion("code <", value, "code"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeLessThanOrEqualTo(String value) { |
||||
|
addCriterion("code <=", value, "code"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeLike(String value) { |
||||
|
addCriterion("code like", value, "code"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeNotLike(String value) { |
||||
|
addCriterion("code not like", value, "code"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeIn(List<String> values) { |
||||
|
addCriterion("code in", values, "code"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeNotIn(List<String> values) { |
||||
|
addCriterion("code not in", values, "code"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeBetween(String value1, String value2) { |
||||
|
addCriterion("code between", value1, value2, "code"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCodeNotBetween(String value1, String value2) { |
||||
|
addCriterion("code not between", value1, value2, "code"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andProjectIdIsNull() { |
||||
|
addCriterion("project_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andProjectIdIsNotNull() { |
||||
|
addCriterion("project_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andProjectIdEqualTo(Long value) { |
||||
|
addCriterion("project_id =", value, "projectId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andProjectIdNotEqualTo(Long value) { |
||||
|
addCriterion("project_id <>", value, "projectId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andProjectIdGreaterThan(Long value) { |
||||
|
addCriterion("project_id >", value, "projectId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("project_id >=", value, "projectId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andProjectIdLessThan(Long value) { |
||||
|
addCriterion("project_id <", value, "projectId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andProjectIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("project_id <=", value, "projectId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andProjectIdIn(List<Long> values) { |
||||
|
addCriterion("project_id in", values, "projectId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andProjectIdNotIn(List<Long> values) { |
||||
|
addCriterion("project_id not in", values, "projectId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andProjectIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("project_id between", value1, value2, "projectId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andProjectIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("project_id not between", value1, value2, "projectId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria 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<Long> values) { |
||||
|
addCriterion("role_id in", values, "roleId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRoleIdNotIn(List<Long> 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 andCreatedAtIsNull() { |
||||
|
addCriterion("created_at is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIsNotNull() { |
||||
|
addCriterion("created_at is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtEqualTo(Date value) { |
||||
|
addCriterion("created_at =", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotEqualTo(Date value) { |
||||
|
addCriterion("created_at <>", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtGreaterThan(Date value) { |
||||
|
addCriterion("created_at >", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { |
||||
|
addCriterion("created_at >=", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtLessThan(Date value) { |
||||
|
addCriterion("created_at <", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtLessThanOrEqualTo(Date value) { |
||||
|
addCriterion("created_at <=", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIn(List<Date> values) { |
||||
|
addCriterion("created_at in", values, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotIn(List<Date> values) { |
||||
|
addCriterion("created_at not in", values, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtBetween(Date value1, Date value2) { |
||||
|
addCriterion("created_at between", value1, value2, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotBetween(Date value1, Date value2) { |
||||
|
addCriterion("created_at not between", value1, value2, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIsNull() { |
||||
|
addCriterion("updated_at is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIsNotNull() { |
||||
|
addCriterion("updated_at is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtEqualTo(Date value) { |
||||
|
addCriterion("updated_at =", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotEqualTo(Date value) { |
||||
|
addCriterion("updated_at <>", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtGreaterThan(Date value) { |
||||
|
addCriterion("updated_at >", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { |
||||
|
addCriterion("updated_at >=", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtLessThan(Date value) { |
||||
|
addCriterion("updated_at <", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { |
||||
|
addCriterion("updated_at <=", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIn(List<Date> values) { |
||||
|
addCriterion("updated_at in", values, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotIn(List<Date> values) { |
||||
|
addCriterion("updated_at not in", values, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtBetween(Date value1, Date value2) { |
||||
|
addCriterion("updated_at between", value1, value2, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { |
||||
|
addCriterion("updated_at not between", value1, value2, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusIsNull() { |
||||
|
addCriterion("rec_status is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusIsNotNull() { |
||||
|
addCriterion("rec_status is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusEqualTo(Byte value) { |
||||
|
addCriterion("rec_status =", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusNotEqualTo(Byte value) { |
||||
|
addCriterion("rec_status <>", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusGreaterThan(Byte value) { |
||||
|
addCriterion("rec_status >", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { |
||||
|
addCriterion("rec_status >=", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusLessThan(Byte value) { |
||||
|
addCriterion("rec_status <", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusLessThanOrEqualTo(Byte value) { |
||||
|
addCriterion("rec_status <=", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusIn(List<Byte> values) { |
||||
|
addCriterion("rec_status in", values, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusNotIn(List<Byte> values) { |
||||
|
addCriterion("rec_status not in", values, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("rec_status between", value1, value2, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("rec_status not between", value1, value2, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static class Criteria extends GeneratedCriteria { |
||||
|
|
||||
|
protected Criteria() { |
||||
|
super(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static class Criterion { |
||||
|
private String condition; |
||||
|
|
||||
|
private Object value; |
||||
|
|
||||
|
private Object secondValue; |
||||
|
|
||||
|
private boolean noValue; |
||||
|
|
||||
|
private boolean singleValue; |
||||
|
|
||||
|
private boolean betweenValue; |
||||
|
|
||||
|
private boolean listValue; |
||||
|
|
||||
|
private String typeHandler; |
||||
|
|
||||
|
public String getCondition() { |
||||
|
return condition; |
||||
|
} |
||||
|
|
||||
|
public Object getValue() { |
||||
|
return value; |
||||
|
} |
||||
|
|
||||
|
public Object getSecondValue() { |
||||
|
return secondValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isNoValue() { |
||||
|
return noValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isSingleValue() { |
||||
|
return singleValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isBetweenValue() { |
||||
|
return betweenValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isListValue() { |
||||
|
return listValue; |
||||
|
} |
||||
|
|
||||
|
public String getTypeHandler() { |
||||
|
return typeHandler; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.typeHandler = null; |
||||
|
this.noValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.typeHandler = typeHandler; |
||||
|
if (value instanceof List<?>) { |
||||
|
this.listValue = true; |
||||
|
} else { |
||||
|
this.singleValue = true; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value) { |
||||
|
this(condition, value, null); |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.secondValue = secondValue; |
||||
|
this.typeHandler = typeHandler; |
||||
|
this.betweenValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue) { |
||||
|
this(condition, value, secondValue, null); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,106 @@ |
|||||
|
package com.ccsens.common.bean.po; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class ProShareMember implements Serializable { |
||||
|
private Long id; |
||||
|
|
||||
|
private Long userId; |
||||
|
|
||||
|
private Long shareId; |
||||
|
|
||||
|
private Long memberId; |
||||
|
|
||||
|
private Byte type; |
||||
|
|
||||
|
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 getUserId() { |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
public void setUserId(Long userId) { |
||||
|
this.userId = userId; |
||||
|
} |
||||
|
|
||||
|
public Long getShareId() { |
||||
|
return shareId; |
||||
|
} |
||||
|
|
||||
|
public void setShareId(Long shareId) { |
||||
|
this.shareId = shareId; |
||||
|
} |
||||
|
|
||||
|
public Long getMemberId() { |
||||
|
return memberId; |
||||
|
} |
||||
|
|
||||
|
public void setMemberId(Long memberId) { |
||||
|
this.memberId = memberId; |
||||
|
} |
||||
|
|
||||
|
public Byte getType() { |
||||
|
return type; |
||||
|
} |
||||
|
|
||||
|
public void setType(Byte type) { |
||||
|
this.type = type; |
||||
|
} |
||||
|
|
||||
|
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(", userId=").append(userId); |
||||
|
sb.append(", shareId=").append(shareId); |
||||
|
sb.append(", memberId=").append(memberId); |
||||
|
sb.append(", type=").append(type); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", recStatus=").append(recStatus); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,681 @@ |
|||||
|
package com.ccsens.common.bean.po; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
public class ProShareMemberExample { |
||||
|
protected String orderByClause; |
||||
|
|
||||
|
protected boolean distinct; |
||||
|
|
||||
|
protected List<Criteria> oredCriteria; |
||||
|
|
||||
|
public ProShareMemberExample() { |
||||
|
oredCriteria = new ArrayList<Criteria>(); |
||||
|
} |
||||
|
|
||||
|
public void setOrderByClause(String orderByClause) { |
||||
|
this.orderByClause = orderByClause; |
||||
|
} |
||||
|
|
||||
|
public String getOrderByClause() { |
||||
|
return orderByClause; |
||||
|
} |
||||
|
|
||||
|
public void setDistinct(boolean distinct) { |
||||
|
this.distinct = distinct; |
||||
|
} |
||||
|
|
||||
|
public boolean isDistinct() { |
||||
|
return distinct; |
||||
|
} |
||||
|
|
||||
|
public List<Criteria> getOredCriteria() { |
||||
|
return oredCriteria; |
||||
|
} |
||||
|
|
||||
|
public void or(Criteria criteria) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
|
||||
|
public Criteria or() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
oredCriteria.add(criteria); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public Criteria createCriteria() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
if (oredCriteria.size() == 0) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
protected Criteria createCriteriaInternal() { |
||||
|
Criteria criteria = new Criteria(); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public void clear() { |
||||
|
oredCriteria.clear(); |
||||
|
orderByClause = null; |
||||
|
distinct = false; |
||||
|
} |
||||
|
|
||||
|
protected abstract static class GeneratedCriteria { |
||||
|
protected List<Criterion> criteria; |
||||
|
|
||||
|
protected GeneratedCriteria() { |
||||
|
super(); |
||||
|
criteria = new ArrayList<Criterion>(); |
||||
|
} |
||||
|
|
||||
|
public boolean isValid() { |
||||
|
return criteria.size() > 0; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getAllCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition) { |
||||
|
if (condition == null) { |
||||
|
throw new RuntimeException("Value for condition cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value, String property) { |
||||
|
if (value == null) { |
||||
|
throw new RuntimeException("Value for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
||||
|
if (value1 == null || value2 == null) { |
||||
|
throw new RuntimeException("Between values for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value1, value2)); |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNull() { |
||||
|
addCriterion("id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNotNull() { |
||||
|
addCriterion("id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdEqualTo(Long value) { |
||||
|
addCriterion("id =", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotEqualTo(Long value) { |
||||
|
addCriterion("id <>", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThan(Long value) { |
||||
|
addCriterion("id >", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("id >=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThan(Long value) { |
||||
|
addCriterion("id <", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("id <=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIn(List<Long> values) { |
||||
|
addCriterion("id in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotIn(List<Long> values) { |
||||
|
addCriterion("id not in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("id between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("id not between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIsNull() { |
||||
|
addCriterion("user_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIsNotNull() { |
||||
|
addCriterion("user_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdEqualTo(Long value) { |
||||
|
addCriterion("user_id =", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotEqualTo(Long value) { |
||||
|
addCriterion("user_id <>", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdGreaterThan(Long value) { |
||||
|
addCriterion("user_id >", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("user_id >=", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdLessThan(Long value) { |
||||
|
addCriterion("user_id <", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("user_id <=", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIn(List<Long> values) { |
||||
|
addCriterion("user_id in", values, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotIn(List<Long> values) { |
||||
|
addCriterion("user_id not in", values, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("user_id between", value1, value2, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("user_id not between", value1, value2, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andShareIdIsNull() { |
||||
|
addCriterion("share_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andShareIdIsNotNull() { |
||||
|
addCriterion("share_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andShareIdEqualTo(Long value) { |
||||
|
addCriterion("share_id =", value, "shareId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andShareIdNotEqualTo(Long value) { |
||||
|
addCriterion("share_id <>", value, "shareId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andShareIdGreaterThan(Long value) { |
||||
|
addCriterion("share_id >", value, "shareId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andShareIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("share_id >=", value, "shareId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andShareIdLessThan(Long value) { |
||||
|
addCriterion("share_id <", value, "shareId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andShareIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("share_id <=", value, "shareId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andShareIdIn(List<Long> values) { |
||||
|
addCriterion("share_id in", values, "shareId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andShareIdNotIn(List<Long> values) { |
||||
|
addCriterion("share_id not in", values, "shareId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andShareIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("share_id between", value1, value2, "shareId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andShareIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("share_id not between", value1, value2, "shareId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andMemberIdIsNull() { |
||||
|
addCriterion("member_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andMemberIdIsNotNull() { |
||||
|
addCriterion("member_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andMemberIdEqualTo(Long value) { |
||||
|
addCriterion("member_id =", value, "memberId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andMemberIdNotEqualTo(Long value) { |
||||
|
addCriterion("member_id <>", value, "memberId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andMemberIdGreaterThan(Long value) { |
||||
|
addCriterion("member_id >", value, "memberId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andMemberIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("member_id >=", value, "memberId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andMemberIdLessThan(Long value) { |
||||
|
addCriterion("member_id <", value, "memberId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andMemberIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("member_id <=", value, "memberId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andMemberIdIn(List<Long> values) { |
||||
|
addCriterion("member_id in", values, "memberId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andMemberIdNotIn(List<Long> values) { |
||||
|
addCriterion("member_id not in", values, "memberId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andMemberIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("member_id between", value1, value2, "memberId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andMemberIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("member_id not between", value1, value2, "memberId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTypeIsNull() { |
||||
|
addCriterion("type is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTypeIsNotNull() { |
||||
|
addCriterion("type is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTypeEqualTo(Byte value) { |
||||
|
addCriterion("type =", value, "type"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTypeNotEqualTo(Byte value) { |
||||
|
addCriterion("type <>", value, "type"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTypeGreaterThan(Byte value) { |
||||
|
addCriterion("type >", value, "type"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTypeGreaterThanOrEqualTo(Byte value) { |
||||
|
addCriterion("type >=", value, "type"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTypeLessThan(Byte value) { |
||||
|
addCriterion("type <", value, "type"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTypeLessThanOrEqualTo(Byte value) { |
||||
|
addCriterion("type <=", value, "type"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTypeIn(List<Byte> values) { |
||||
|
addCriterion("type in", values, "type"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTypeNotIn(List<Byte> values) { |
||||
|
addCriterion("type not in", values, "type"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTypeBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("type between", value1, value2, "type"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTypeNotBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("type not between", value1, value2, "type"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIsNull() { |
||||
|
addCriterion("created_at is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIsNotNull() { |
||||
|
addCriterion("created_at is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtEqualTo(Date value) { |
||||
|
addCriterion("created_at =", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotEqualTo(Date value) { |
||||
|
addCriterion("created_at <>", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtGreaterThan(Date value) { |
||||
|
addCriterion("created_at >", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { |
||||
|
addCriterion("created_at >=", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtLessThan(Date value) { |
||||
|
addCriterion("created_at <", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtLessThanOrEqualTo(Date value) { |
||||
|
addCriterion("created_at <=", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIn(List<Date> values) { |
||||
|
addCriterion("created_at in", values, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotIn(List<Date> values) { |
||||
|
addCriterion("created_at not in", values, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtBetween(Date value1, Date value2) { |
||||
|
addCriterion("created_at between", value1, value2, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotBetween(Date value1, Date value2) { |
||||
|
addCriterion("created_at not between", value1, value2, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIsNull() { |
||||
|
addCriterion("updated_at is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIsNotNull() { |
||||
|
addCriterion("updated_at is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtEqualTo(Date value) { |
||||
|
addCriterion("updated_at =", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotEqualTo(Date value) { |
||||
|
addCriterion("updated_at <>", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtGreaterThan(Date value) { |
||||
|
addCriterion("updated_at >", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { |
||||
|
addCriterion("updated_at >=", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtLessThan(Date value) { |
||||
|
addCriterion("updated_at <", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { |
||||
|
addCriterion("updated_at <=", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIn(List<Date> values) { |
||||
|
addCriterion("updated_at in", values, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotIn(List<Date> values) { |
||||
|
addCriterion("updated_at not in", values, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtBetween(Date value1, Date value2) { |
||||
|
addCriterion("updated_at between", value1, value2, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { |
||||
|
addCriterion("updated_at not between", value1, value2, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusIsNull() { |
||||
|
addCriterion("rec_status is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusIsNotNull() { |
||||
|
addCriterion("rec_status is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusEqualTo(Byte value) { |
||||
|
addCriterion("rec_status =", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusNotEqualTo(Byte value) { |
||||
|
addCriterion("rec_status <>", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusGreaterThan(Byte value) { |
||||
|
addCriterion("rec_status >", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { |
||||
|
addCriterion("rec_status >=", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusLessThan(Byte value) { |
||||
|
addCriterion("rec_status <", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusLessThanOrEqualTo(Byte value) { |
||||
|
addCriterion("rec_status <=", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusIn(List<Byte> values) { |
||||
|
addCriterion("rec_status in", values, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusNotIn(List<Byte> values) { |
||||
|
addCriterion("rec_status not in", values, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("rec_status between", value1, value2, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("rec_status not between", value1, value2, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static class Criteria extends GeneratedCriteria { |
||||
|
|
||||
|
protected Criteria() { |
||||
|
super(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static class Criterion { |
||||
|
private String condition; |
||||
|
|
||||
|
private Object value; |
||||
|
|
||||
|
private Object secondValue; |
||||
|
|
||||
|
private boolean noValue; |
||||
|
|
||||
|
private boolean singleValue; |
||||
|
|
||||
|
private boolean betweenValue; |
||||
|
|
||||
|
private boolean listValue; |
||||
|
|
||||
|
private String typeHandler; |
||||
|
|
||||
|
public String getCondition() { |
||||
|
return condition; |
||||
|
} |
||||
|
|
||||
|
public Object getValue() { |
||||
|
return value; |
||||
|
} |
||||
|
|
||||
|
public Object getSecondValue() { |
||||
|
return secondValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isNoValue() { |
||||
|
return noValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isSingleValue() { |
||||
|
return singleValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isBetweenValue() { |
||||
|
return betweenValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isListValue() { |
||||
|
return listValue; |
||||
|
} |
||||
|
|
||||
|
public String getTypeHandler() { |
||||
|
return typeHandler; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.typeHandler = null; |
||||
|
this.noValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.typeHandler = typeHandler; |
||||
|
if (value instanceof List<?>) { |
||||
|
this.listValue = true; |
||||
|
} else { |
||||
|
this.singleValue = true; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value) { |
||||
|
this(condition, value, null); |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.secondValue = secondValue; |
||||
|
this.typeHandler = typeHandler; |
||||
|
this.betweenValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue) { |
||||
|
this(condition, value, secondValue, null); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
package com.ccsens.common.bean.vo; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
|
||||
|
/** |
||||
|
* @author AUSU |
||||
|
*/ |
||||
|
@Data |
||||
|
public class CShareVo { |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("分享链接") |
||||
|
public static class CreateShareUrl{ |
||||
|
@ApiModelProperty("分享链接id") |
||||
|
private Long shareId; |
||||
|
@ApiModelProperty("链接") |
||||
|
private String path; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("点击分享链接返回值") |
||||
|
public static class ClickShareInfo { |
||||
|
@ApiModelProperty("项目id") |
||||
|
private Long projectId; |
||||
|
@ApiModelProperty("角色id") |
||||
|
private Long roleId; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,21 @@ |
|||||
|
package com.ccsens.common.persist.dao; |
||||
|
|
||||
|
import com.ccsens.common.bean.po.ProProjectShare; |
||||
|
import com.ccsens.common.bean.vo.CShareVo; |
||||
|
import com.ccsens.common.persist.mapper.ProProjectShareMapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
/** |
||||
|
* @author AUSU |
||||
|
*/ |
||||
|
@Repository |
||||
|
public interface ProProjectShareDao extends ProProjectShareMapper { |
||||
|
|
||||
|
/** |
||||
|
* 根据md5查询分享链接 |
||||
|
* @param md5Code md5code |
||||
|
* @return 分享链接信息 |
||||
|
*/ |
||||
|
ProProjectShare queryShareByMd5(@Param("code") String md5Code); |
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
package com.ccsens.common.persist.dao; |
||||
|
|
||||
|
import com.ccsens.common.bean.po.ProShareMember; |
||||
|
import com.ccsens.common.persist.mapper.ProShareMemberMapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
@Repository |
||||
|
public interface ProShareMemberDao extends ProShareMemberMapper { |
||||
|
/** |
||||
|
* 根据链接id和用户id查询被分享信息 |
||||
|
* @param id 链接id |
||||
|
* @param userId 用户id |
||||
|
* @return 点击链接成员信息 |
||||
|
*/ |
||||
|
ProShareMember queryIsRepeat(@Param("shareId") Long id,@Param("userId") Long userId); |
||||
|
|
||||
|
/** |
||||
|
* 根据成员id和用户类型查找用户 |
||||
|
* @param userOfMemberId 成员id |
||||
|
* @param type 用户类型 |
||||
|
* @return 记录信息 |
||||
|
*/ |
||||
|
ProShareMember queryByMemberIdAndType(@Param("memberId") Long userOfMemberId,@Param("type") Byte type); |
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package com.ccsens.common.persist.mapper; |
||||
|
|
||||
|
import com.ccsens.common.bean.po.ProProjectShare; |
||||
|
import com.ccsens.common.bean.po.ProProjectShareExample; |
||||
|
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
public interface ProProjectShareMapper { |
||||
|
long countByExample(ProProjectShareExample example); |
||||
|
|
||||
|
int deleteByExample(ProProjectShareExample example); |
||||
|
|
||||
|
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
|
int insert(ProProjectShare record); |
||||
|
|
||||
|
int insertSelective(ProProjectShare record); |
||||
|
|
||||
|
List<ProProjectShare> selectByExample(ProProjectShareExample example); |
||||
|
|
||||
|
ProProjectShare selectByPrimaryKey(Long id); |
||||
|
|
||||
|
int updateByExampleSelective(@Param("record") ProProjectShare record, @Param("example") ProProjectShareExample example); |
||||
|
|
||||
|
int updateByExample(@Param("record") ProProjectShare record, @Param("example") ProProjectShareExample example); |
||||
|
|
||||
|
int updateByPrimaryKeySelective(ProProjectShare record); |
||||
|
|
||||
|
int updateByPrimaryKey(ProProjectShare record); |
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package com.ccsens.common.persist.mapper; |
||||
|
|
||||
|
import com.ccsens.common.bean.po.ProShareMember; |
||||
|
import com.ccsens.common.bean.po.ProShareMemberExample; |
||||
|
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
public interface ProShareMemberMapper { |
||||
|
long countByExample(ProShareMemberExample example); |
||||
|
|
||||
|
int deleteByExample(ProShareMemberExample example); |
||||
|
|
||||
|
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
|
int insert(ProShareMember record); |
||||
|
|
||||
|
int insertSelective(ProShareMember record); |
||||
|
|
||||
|
List<ProShareMember> selectByExample(ProShareMemberExample example); |
||||
|
|
||||
|
ProShareMember selectByPrimaryKey(Long id); |
||||
|
|
||||
|
int updateByExampleSelective(@Param("record") ProShareMember record, @Param("example") ProShareMemberExample example); |
||||
|
|
||||
|
int updateByExample(@Param("record") ProShareMember record, @Param("example") ProShareMemberExample example); |
||||
|
|
||||
|
int updateByPrimaryKeySelective(ProShareMember record); |
||||
|
|
||||
|
int updateByPrimaryKey(ProShareMember record); |
||||
|
} |
||||
@ -0,0 +1,26 @@ |
|||||
|
package com.ccsens.common.service; |
||||
|
|
||||
|
import com.ccsens.common.bean.dto.CShareDto; |
||||
|
import com.ccsens.common.bean.vo.CShareVo; |
||||
|
|
||||
|
/** |
||||
|
* @author AUSU |
||||
|
*/ |
||||
|
public interface IShareService { |
||||
|
|
||||
|
/** |
||||
|
* 生成分享链接 |
||||
|
* @param param 参数 |
||||
|
* @param userId 用户id |
||||
|
* @return 分享链接信息 |
||||
|
*/ |
||||
|
CShareVo.CreateShareUrl createShareUrl(CShareDto.CreateShareUrl param,Long userId); |
||||
|
|
||||
|
/** |
||||
|
* 点击分享链接 |
||||
|
* @param param 参数 |
||||
|
* @param userId 用户id |
||||
|
* @return 项目和角色id |
||||
|
*/ |
||||
|
CShareVo.ClickShareInfo clickShareUrl(CShareDto.ClickShareUrl param,Long userId,String userName,String phone); |
||||
|
} |
||||
@ -0,0 +1,141 @@ |
|||||
|
package com.ccsens.common.service; |
||||
|
|
||||
|
import cn.hutool.core.lang.Snowflake; |
||||
|
import cn.hutool.core.util.ObjectUtil; |
||||
|
import com.ccsens.cloudutil.bean.tall.dto.ProjectDto; |
||||
|
import com.ccsens.cloudutil.feign.Tall3FeignClient; |
||||
|
import com.ccsens.common.bean.dto.CShareDto; |
||||
|
import com.ccsens.common.bean.po.ProMember; |
||||
|
import com.ccsens.common.bean.po.ProProjectShare; |
||||
|
import com.ccsens.common.bean.po.ProRoleMember; |
||||
|
import com.ccsens.common.bean.po.ProShareMember; |
||||
|
import com.ccsens.common.bean.vo.CShareVo; |
||||
|
import com.ccsens.common.persist.dao.*; |
||||
|
import com.ccsens.common.util.CommonCodeError; |
||||
|
import com.ccsens.util.Md5Util; |
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.cloud.openfeign.FeignClient; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Propagation; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author AUSU |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) |
||||
|
public class ShareService implements IShareService{ |
||||
|
|
||||
|
@Resource |
||||
|
private ProProjectShareDao projectShareDao; |
||||
|
@Resource |
||||
|
private ProShareMemberDao shareMemberDao; |
||||
|
@Resource |
||||
|
private ProMemberDao memberDao; |
||||
|
@Resource |
||||
|
private ProRoleMemberDao roleMemberDao; |
||||
|
@Resource |
||||
|
private Snowflake snowflake; |
||||
|
@Resource |
||||
|
private Tall3FeignClient tall3FeignClient; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public CShareVo.CreateShareUrl createShareUrl(CShareDto.CreateShareUrl param, Long userId) { |
||||
|
String md5Code = Md5Util.stringTo("" + param.getProjectId() + param.getRoleId() + userId); |
||||
|
CShareVo.CreateShareUrl shareUrl = new CShareVo.CreateShareUrl(); |
||||
|
ProProjectShare projectShare = projectShareDao.queryShareByMd5(md5Code); |
||||
|
if (ObjectUtil.isNotNull(projectShare)) { |
||||
|
shareUrl.setShareId(projectShare.getId()); |
||||
|
shareUrl.setPath(projectShare.getUrl()); |
||||
|
return shareUrl; |
||||
|
} |
||||
|
|
||||
|
//创建新的链接
|
||||
|
ProProjectShare proProjectShare = new ProProjectShare(); |
||||
|
proProjectShare.setId(snowflake.nextId()); |
||||
|
proProjectShare.setUserId(userId); |
||||
|
proProjectShare.setUrl(param.getPath()+"&shareId="+md5Code); |
||||
|
proProjectShare.setCode(md5Code); |
||||
|
proProjectShare.setProjectId(param.getProjectId()); |
||||
|
proProjectShare.setRoleId(param.getRoleId()); |
||||
|
projectShareDao.insertSelective(proProjectShare); |
||||
|
shareUrl.setShareId(proProjectShare.getId()); |
||||
|
shareUrl.setPath(proProjectShare.getUrl()); |
||||
|
return shareUrl; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public CShareVo.ClickShareInfo clickShareUrl(CShareDto.ClickShareUrl param, Long userId,String userName,String phone) { |
||||
|
ProProjectShare projectShare = projectShareDao.queryShareByMd5(param.getCode()); |
||||
|
if (ObjectUtil.isNull(projectShare)) { |
||||
|
throw new BaseException(CommonCodeError.SHARE_URL_ERROR); |
||||
|
} |
||||
|
//返回值
|
||||
|
CShareVo.ClickShareInfo clickShareInfo = new CShareVo.ClickShareInfo(); |
||||
|
clickShareInfo.setProjectId(projectShare.getProjectId()); |
||||
|
clickShareInfo.setRoleId(projectShare.getRoleId()); |
||||
|
//查询是否点击过链接
|
||||
|
ProShareMember shareMember = shareMemberDao.queryIsRepeat(projectShare.getId(),userId); |
||||
|
if (ObjectUtil.isNotNull(shareMember)) { |
||||
|
return clickShareInfo; |
||||
|
} |
||||
|
|
||||
|
//查询用户是否项目原来成员
|
||||
|
Long userOfMemberId = memberDao.findUserOfMemberId(projectShare.getProjectId(), userId); |
||||
|
//新成员
|
||||
|
if (ObjectUtil.isNull(userOfMemberId)) { |
||||
|
ProMember member = new ProMember(); |
||||
|
member.setId(snowflake.nextId()); |
||||
|
member.setUserId(userId); |
||||
|
member.setProjectId(projectShare.getProjectId()); |
||||
|
member.setName(userName); |
||||
|
member.setPhone(phone); |
||||
|
memberDao.insertSelective(member); |
||||
|
ProRoleMember roleMember = new ProRoleMember(); |
||||
|
roleMember.setId(snowflake.nextId()); |
||||
|
roleMember.setRoleId(projectShare.getRoleId()); |
||||
|
roleMember.setMemberId(member.getId()); |
||||
|
roleMemberDao.insertSelective(roleMember); |
||||
|
ProShareMember newShareMember = new ProShareMember(); |
||||
|
newShareMember.setId(snowflake.nextId()); |
||||
|
newShareMember.setUserId(userId); |
||||
|
newShareMember.setShareId(projectShare.getId()); |
||||
|
newShareMember.setMemberId(member.getId()); |
||||
|
newShareMember.setType((byte) 0); |
||||
|
shareMemberDao.insertSelective(newShareMember); |
||||
|
ProjectDto.SaveUserProject userProject = new ProjectDto.SaveUserProject(); |
||||
|
userProject.setProjectId(projectShare.getProjectId()); |
||||
|
userProject.setUserId(userId); |
||||
|
tall3FeignClient.saveUserProject(userProject); |
||||
|
return clickShareInfo; |
||||
|
} |
||||
|
|
||||
|
//有数据并且角色已存在
|
||||
|
ProRoleMember roleMember = roleMemberDao.queryByRoleAndMember(userOfMemberId,projectShare.getRoleId()); |
||||
|
if (ObjectUtil.isNotNull(roleMember)) { |
||||
|
return clickShareInfo; |
||||
|
} |
||||
|
//有数据但是角色不存在
|
||||
|
ProShareMember proShareMember = new ProShareMember(); |
||||
|
proShareMember.setId(snowflake.nextId()); |
||||
|
proShareMember.setMemberId(userOfMemberId); |
||||
|
proShareMember.setShareId(projectShare.getId()); |
||||
|
proShareMember.setUserId(userId); |
||||
|
Byte type = 0; |
||||
|
ProShareMember typeOfZero = shareMemberDao.queryByMemberIdAndType(userOfMemberId,type); |
||||
|
if (ObjectUtil.isNotNull(typeOfZero)){ |
||||
|
proShareMember.setType((byte)0); |
||||
|
}else{ |
||||
|
proShareMember.setType((byte)1); |
||||
|
} |
||||
|
shareMemberDao.insertSelective(proShareMember); |
||||
|
return clickShareInfo; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.ccsens.common.persist.dao.ProProjectShareDao"> |
||||
|
|
||||
|
<select id="queryShareByMd5" resultType="com.ccsens.common.bean.po.ProProjectShare"> |
||||
|
SELECT |
||||
|
id, |
||||
|
user_id, |
||||
|
url, |
||||
|
`code`, |
||||
|
project_id, |
||||
|
role_id |
||||
|
FROM |
||||
|
t_pro_project_share |
||||
|
WHERE |
||||
|
rec_status = 0 |
||||
|
AND `code` = #{code} |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,35 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.ccsens.common.persist.dao.ProShareMemberDao"> |
||||
|
|
||||
|
<select id="queryIsRepeat" resultType="com.ccsens.common.bean.po.ProShareMember"> |
||||
|
SELECT |
||||
|
id, |
||||
|
user_id, |
||||
|
share_id, |
||||
|
member_id, |
||||
|
`type` |
||||
|
FROM |
||||
|
t_pro_share_member |
||||
|
WHERE |
||||
|
rec_status = 0 |
||||
|
AND user_id = #{userId} |
||||
|
AND share_id = #{shareId} |
||||
|
</select> |
||||
|
|
||||
|
<select id="queryByMemberIdAndType" resultType="com.ccsens.common.bean.po.ProShareMember"> |
||||
|
SELECT |
||||
|
id, |
||||
|
user_id, |
||||
|
share_id, |
||||
|
member_id, |
||||
|
type |
||||
|
FROM |
||||
|
t_pro_share_member |
||||
|
WHERE |
||||
|
rec_status = 0 |
||||
|
AND member_id = #{memberId} |
||||
|
AND `type` = #{type} |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,275 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.ccsens.common.persist.mapper.ProProjectShareMapper"> |
||||
|
<resultMap id="BaseResultMap" type="com.ccsens.common.bean.po.ProProjectShare"> |
||||
|
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
|
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
||||
|
<result column="url" jdbcType="VARCHAR" property="url" /> |
||||
|
<result column="code" jdbcType="VARCHAR" property="code" /> |
||||
|
<result column="project_id" jdbcType="BIGINT" property="projectId" /> |
||||
|
<result column="role_id" jdbcType="BIGINT" property="roleId" /> |
||||
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
||||
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
||||
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
||||
|
</resultMap> |
||||
|
<sql id="Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Update_By_Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Base_Column_List"> |
||||
|
id, user_id, url, code, project_id, role_id, created_at, updated_at, rec_status |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="com.ccsens.common.bean.po.ProProjectShareExample" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_pro_project_share |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
<if test="orderByClause != null"> |
||||
|
order by ${orderByClause} |
||||
|
</if> |
||||
|
</select> |
||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_pro_project_share |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
|
delete from t_pro_project_share |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="com.ccsens.common.bean.po.ProProjectShareExample"> |
||||
|
delete from t_pro_project_share |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="com.ccsens.common.bean.po.ProProjectShare"> |
||||
|
insert into t_pro_project_share (id, user_id, url, |
||||
|
code, project_id, role_id, |
||||
|
created_at, updated_at, rec_status |
||||
|
) |
||||
|
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{url,jdbcType=VARCHAR}, |
||||
|
#{code,jdbcType=VARCHAR}, #{projectId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}, |
||||
|
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} |
||||
|
) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="com.ccsens.common.bean.po.ProProjectShare"> |
||||
|
insert into t_pro_project_share |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
id, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
user_id, |
||||
|
</if> |
||||
|
<if test="url != null"> |
||||
|
url, |
||||
|
</if> |
||||
|
<if test="code != null"> |
||||
|
code, |
||||
|
</if> |
||||
|
<if test="projectId != null"> |
||||
|
project_id, |
||||
|
</if> |
||||
|
<if test="roleId != null"> |
||||
|
role_id, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
rec_status, |
||||
|
</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
#{id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
#{userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="url != null"> |
||||
|
#{url,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="code != null"> |
||||
|
#{code,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="projectId != null"> |
||||
|
#{projectId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="roleId != null"> |
||||
|
#{roleId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
#{createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
#{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
#{recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
<select id="countByExample" parameterType="com.ccsens.common.bean.po.ProProjectShareExample" resultType="java.lang.Long"> |
||||
|
select count(*) from t_pro_project_share |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
update t_pro_project_share |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.userId != null"> |
||||
|
user_id = #{record.userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.url != null"> |
||||
|
url = #{record.url,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.code != null"> |
||||
|
code = #{record.code,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.projectId != null"> |
||||
|
project_id = #{record.projectId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.roleId != null"> |
||||
|
role_id = #{record.roleId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.createdAt != null"> |
||||
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.updatedAt != null"> |
||||
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.recStatus != null"> |
||||
|
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByExample" parameterType="map"> |
||||
|
update t_pro_project_share |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
user_id = #{record.userId,jdbcType=BIGINT}, |
||||
|
url = #{record.url,jdbcType=VARCHAR}, |
||||
|
code = #{record.code,jdbcType=VARCHAR}, |
||||
|
project_id = #{record.projectId,jdbcType=BIGINT}, |
||||
|
role_id = #{record.roleId,jdbcType=BIGINT}, |
||||
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{record.recStatus,jdbcType=TINYINT} |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.common.bean.po.ProProjectShare"> |
||||
|
update t_pro_project_share |
||||
|
<set> |
||||
|
<if test="userId != null"> |
||||
|
user_id = #{userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="url != null"> |
||||
|
url = #{url,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="code != null"> |
||||
|
code = #{code,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="projectId != null"> |
||||
|
project_id = #{projectId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="roleId != null"> |
||||
|
role_id = #{roleId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.common.bean.po.ProProjectShare"> |
||||
|
update t_pro_project_share |
||||
|
set user_id = #{userId,jdbcType=BIGINT}, |
||||
|
url = #{url,jdbcType=VARCHAR}, |
||||
|
code = #{code,jdbcType=VARCHAR}, |
||||
|
project_id = #{projectId,jdbcType=BIGINT}, |
||||
|
role_id = #{roleId,jdbcType=BIGINT}, |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
</mapper> |
||||
@ -0,0 +1,258 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.ccsens.common.persist.mapper.ProShareMemberMapper"> |
||||
|
<resultMap id="BaseResultMap" type="com.ccsens.common.bean.po.ProShareMember"> |
||||
|
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
|
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
||||
|
<result column="share_id" jdbcType="BIGINT" property="shareId" /> |
||||
|
<result column="member_id" jdbcType="BIGINT" property="memberId" /> |
||||
|
<result column="type" jdbcType="TINYINT" property="type" /> |
||||
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
||||
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
||||
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
||||
|
</resultMap> |
||||
|
<sql id="Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Update_By_Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Base_Column_List"> |
||||
|
id, user_id, share_id, member_id, type, created_at, updated_at, rec_status |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="com.ccsens.common.bean.po.ProShareMemberExample" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_pro_share_member |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
<if test="orderByClause != null"> |
||||
|
order by ${orderByClause} |
||||
|
</if> |
||||
|
</select> |
||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_pro_share_member |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
|
delete from t_pro_share_member |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="com.ccsens.common.bean.po.ProShareMemberExample"> |
||||
|
delete from t_pro_share_member |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="com.ccsens.common.bean.po.ProShareMember"> |
||||
|
insert into t_pro_share_member (id, user_id, share_id, |
||||
|
member_id, type, created_at, |
||||
|
updated_at, rec_status) |
||||
|
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{shareId,jdbcType=BIGINT}, |
||||
|
#{memberId,jdbcType=BIGINT}, #{type,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="com.ccsens.common.bean.po.ProShareMember"> |
||||
|
insert into t_pro_share_member |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
id, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
user_id, |
||||
|
</if> |
||||
|
<if test="shareId != null"> |
||||
|
share_id, |
||||
|
</if> |
||||
|
<if test="memberId != null"> |
||||
|
member_id, |
||||
|
</if> |
||||
|
<if test="type != null"> |
||||
|
type, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
rec_status, |
||||
|
</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
#{id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
#{userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="shareId != null"> |
||||
|
#{shareId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="memberId != null"> |
||||
|
#{memberId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="type != null"> |
||||
|
#{type,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
#{createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
#{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
#{recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
<select id="countByExample" parameterType="com.ccsens.common.bean.po.ProShareMemberExample" resultType="java.lang.Long"> |
||||
|
select count(*) from t_pro_share_member |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
update t_pro_share_member |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.userId != null"> |
||||
|
user_id = #{record.userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.shareId != null"> |
||||
|
share_id = #{record.shareId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.memberId != null"> |
||||
|
member_id = #{record.memberId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.type != null"> |
||||
|
type = #{record.type,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="record.createdAt != null"> |
||||
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.updatedAt != null"> |
||||
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.recStatus != null"> |
||||
|
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByExample" parameterType="map"> |
||||
|
update t_pro_share_member |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
user_id = #{record.userId,jdbcType=BIGINT}, |
||||
|
share_id = #{record.shareId,jdbcType=BIGINT}, |
||||
|
member_id = #{record.memberId,jdbcType=BIGINT}, |
||||
|
type = #{record.type,jdbcType=TINYINT}, |
||||
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{record.recStatus,jdbcType=TINYINT} |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.common.bean.po.ProShareMember"> |
||||
|
update t_pro_share_member |
||||
|
<set> |
||||
|
<if test="userId != null"> |
||||
|
user_id = #{userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="shareId != null"> |
||||
|
share_id = #{shareId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="memberId != null"> |
||||
|
member_id = #{memberId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="type != null"> |
||||
|
type = #{type,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.common.bean.po.ProShareMember"> |
||||
|
update t_pro_share_member |
||||
|
set user_id = #{userId,jdbcType=BIGINT}, |
||||
|
share_id = #{shareId,jdbcType=BIGINT}, |
||||
|
member_id = #{memberId,jdbcType=BIGINT}, |
||||
|
type = #{type,jdbcType=TINYINT}, |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
</mapper> |
||||
@ -1,5 +1,5 @@ |
|||||
spring: |
spring: |
||||
profiles: |
profiles: |
||||
active: test |
active: dev |
||||
include: util-test,common |
include: util-dev,common |
||||
|
|
||||
|
|||||
Loading…
Reference in new issue