38 changed files with 2930 additions and 152 deletions
@ -0,0 +1,45 @@ |
|||
package com.ccsens.tall.bean.dto; |
|||
|
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotNull; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class RingDto { |
|||
|
|||
@Data |
|||
@ApiModel("发送ring消息") |
|||
public static class RingSendDto { |
|||
@NotNull(message = "项目id不能为空") |
|||
@ApiModelProperty("项目id") |
|||
private Long projectId; |
|||
@ApiModelProperty("消息内容") |
|||
private String value; |
|||
@ApiModelProperty("接收的角色的id") |
|||
private List<Long> roleList; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("查找ring消息") |
|||
public static class GetRingDto { |
|||
@NotNull(message = "项目id不能为空") |
|||
@ApiModelProperty("项目id") |
|||
private Long projectId; |
|||
@ApiModelProperty("页数") |
|||
private Integer page; |
|||
@ApiModelProperty("每页数量") |
|||
private Integer pageSize; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("将消息设为已读") |
|||
public static class MessageId { |
|||
@ApiModelProperty("项目id") |
|||
private Long projectId; |
|||
@ApiModelProperty("消息id") |
|||
private List<Long> messageIdList; |
|||
} |
|||
} |
@ -0,0 +1,117 @@ |
|||
package com.ccsens.tall.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class SysRingMsg implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long projectId; |
|||
|
|||
private String value; |
|||
|
|||
private Long senderId; |
|||
|
|||
private Long time; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private String valueText; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getProjectId() { |
|||
return projectId; |
|||
} |
|||
|
|||
public void setProjectId(Long projectId) { |
|||
this.projectId = projectId; |
|||
} |
|||
|
|||
public String getValue() { |
|||
return value; |
|||
} |
|||
|
|||
public void setValue(String value) { |
|||
this.value = value == null ? null : value.trim(); |
|||
} |
|||
|
|||
public Long getSenderId() { |
|||
return senderId; |
|||
} |
|||
|
|||
public void setSenderId(Long senderId) { |
|||
this.senderId = senderId; |
|||
} |
|||
|
|||
public Long getTime() { |
|||
return time; |
|||
} |
|||
|
|||
public void setTime(Long time) { |
|||
this.time = time; |
|||
} |
|||
|
|||
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; |
|||
} |
|||
|
|||
public String getValueText() { |
|||
return valueText; |
|||
} |
|||
|
|||
public void setValueText(String valueText) { |
|||
this.valueText = valueText == null ? null : valueText.trim(); |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
StringBuilder sb = new StringBuilder(); |
|||
sb.append(getClass().getSimpleName()); |
|||
sb.append(" ["); |
|||
sb.append("Hash = ").append(hashCode()); |
|||
sb.append(", id=").append(id); |
|||
sb.append(", projectId=").append(projectId); |
|||
sb.append(", value=").append(value); |
|||
sb.append(", senderId=").append(senderId); |
|||
sb.append(", time=").append(time); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append(", valueText=").append(valueText); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,691 @@ |
|||
package com.ccsens.tall.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class SysRingMsgExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public SysRingMsgExample() { |
|||
oredCriteria = new ArrayList<Criteria>(); |
|||
} |
|||
|
|||
public void setOrderByClause(String orderByClause) { |
|||
this.orderByClause = orderByClause; |
|||
} |
|||
|
|||
public String getOrderByClause() { |
|||
return orderByClause; |
|||
} |
|||
|
|||
public void setDistinct(boolean distinct) { |
|||
this.distinct = distinct; |
|||
} |
|||
|
|||
public boolean isDistinct() { |
|||
return distinct; |
|||
} |
|||
|
|||
public List<Criteria> getOredCriteria() { |
|||
return oredCriteria; |
|||
} |
|||
|
|||
public void or(Criteria criteria) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
|
|||
public Criteria or() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
oredCriteria.add(criteria); |
|||
return criteria; |
|||
} |
|||
|
|||
public Criteria createCriteria() { |
|||
Criteria criteria = createCriteriaInternal(); |
|||
if (oredCriteria.size() == 0) { |
|||
oredCriteria.add(criteria); |
|||
} |
|||
return criteria; |
|||
} |
|||
|
|||
protected Criteria createCriteriaInternal() { |
|||
Criteria criteria = new Criteria(); |
|||
return criteria; |
|||
} |
|||
|
|||
public void clear() { |
|||
oredCriteria.clear(); |
|||
orderByClause = null; |
|||
distinct = false; |
|||
} |
|||
|
|||
protected abstract static class GeneratedCriteria { |
|||
protected List<Criterion> criteria; |
|||
|
|||
protected GeneratedCriteria() { |
|||
super(); |
|||
criteria = new ArrayList<Criterion>(); |
|||
} |
|||
|
|||
public boolean isValid() { |
|||
return criteria.size() > 0; |
|||
} |
|||
|
|||
public List<Criterion> getAllCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
public List<Criterion> getCriteria() { |
|||
return criteria; |
|||
} |
|||
|
|||
protected void addCriterion(String condition) { |
|||
if (condition == null) { |
|||
throw new RuntimeException("Value for condition cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value, String property) { |
|||
if (value == null) { |
|||
throw new RuntimeException("Value for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value)); |
|||
} |
|||
|
|||
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
|||
if (value1 == null || value2 == null) { |
|||
throw new RuntimeException("Between values for " + property + " cannot be null"); |
|||
} |
|||
criteria.add(new Criterion(condition, value1, value2)); |
|||
} |
|||
|
|||
public Criteria andIdIsNull() { |
|||
addCriterion("id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIsNotNull() { |
|||
addCriterion("id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdEqualTo(Long value) { |
|||
addCriterion("id =", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotEqualTo(Long value) { |
|||
addCriterion("id <>", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThan(Long value) { |
|||
addCriterion("id >", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("id >=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThan(Long value) { |
|||
addCriterion("id <", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("id <=", value, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdIn(List<Long> values) { |
|||
addCriterion("id in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotIn(List<Long> values) { |
|||
addCriterion("id not in", values, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdBetween(Long value1, Long value2) { |
|||
addCriterion("id between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("id not between", value1, value2, "id"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdIsNull() { |
|||
addCriterion("project_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdIsNotNull() { |
|||
addCriterion("project_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdEqualTo(Long value) { |
|||
addCriterion("project_id =", value, "projectId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdNotEqualTo(Long value) { |
|||
addCriterion("project_id <>", value, "projectId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdGreaterThan(Long value) { |
|||
addCriterion("project_id >", value, "projectId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("project_id >=", value, "projectId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdLessThan(Long value) { |
|||
addCriterion("project_id <", value, "projectId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("project_id <=", value, "projectId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdIn(List<Long> values) { |
|||
addCriterion("project_id in", values, "projectId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdNotIn(List<Long> values) { |
|||
addCriterion("project_id not in", values, "projectId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdBetween(Long value1, Long value2) { |
|||
addCriterion("project_id between", value1, value2, "projectId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andProjectIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("project_id not between", value1, value2, "projectId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueIsNull() { |
|||
addCriterion("value is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueIsNotNull() { |
|||
addCriterion("value is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueEqualTo(String value) { |
|||
addCriterion("value =", value, "value"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueNotEqualTo(String value) { |
|||
addCriterion("value <>", value, "value"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueGreaterThan(String value) { |
|||
addCriterion("value >", value, "value"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueGreaterThanOrEqualTo(String value) { |
|||
addCriterion("value >=", value, "value"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueLessThan(String value) { |
|||
addCriterion("value <", value, "value"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueLessThanOrEqualTo(String value) { |
|||
addCriterion("value <=", value, "value"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueLike(String value) { |
|||
addCriterion("value like", value, "value"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueNotLike(String value) { |
|||
addCriterion("value not like", value, "value"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueIn(List<String> values) { |
|||
addCriterion("value in", values, "value"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueNotIn(List<String> values) { |
|||
addCriterion("value not in", values, "value"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueBetween(String value1, String value2) { |
|||
addCriterion("value between", value1, value2, "value"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andValueNotBetween(String value1, String value2) { |
|||
addCriterion("value not between", value1, value2, "value"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSenderIdIsNull() { |
|||
addCriterion("sender_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSenderIdIsNotNull() { |
|||
addCriterion("sender_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSenderIdEqualTo(Long value) { |
|||
addCriterion("sender_id =", value, "senderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSenderIdNotEqualTo(Long value) { |
|||
addCriterion("sender_id <>", value, "senderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSenderIdGreaterThan(Long value) { |
|||
addCriterion("sender_id >", value, "senderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSenderIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("sender_id >=", value, "senderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSenderIdLessThan(Long value) { |
|||
addCriterion("sender_id <", value, "senderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSenderIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("sender_id <=", value, "senderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSenderIdIn(List<Long> values) { |
|||
addCriterion("sender_id in", values, "senderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSenderIdNotIn(List<Long> values) { |
|||
addCriterion("sender_id not in", values, "senderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSenderIdBetween(Long value1, Long value2) { |
|||
addCriterion("sender_id between", value1, value2, "senderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andSenderIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("sender_id not between", value1, value2, "senderId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeIsNull() { |
|||
addCriterion("time is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeIsNotNull() { |
|||
addCriterion("time is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeEqualTo(Long value) { |
|||
addCriterion("time =", value, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeNotEqualTo(Long value) { |
|||
addCriterion("time <>", value, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeGreaterThan(Long value) { |
|||
addCriterion("time >", value, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("time >=", value, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeLessThan(Long value) { |
|||
addCriterion("time <", value, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeLessThanOrEqualTo(Long value) { |
|||
addCriterion("time <=", value, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeIn(List<Long> values) { |
|||
addCriterion("time in", values, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeNotIn(List<Long> values) { |
|||
addCriterion("time not in", values, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeBetween(Long value1, Long value2) { |
|||
addCriterion("time between", value1, value2, "time"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andTimeNotBetween(Long value1, Long value2) { |
|||
addCriterion("time not between", value1, value2, "time"); |
|||
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.tall.bean.po; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
public class SysRingSend implements Serializable { |
|||
private Long id; |
|||
|
|||
private Long ringId; |
|||
|
|||
private Long roleId; |
|||
|
|||
private Byte readStatus; |
|||
|
|||
private Date createdAt; |
|||
|
|||
private Date updatedAt; |
|||
|
|||
private Byte recStatus; |
|||
|
|||
private Long readTime; |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
public Long getId() { |
|||
return id; |
|||
} |
|||
|
|||
public void setId(Long id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getRingId() { |
|||
return ringId; |
|||
} |
|||
|
|||
public void setRingId(Long ringId) { |
|||
this.ringId = ringId; |
|||
} |
|||
|
|||
public Long getRoleId() { |
|||
return roleId; |
|||
} |
|||
|
|||
public void setRoleId(Long roleId) { |
|||
this.roleId = roleId; |
|||
} |
|||
|
|||
public Byte getReadStatus() { |
|||
return readStatus; |
|||
} |
|||
|
|||
public void setReadStatus(Byte readStatus) { |
|||
this.readStatus = readStatus; |
|||
} |
|||
|
|||
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; |
|||
} |
|||
|
|||
public Long getReadTime() { |
|||
return readTime; |
|||
} |
|||
|
|||
public void setReadTime(Long readTime) { |
|||
this.readTime = readTime; |
|||
} |
|||
|
|||
@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(", ringId=").append(ringId); |
|||
sb.append(", roleId=").append(roleId); |
|||
sb.append(", readStatus=").append(readStatus); |
|||
sb.append(", createdAt=").append(createdAt); |
|||
sb.append(", updatedAt=").append(updatedAt); |
|||
sb.append(", recStatus=").append(recStatus); |
|||
sb.append(", readTime=").append(readTime); |
|||
sb.append("]"); |
|||
return sb.toString(); |
|||
} |
|||
} |
@ -0,0 +1,681 @@ |
|||
package com.ccsens.tall.bean.po; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
public class SysRingSendExample { |
|||
protected String orderByClause; |
|||
|
|||
protected boolean distinct; |
|||
|
|||
protected List<Criteria> oredCriteria; |
|||
|
|||
public SysRingSendExample() { |
|||
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 andRingIdIsNull() { |
|||
addCriterion("ring_id is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRingIdIsNotNull() { |
|||
addCriterion("ring_id is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRingIdEqualTo(Long value) { |
|||
addCriterion("ring_id =", value, "ringId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRingIdNotEqualTo(Long value) { |
|||
addCriterion("ring_id <>", value, "ringId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRingIdGreaterThan(Long value) { |
|||
addCriterion("ring_id >", value, "ringId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRingIdGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("ring_id >=", value, "ringId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRingIdLessThan(Long value) { |
|||
addCriterion("ring_id <", value, "ringId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRingIdLessThanOrEqualTo(Long value) { |
|||
addCriterion("ring_id <=", value, "ringId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRingIdIn(List<Long> values) { |
|||
addCriterion("ring_id in", values, "ringId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRingIdNotIn(List<Long> values) { |
|||
addCriterion("ring_id not in", values, "ringId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRingIdBetween(Long value1, Long value2) { |
|||
addCriterion("ring_id between", value1, value2, "ringId"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andRingIdNotBetween(Long value1, Long value2) { |
|||
addCriterion("ring_id not between", value1, value2, "ringId"); |
|||
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 andReadStatusIsNull() { |
|||
addCriterion("read_status is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadStatusIsNotNull() { |
|||
addCriterion("read_status is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadStatusEqualTo(Byte value) { |
|||
addCriterion("read_status =", value, "readStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadStatusNotEqualTo(Byte value) { |
|||
addCriterion("read_status <>", value, "readStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadStatusGreaterThan(Byte value) { |
|||
addCriterion("read_status >", value, "readStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadStatusGreaterThanOrEqualTo(Byte value) { |
|||
addCriterion("read_status >=", value, "readStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadStatusLessThan(Byte value) { |
|||
addCriterion("read_status <", value, "readStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadStatusLessThanOrEqualTo(Byte value) { |
|||
addCriterion("read_status <=", value, "readStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadStatusIn(List<Byte> values) { |
|||
addCriterion("read_status in", values, "readStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadStatusNotIn(List<Byte> values) { |
|||
addCriterion("read_status not in", values, "readStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadStatusBetween(Byte value1, Byte value2) { |
|||
addCriterion("read_status between", value1, value2, "readStatus"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadStatusNotBetween(Byte value1, Byte value2) { |
|||
addCriterion("read_status not between", value1, value2, "readStatus"); |
|||
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 Criteria andReadTimeIsNull() { |
|||
addCriterion("read_time is null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadTimeIsNotNull() { |
|||
addCriterion("read_time is not null"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadTimeEqualTo(Long value) { |
|||
addCriterion("read_time =", value, "readTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadTimeNotEqualTo(Long value) { |
|||
addCriterion("read_time <>", value, "readTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadTimeGreaterThan(Long value) { |
|||
addCriterion("read_time >", value, "readTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadTimeGreaterThanOrEqualTo(Long value) { |
|||
addCriterion("read_time >=", value, "readTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadTimeLessThan(Long value) { |
|||
addCriterion("read_time <", value, "readTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadTimeLessThanOrEqualTo(Long value) { |
|||
addCriterion("read_time <=", value, "readTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadTimeIn(List<Long> values) { |
|||
addCriterion("read_time in", values, "readTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadTimeNotIn(List<Long> values) { |
|||
addCriterion("read_time not in", values, "readTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadTimeBetween(Long value1, Long value2) { |
|||
addCriterion("read_time between", value1, value2, "readTime"); |
|||
return (Criteria) this; |
|||
} |
|||
|
|||
public Criteria andReadTimeNotBetween(Long value1, Long value2) { |
|||
addCriterion("read_time not between", value1, value2, "readTime"); |
|||
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,60 @@ |
|||
package com.ccsens.tall.bean.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Data |
|||
public class RingVo { |
|||
@Data |
|||
@ApiModel("返回ring消息") |
|||
public static class PageInfoRing{ |
|||
@ApiModelProperty("当前页数") |
|||
private Integer pageNum; |
|||
@ApiModelProperty("总页数") |
|||
private Integer totalPage ; |
|||
@JsonIgnore //"总数据量"
|
|||
private Integer size ; |
|||
} |
|||
@Data |
|||
@ApiModel("返回ring消息") |
|||
public static class RingInfo{ |
|||
@ApiModelProperty("消息id") |
|||
private String messageId; |
|||
@ApiModelProperty("消息内容") |
|||
private String value ; |
|||
@ApiModelProperty("消息发送时间") |
|||
private Long time ; |
|||
@ApiModelProperty("是否是自己发送的消息") |
|||
private Integer mine ; |
|||
@ApiModelProperty("未读数量") |
|||
private Integer unread; |
|||
@ApiModelProperty("发送者信息") |
|||
private MsgSender sender; |
|||
@ApiModelProperty("接收角色的信息") |
|||
private List<MsgReceiveRole> roleList; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("接收/发送者信息") |
|||
public static class MsgReceiveRole{ |
|||
@ApiModelProperty("接收者的角色id") |
|||
private Long id; |
|||
@ApiModelProperty("接收者的角色名") |
|||
private String name; |
|||
@ApiModelProperty("该角色是否已读") |
|||
private Integer readStatus; |
|||
} |
|||
|
|||
@Data |
|||
@ApiModel("接收/发送者信息") |
|||
public static class MsgSender{ |
|||
@ApiModelProperty("发送者的id") |
|||
private Long id; |
|||
@ApiModelProperty("发送者的名字") |
|||
private String name; |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
package com.ccsens.tall.persist.dao; |
|||
|
|||
import com.ccsens.tall.bean.vo.RingVo; |
|||
import com.ccsens.tall.persist.mapper.SysRingMsgMapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
import java.util.List; |
|||
|
|||
@Repository |
|||
public interface SysRingMsgDao extends SysRingMsgMapper { |
|||
|
|||
List<RingVo.RingInfo> selectRingInfoByProject(@Param("userId")Long userId, @Param("projectId")Long projectId, @Param("pageIndex")int pageIndex, @Param("pageSize")int pageSize); |
|||
|
|||
List<Long> selectRoleIdByUserId(@Param("userId")Long userId, @Param("projectId")Long projectId); |
|||
|
|||
void updateStatusByRoleIdAndMsgId(@Param("roleIdList")List<Long> roleIdList, @Param("messageIdList")List<Long> messageIdList); |
|||
} |
@ -0,0 +1,8 @@ |
|||
package com.ccsens.tall.persist.dao; |
|||
|
|||
import com.ccsens.tall.persist.mapper.SysRingSendMapper; |
|||
import org.springframework.stereotype.Repository; |
|||
|
|||
@Repository |
|||
public interface SysRingSendDao extends SysRingSendMapper { |
|||
} |
@ -0,0 +1,36 @@ |
|||
package com.ccsens.tall.persist.mapper; |
|||
|
|||
import com.ccsens.tall.bean.po.SysRingMsg; |
|||
import com.ccsens.tall.bean.po.SysRingMsgExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface SysRingMsgMapper { |
|||
long countByExample(SysRingMsgExample example); |
|||
|
|||
int deleteByExample(SysRingMsgExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(SysRingMsg record); |
|||
|
|||
int insertSelective(SysRingMsg record); |
|||
|
|||
List<SysRingMsg> selectByExampleWithBLOBs(SysRingMsgExample example); |
|||
|
|||
List<SysRingMsg> selectByExample(SysRingMsgExample example); |
|||
|
|||
SysRingMsg selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") SysRingMsg record, @Param("example") SysRingMsgExample example); |
|||
|
|||
int updateByExampleWithBLOBs(@Param("record") SysRingMsg record, @Param("example") SysRingMsgExample example); |
|||
|
|||
int updateByExample(@Param("record") SysRingMsg record, @Param("example") SysRingMsgExample example); |
|||
|
|||
int updateByPrimaryKeySelective(SysRingMsg record); |
|||
|
|||
int updateByPrimaryKeyWithBLOBs(SysRingMsg record); |
|||
|
|||
int updateByPrimaryKey(SysRingMsg record); |
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.ccsens.tall.persist.mapper; |
|||
|
|||
import com.ccsens.tall.bean.po.SysRingSend; |
|||
import com.ccsens.tall.bean.po.SysRingSendExample; |
|||
import java.util.List; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
public interface SysRingSendMapper { |
|||
long countByExample(SysRingSendExample example); |
|||
|
|||
int deleteByExample(SysRingSendExample example); |
|||
|
|||
int deleteByPrimaryKey(Long id); |
|||
|
|||
int insert(SysRingSend record); |
|||
|
|||
int insertSelective(SysRingSend record); |
|||
|
|||
List<SysRingSend> selectByExample(SysRingSendExample example); |
|||
|
|||
SysRingSend selectByPrimaryKey(Long id); |
|||
|
|||
int updateByExampleSelective(@Param("record") SysRingSend record, @Param("example") SysRingSendExample example); |
|||
|
|||
int updateByExample(@Param("record") SysRingSend record, @Param("example") SysRingSendExample example); |
|||
|
|||
int updateByPrimaryKeySelective(SysRingSend record); |
|||
|
|||
int updateByPrimaryKey(SysRingSend record); |
|||
} |
@ -0,0 +1,16 @@ |
|||
package com.ccsens.tall.service; |
|||
|
|||
import com.ccsens.tall.bean.dto.RingDto; |
|||
import com.ccsens.tall.bean.vo.RingVo; |
|||
import com.fasterxml.jackson.core.JsonProcessingException; |
|||
import com.github.pagehelper.PageInfo; |
|||
|
|||
import java.util.List; |
|||
|
|||
public interface IRingService { |
|||
void sendRingMsg(Long currentUserId, RingDto.RingSendDto ringSendDto) throws Exception; |
|||
|
|||
PageInfo<RingVo.RingInfo> getRingInfo(Long currentUserId, RingDto.GetRingDto getRingDto); |
|||
|
|||
void readRingMsg(Long currentUserId, RingDto.MessageId message) throws JsonProcessingException; |
|||
} |
@ -0,0 +1,170 @@ |
|||
package com.ccsens.tall.service; |
|||
|
|||
import cn.hutool.core.collection.CollectionUtil; |
|||
import cn.hutool.core.lang.Snowflake; |
|||
import cn.hutool.core.util.ObjectUtil; |
|||
import com.ccsens.tall.bean.dto.RingDto; |
|||
import com.ccsens.tall.bean.dto.message.BaseMessageDto; |
|||
import com.ccsens.tall.bean.dto.message.RingMessageWithReadDto; |
|||
import com.ccsens.tall.bean.dto.message.RingMessageWithSendDto; |
|||
import com.ccsens.tall.bean.po.SysRingMsg; |
|||
import com.ccsens.tall.bean.po.SysRingSend; |
|||
import com.ccsens.tall.bean.po.SysRingSendExample; |
|||
import com.ccsens.tall.bean.vo.RingVo; |
|||
import com.ccsens.tall.persist.dao.SysRingMsgDao; |
|||
import com.ccsens.tall.persist.dao.SysRingSendDao; |
|||
import com.ccsens.util.CodeEnum; |
|||
import com.ccsens.util.JacksonUtil; |
|||
import com.ccsens.util.config.RabbitMQConfig; |
|||
import com.ccsens.util.exception.BaseException; |
|||
import com.fasterxml.jackson.core.JsonProcessingException; |
|||
import com.github.pagehelper.PageHelper; |
|||
import com.github.pagehelper.PageInfo; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.amqp.rabbit.core.RabbitTemplate; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Propagation; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.*; |
|||
import java.util.function.Consumer; |
|||
|
|||
/** |
|||
* @author 逗 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
|||
public class RingService implements IRingService{ |
|||
@Autowired |
|||
private Snowflake snowflake; |
|||
@Autowired |
|||
private SysRingMsgDao sysRingMsgDao; |
|||
@Autowired |
|||
private SysRingSendDao sysRingSendDao; |
|||
@Autowired |
|||
private IUserService userService; |
|||
@Autowired |
|||
private RabbitTemplate rabbitTemplate; |
|||
|
|||
|
|||
/** |
|||
* 发送ring消息 |
|||
* @param currentUserId 当前用户userid |
|||
* @param ringSendDto 发送的消息内容 |
|||
*/ |
|||
@Override |
|||
public void sendRingMsg(Long currentUserId, RingDto.RingSendDto ringSendDto) throws Exception { |
|||
//获取当前时间
|
|||
Long time = System.currentTimeMillis(); |
|||
//将消息详情保存至数据库
|
|||
SysRingMsg ringMsg = new SysRingMsg(); |
|||
ringMsg.setId(snowflake.nextId()); |
|||
ringMsg.setProjectId(ringSendDto.getProjectId()); |
|||
ringMsg.setSenderId(currentUserId); |
|||
ringMsg.setTime(time); |
|||
ringMsg.setValueText(ringSendDto.getValue()); |
|||
if(ringSendDto.getValue().length() > 20){ |
|||
ringMsg.setValue(ringSendDto.getValue().substring(0,20)); |
|||
}else { |
|||
ringMsg.setValue(ringSendDto.getValue()); |
|||
} |
|||
sysRingMsgDao.insertSelective(ringMsg); |
|||
//所有接收者的userId
|
|||
Set<Long> userIdSet = new HashSet<>(); |
|||
//添加消息详情与接收角色的关联信息
|
|||
if(CollectionUtil.isNotEmpty(ringSendDto.getRoleList())){ |
|||
for(Long roleId :ringSendDto.getRoleList()){ |
|||
SysRingSend sysRingSend = new SysRingSend(); |
|||
sysRingSend.setId(snowflake.nextId()); |
|||
sysRingSend.setRingId(ringMsg.getId()); |
|||
sysRingSend.setRoleId(roleId); |
|||
sysRingSendDao.insertSelective(sysRingSend); |
|||
List<Long> userIdList = userService.selectUserIdByRoleId(roleId); |
|||
userIdSet.addAll(userIdList); |
|||
} |
|||
} |
|||
List<Long> userIdList = new ArrayList<>(userIdSet); |
|||
//发送消息
|
|||
RingMessageWithSendDto ringMessageWithSendDto = new RingMessageWithSendDto( |
|||
ringMsg.getId(),ringSendDto.getProjectId(),ringMsg.getValue(),time); |
|||
ringMessageWithSendDto.setReceivers(BaseMessageDto.MessageUser.userIdToUsers(userIdList)); |
|||
rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, |
|||
JacksonUtil.beanToJson(ringMessageWithSendDto)); |
|||
} |
|||
|
|||
/** |
|||
* 查询ring消息 |
|||
* @param currentUserId userId |
|||
* @param getRingDto 查询条件 |
|||
* @return 时间倒叙查询最近10条信息。在返回的结果中需时间正序展示 |
|||
*/ |
|||
@Override |
|||
public PageInfo<RingVo.RingInfo> getRingInfo(Long currentUserId, RingDto.GetRingDto getRingDto) { |
|||
//计算分页信息
|
|||
int pageIndex = 0; |
|||
int pageSize = 10; |
|||
if(ObjectUtil.isNotNull(getRingDto.getPageSize())) { |
|||
pageSize = getRingDto.getPageSize(); |
|||
} |
|||
if(ObjectUtil.isNotNull(getRingDto.getPage())) { |
|||
pageIndex = (getRingDto.getPage() - 1) * pageSize; |
|||
} |
|||
getRingDto.setPage(getRingDto.getPage() == null ? 1 : getRingDto.getPage()); |
|||
getRingDto.setPageSize(getRingDto.getPageSize() == null ? 10 : getRingDto.getPageSize()); |
|||
|
|||
PageHelper.startPage(getRingDto.getPage(), getRingDto.getPageSize()); |
|||
List<RingVo.RingInfo> ringInfoList = sysRingMsgDao.selectRingInfoByProject(currentUserId,getRingDto.getProjectId(),pageIndex,pageSize); |
|||
|
|||
CollectionUtil.sort(ringInfoList,new Comparator<RingVo.RingInfo>(){ |
|||
@Override |
|||
public int compare(RingVo.RingInfo o1, RingVo.RingInfo o2) { |
|||
return (int)(o1.getTime() - o2.getTime()); |
|||
} |
|||
}); |
|||
|
|||
return new PageInfo<>(ringInfoList); |
|||
} |
|||
|
|||
/** |
|||
* 阅读消息(将消息设为已读) |
|||
* @param currentUserId userId |
|||
* @param message 项目id,和消息id,可以多个。同时将多个消息设为已读 |
|||
*/ |
|||
@Override |
|||
public void readRingMsg(Long currentUserId, RingDto.MessageId message) throws JsonProcessingException { |
|||
//获取当前用户在项目内的角色
|
|||
List<Long> roleIdList = sysRingMsgDao.selectRoleIdByUserId(currentUserId,message.getProjectId()); |
|||
log.info("阅读者的角色:{}",roleIdList.toString()); |
|||
//将每条消息的状态设为已读
|
|||
if(CollectionUtil.isNotEmpty(roleIdList) && CollectionUtil.isNotEmpty(message.getMessageIdList())){ |
|||
for(Long roleId : roleIdList){ |
|||
for(Long msgId : message.getMessageIdList()){ |
|||
//查找消息
|
|||
SysRingMsg sysRingMsg = sysRingMsgDao.selectByPrimaryKey(msgId); |
|||
if(ObjectUtil.isNull(sysRingMsg)){ |
|||
throw new BaseException(CodeEnum.PARAM_ERROR); |
|||
} |
|||
SysRingSendExample sysRingSendExample = new SysRingSendExample(); |
|||
sysRingSendExample.createCriteria().andRingIdEqualTo(msgId).andRoleIdEqualTo(roleId); |
|||
List<SysRingSend> sysRingSendList = sysRingSendDao.selectByExample(sysRingSendExample); |
|||
if(CollectionUtil.isNotEmpty(sysRingSendList)){ |
|||
for(SysRingSend sysRingSend : sysRingSendList){ |
|||
sysRingSend.setReadStatus((byte) 1); |
|||
sysRingSend.setReadTime(System.currentTimeMillis()); |
|||
sysRingSendDao.updateByPrimaryKeySelective(sysRingSend); |
|||
} |
|||
//将已读消息返回给发送者
|
|||
List<Long> userIdList = new ArrayList<>(); |
|||
userIdList.add(sysRingMsg.getSenderId()); |
|||
RingMessageWithReadDto ringMessageWithReadDto = new RingMessageWithReadDto(msgId,message.getProjectId(),roleId); |
|||
ringMessageWithReadDto.setReceivers(BaseMessageDto.MessageUser.userIdToUsers(userIdList)); |
|||
rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, |
|||
JacksonUtil.beanToJson(ringMessageWithReadDto)); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,66 @@ |
|||
package com.ccsens.tall.web; |
|||
|
|||
import com.ccsens.tall.bean.dto.RingDto; |
|||
import com.ccsens.tall.bean.dto.TaskDto; |
|||
import com.ccsens.tall.bean.vo.RingVo; |
|||
import com.ccsens.tall.service.IRingService; |
|||
import com.ccsens.util.JsonResponse; |
|||
import com.ccsens.util.WebConstant; |
|||
import com.github.pagehelper.PageInfo; |
|||
import io.jsonwebtoken.Claims; |
|||
import io.swagger.annotations.*; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.validation.annotation.Validated; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import java.util.List; |
|||
|
|||
@Api(tags = "Ring消息相关API" , description = "") |
|||
@RestController |
|||
@RequestMapping("/ring") |
|||
public class RingController { |
|||
@Autowired |
|||
private IRingService ringService; |
|||
|
|||
|
|||
@ApiOperation(value = "发送ring消息", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/send", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse sendRingMsg(HttpServletRequest request, |
|||
@ApiParam @Validated @RequestBody RingDto.RingSendDto ringSendDto) throws Exception { |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
ringService.sendRingMsg(currentUserId,ringSendDto); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
|
|||
@ApiOperation(value = "查看ring消息", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse<PageInfo<RingVo.RingInfo>> getRingInfo(HttpServletRequest request, |
|||
@ApiParam @Validated @RequestBody RingDto.GetRingDto getRingDto) throws Exception { |
|||
|
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
PageInfo<RingVo.RingInfo> ringInfoList = ringService.getRingInfo(currentUserId,getRingDto); |
|||
return JsonResponse.newInstance().ok(ringInfoList); |
|||
} |
|||
|
|||
|
|||
@ApiOperation(value = "阅读消息(将消息设为已读)", notes = "") |
|||
@ApiImplicitParams({ |
|||
}) |
|||
@RequestMapping(value = "/read", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|||
public JsonResponse readRingMsg(HttpServletRequest request, |
|||
@ApiParam @Validated @RequestBody RingDto.MessageId message) throws Exception { |
|||
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
|||
ringService.readRingMsg(currentUserId,message); |
|||
return JsonResponse.newInstance().ok(); |
|||
} |
|||
|
|||
} |
@ -1,4 +1,4 @@ |
|||
spring: |
|||
profiles: |
|||
active: test |
|||
include: util-test,common |
|||
active: dev |
|||
include: util-dev,common |
|||
|
@ -0,0 +1,93 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.tall.persist.dao.SysRingMsgDao"> |
|||
|
|||
<resultMap id="ring_message" type="com.ccsens.tall.bean.vo.RingVo$RingInfo"> |
|||
<id column="messageId" property="messageId" /> |
|||
<result column="value" property="value" /> |
|||
<result column="mine" property="mine" /> |
|||
<result column="unread" property="unread" /> |
|||
<result column="time" property="time" /> |
|||
<collection property="roleList" ofType="com.ccsens.tall.bean.vo.RingVo$MsgReceiveRole"> |
|||
<id column="roleId" property="id"/> |
|||
<result column="roleName" property="name"/> |
|||
<result column="readStatus" property="readStatus"/> |
|||
</collection> |
|||
<collection property="sender" ofType="com.ccsens.tall.bean.vo.RingVo$MsgSender"> |
|||
<id column="senderId" property="id"/> |
|||
<result column="senderName" property="name"/> |
|||
</collection> |
|||
</resultMap> |
|||
|
|||
<select id="selectRingInfoByProject" parameterType="java.util.Map" resultMap="ring_message"> |
|||
SELECT |
|||
m.id as messageId, |
|||
m.`value` as `value`, |
|||
m.`value_text` as `valueText`, |
|||
m.`time` as time, |
|||
if(m.sender_id = #{userId},1,0) as mine, |
|||
r.id as roleId, |
|||
r.name as roleName, |
|||
s.read_status as readStatus, |
|||
m.sender_id as senderId, |
|||
( |
|||
SELECT |
|||
IF( u.nickname = '', a.identifier, u.nickname ) AS userName |
|||
FROM |
|||
t_sys_user u |
|||
LEFT JOIN t_sys_auth a ON u.id = a.user_id |
|||
AND a.identify_type = 3 |
|||
WHERE |
|||
u.rec_status = 0 |
|||
and |
|||
a.rec_status = 0 |
|||
and |
|||
u.id = m.sender_id |
|||
limit 1 |
|||
) as senderName, |
|||
(SELECT count(read_status) FROM t_sys_ring_send WHERE ring_id = m.id and read_status = 0) as unread |
|||
FROM |
|||
t_sys_ring_msg m LEFT JOIN t_sys_ring_send s on m.id = s.ring_id |
|||
LEFT JOIN t_pro_role r on s.role_id = r.id |
|||
WHERE |
|||
( |
|||
m.sender_id = #{userId} |
|||
or |
|||
s.role_id in ( |
|||
SELECT |
|||
r.id as rId |
|||
FROM |
|||
t_pro_role r LEFT JOIN t_pro_member_role mr on r.id = mr.role_id |
|||
LEFT JOIN t_pro_member m on mr.member_id = m.id |
|||
WHERE |
|||
(m.user_id = #{userId} |
|||
or |
|||
r.`name` = '全体成员' |
|||
) |
|||
AND |
|||
r.project_id = #{projectId} |
|||
) |
|||
) |
|||
and |
|||
m.project_id = #{projectId} |
|||
ORDER BY m.time DESC |
|||
|
|||
</select> |
|||
|
|||
<select id="selectRoleIdByUserId" parameterType="java.util.Map" resultType="Long"> |
|||
SELECT |
|||
r.id as rId |
|||
FROM |
|||
t_pro_role r LEFT JOIN t_pro_member_role mr on r.id = mr.role_id |
|||
LEFT JOIN t_pro_member m on mr.member_id = m.id |
|||
WHERE |
|||
(m.user_id = #{userId} |
|||
or |
|||
r.`name` = '全体成员' |
|||
) |
|||
AND |
|||
r.project_id = #{projectId} |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,323 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ccsens.tall.persist.mapper.SysRingMsgMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.SysRingMsg"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="project_id" jdbcType="BIGINT" property="projectId" /> |
|||
<result column="value" jdbcType="VARCHAR" property="value" /> |
|||
<result column="sender_id" jdbcType="BIGINT" property="senderId" /> |
|||
<result column="time" jdbcType="BIGINT" property="time" /> |
|||
<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> |
|||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.ccsens.tall.bean.po.SysRingMsg"> |
|||
<result column="value_text" jdbcType="LONGVARCHAR" property="valueText" /> |
|||
</resultMap> |
|||
<sql id="Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Update_By_Example_Where_Clause"> |
|||
<where> |
|||
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
|||
<if test="criteria.valid"> |
|||
<trim prefix="(" prefixOverrides="and" suffix=")"> |
|||
<foreach collection="criteria.criteria" item="criterion"> |
|||
<choose> |
|||
<when test="criterion.noValue"> |
|||
and ${criterion.condition} |
|||
</when> |
|||
<when test="criterion.singleValue"> |
|||
and ${criterion.condition} #{criterion.value} |
|||
</when> |
|||
<when test="criterion.betweenValue"> |
|||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
|||
</when> |
|||
<when test="criterion.listValue"> |
|||
and ${criterion.condition} |
|||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
|||
#{listItem} |
|||
</foreach> |
|||
</when> |
|||
</choose> |
|||
</foreach> |
|||
</trim> |
|||
</if> |
|||
</foreach> |
|||
</where> |
|||
</sql> |
|||
<sql id="Base_Column_List"> |
|||
id, project_id, value, sender_id, time, created_at, updated_at, rec_status |
|||
</sql> |
|||
<sql id="Blob_Column_List"> |
|||
value_text |
|||
</sql> |
|||
<select id="selectByExampleWithBLOBs" parameterType="com.ccsens.tall.bean.po.SysRingMsgExample" resultMap="ResultMapWithBLOBs"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
, |
|||
<include refid="Blob_Column_List" /> |
|||
from t_sys_ring_msg |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysRingMsgExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_ring_msg |
|||
<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="ResultMapWithBLOBs"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
, |
|||
<include refid="Blob_Column_List" /> |
|||
from t_sys_ring_msg |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_sys_ring_msg |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.SysRingMsgExample"> |
|||
delete from t_sys_ring_msg |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysRingMsg"> |
|||
insert into t_sys_ring_msg (id, project_id, value, |
|||
sender_id, time, created_at, |
|||
updated_at, rec_status, value_text |
|||
) |
|||
values (#{id,jdbcType=BIGINT}, #{projectId,jdbcType=BIGINT}, #{value,jdbcType=VARCHAR}, |
|||
#{senderId,jdbcType=BIGINT}, #{time,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, |
|||
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, #{valueText,jdbcType=LONGVARCHAR} |
|||
) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysRingMsg"> |
|||
insert into t_sys_ring_msg |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="projectId != null"> |
|||
project_id, |
|||
</if> |
|||
<if test="value != null"> |
|||
value, |
|||
</if> |
|||
<if test="senderId != null"> |
|||
sender_id, |
|||
</if> |
|||
<if test="time != null"> |
|||
time, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
<if test="valueText != null"> |
|||
value_text, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="projectId != null"> |
|||
#{projectId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="value != null"> |
|||
#{value,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="senderId != null"> |
|||
#{senderId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="time != null"> |
|||
#{time,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> |
|||
<if test="valueText != null"> |
|||
#{valueText,jdbcType=LONGVARCHAR}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.SysRingMsgExample" resultType="java.lang.Long"> |
|||
select count(*) from t_sys_ring_msg |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_sys_ring_msg |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.projectId != null"> |
|||
project_id = #{record.projectId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.value != null"> |
|||
value = #{record.value,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="record.senderId != null"> |
|||
sender_id = #{record.senderId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.time != null"> |
|||
time = #{record.time,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> |
|||
<if test="record.valueText != null"> |
|||
value_text = #{record.valueText,jdbcType=LONGVARCHAR}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExampleWithBLOBs" parameterType="map"> |
|||
update t_sys_ring_msg |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
project_id = #{record.projectId,jdbcType=BIGINT}, |
|||
value = #{record.value,jdbcType=VARCHAR}, |
|||
sender_id = #{record.senderId,jdbcType=BIGINT}, |
|||
time = #{record.time,jdbcType=BIGINT}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
value_text = #{record.valueText,jdbcType=LONGVARCHAR} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_sys_ring_msg |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
project_id = #{record.projectId,jdbcType=BIGINT}, |
|||
value = #{record.value,jdbcType=VARCHAR}, |
|||
sender_id = #{record.senderId,jdbcType=BIGINT}, |
|||
time = #{record.time,jdbcType=BIGINT}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.SysRingMsg"> |
|||
update t_sys_ring_msg |
|||
<set> |
|||
<if test="projectId != null"> |
|||
project_id = #{projectId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="value != null"> |
|||
value = #{value,jdbcType=VARCHAR}, |
|||
</if> |
|||
<if test="senderId != null"> |
|||
sender_id = #{senderId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="time != null"> |
|||
time = #{time,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> |
|||
<if test="valueText != null"> |
|||
value_text = #{valueText,jdbcType=LONGVARCHAR}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.ccsens.tall.bean.po.SysRingMsg"> |
|||
update t_sys_ring_msg |
|||
set project_id = #{projectId,jdbcType=BIGINT}, |
|||
value = #{value,jdbcType=VARCHAR}, |
|||
sender_id = #{senderId,jdbcType=BIGINT}, |
|||
time = #{time,jdbcType=BIGINT}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
value_text = #{valueText,jdbcType=LONGVARCHAR} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.SysRingMsg"> |
|||
update t_sys_ring_msg |
|||
set project_id = #{projectId,jdbcType=BIGINT}, |
|||
value = #{value,jdbcType=VARCHAR}, |
|||
sender_id = #{senderId,jdbcType=BIGINT}, |
|||
time = #{time,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.tall.persist.mapper.SysRingSendMapper"> |
|||
<resultMap id="BaseResultMap" type="com.ccsens.tall.bean.po.SysRingSend"> |
|||
<id column="id" jdbcType="BIGINT" property="id" /> |
|||
<result column="ring_id" jdbcType="BIGINT" property="ringId" /> |
|||
<result column="role_id" jdbcType="BIGINT" property="roleId" /> |
|||
<result column="read_status" jdbcType="TINYINT" property="readStatus" /> |
|||
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|||
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|||
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|||
<result column="read_time" jdbcType="BIGINT" property="readTime" /> |
|||
</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, ring_id, role_id, read_status, created_at, updated_at, rec_status, read_time |
|||
</sql> |
|||
<select id="selectByExample" parameterType="com.ccsens.tall.bean.po.SysRingSendExample" resultMap="BaseResultMap"> |
|||
select |
|||
<if test="distinct"> |
|||
distinct |
|||
</if> |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_ring_send |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
<if test="orderByClause != null"> |
|||
order by ${orderByClause} |
|||
</if> |
|||
</select> |
|||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|||
select |
|||
<include refid="Base_Column_List" /> |
|||
from t_sys_ring_send |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</select> |
|||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|||
delete from t_sys_ring_send |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</delete> |
|||
<delete id="deleteByExample" parameterType="com.ccsens.tall.bean.po.SysRingSendExample"> |
|||
delete from t_sys_ring_send |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</delete> |
|||
<insert id="insert" parameterType="com.ccsens.tall.bean.po.SysRingSend"> |
|||
insert into t_sys_ring_send (id, ring_id, role_id, |
|||
read_status, created_at, updated_at, |
|||
rec_status, read_time) |
|||
values (#{id,jdbcType=BIGINT}, #{ringId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}, |
|||
#{readStatus,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
|||
#{recStatus,jdbcType=TINYINT}, #{readTime,jdbcType=BIGINT}) |
|||
</insert> |
|||
<insert id="insertSelective" parameterType="com.ccsens.tall.bean.po.SysRingSend"> |
|||
insert into t_sys_ring_send |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
id, |
|||
</if> |
|||
<if test="ringId != null"> |
|||
ring_id, |
|||
</if> |
|||
<if test="roleId != null"> |
|||
role_id, |
|||
</if> |
|||
<if test="readStatus != null"> |
|||
read_status, |
|||
</if> |
|||
<if test="createdAt != null"> |
|||
created_at, |
|||
</if> |
|||
<if test="updatedAt != null"> |
|||
updated_at, |
|||
</if> |
|||
<if test="recStatus != null"> |
|||
rec_status, |
|||
</if> |
|||
<if test="readTime != null"> |
|||
read_time, |
|||
</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="id != null"> |
|||
#{id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="ringId != null"> |
|||
#{ringId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="roleId != null"> |
|||
#{roleId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="readStatus != null"> |
|||
#{readStatus,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> |
|||
<if test="readTime != null"> |
|||
#{readTime,jdbcType=BIGINT}, |
|||
</if> |
|||
</trim> |
|||
</insert> |
|||
<select id="countByExample" parameterType="com.ccsens.tall.bean.po.SysRingSendExample" resultType="java.lang.Long"> |
|||
select count(*) from t_sys_ring_send |
|||
<if test="_parameter != null"> |
|||
<include refid="Example_Where_Clause" /> |
|||
</if> |
|||
</select> |
|||
<update id="updateByExampleSelective" parameterType="map"> |
|||
update t_sys_ring_send |
|||
<set> |
|||
<if test="record.id != null"> |
|||
id = #{record.id,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.ringId != null"> |
|||
ring_id = #{record.ringId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.roleId != null"> |
|||
role_id = #{record.roleId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="record.readStatus != null"> |
|||
read_status = #{record.readStatus,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> |
|||
<if test="record.readTime != null"> |
|||
read_time = #{record.readTime,jdbcType=BIGINT}, |
|||
</if> |
|||
</set> |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByExample" parameterType="map"> |
|||
update t_sys_ring_send |
|||
set id = #{record.id,jdbcType=BIGINT}, |
|||
ring_id = #{record.ringId,jdbcType=BIGINT}, |
|||
role_id = #{record.roleId,jdbcType=BIGINT}, |
|||
read_status = #{record.readStatus,jdbcType=TINYINT}, |
|||
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|||
read_time = #{record.readTime,jdbcType=BIGINT} |
|||
<if test="_parameter != null"> |
|||
<include refid="Update_By_Example_Where_Clause" /> |
|||
</if> |
|||
</update> |
|||
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.tall.bean.po.SysRingSend"> |
|||
update t_sys_ring_send |
|||
<set> |
|||
<if test="ringId != null"> |
|||
ring_id = #{ringId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="roleId != null"> |
|||
role_id = #{roleId,jdbcType=BIGINT}, |
|||
</if> |
|||
<if test="readStatus != null"> |
|||
read_status = #{readStatus,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> |
|||
<if test="readTime != null"> |
|||
read_time = #{readTime,jdbcType=BIGINT}, |
|||
</if> |
|||
</set> |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
<update id="updateByPrimaryKey" parameterType="com.ccsens.tall.bean.po.SysRingSend"> |
|||
update t_sys_ring_send |
|||
set ring_id = #{ringId,jdbcType=BIGINT}, |
|||
role_id = #{roleId,jdbcType=BIGINT}, |
|||
read_status = #{readStatus,jdbcType=TINYINT}, |
|||
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|||
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|||
rec_status = #{recStatus,jdbcType=TINYINT}, |
|||
read_time = #{readTime,jdbcType=BIGINT} |
|||
where id = #{id,jdbcType=BIGINT} |
|||
</update> |
|||
</mapper> |
Loading…
Reference in new issue