Browse Source

添加在线用户监控最后操作时间字段

new
zzc 1 week ago
parent
commit
8fde8ab816
  1. 4
      acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysDictData.java
  2. 4
      acupuncture-generator/src/main/resources/mbg.xml
  3. 37
      acupuncture-system/src/main/java/com/acupuncture/system/domain/SysNotice.java
  4. 15
      acupuncture-system/src/main/java/com/acupuncture/system/domain/SysUserOnline.java
  5. 106
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/SysNoticeUser.java
  6. 711
      acupuncture-system/src/main/java/com/acupuncture/system/domain/po/SysNoticeUserExample.java
  7. 4
      acupuncture-system/src/main/java/com/acupuncture/system/mapper/SysNoticeMapper.java
  8. 28
      acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/SysNoticeUserMapper.java
  9. 140
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/SysNoticeServiceImpl.java
  10. 1
      acupuncture-system/src/main/java/com/acupuncture/system/service/impl/SysUserOnlineServiceImpl.java
  11. 41
      acupuncture-system/src/main/resources/mapper/system/SysNoticeMapper.xml
  12. 252
      acupuncture-system/src/main/resources/mapper/system/SysNoticeUserMapper.xml

4
acupuncture-common/src/main/java/com/acupuncture/common/core/domain/entity/SysDictData.java

@ -208,6 +208,10 @@ public class SysDictData extends BaseEntity
.append("listClass", getListClass()) .append("listClass", getListClass())
.append("isDefault", getIsDefault()) .append("isDefault", getIsDefault())
.append("status", getStatus()) .append("status", getStatus())
.append("dataType", getDataType())
.append("dataLength", getDataLength())
.append("isRequired", getIsRequired())
.append("isSole", getIsSole())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateBy", getUpdateBy()) .append("updateBy", getUpdateBy())

4
acupuncture-generator/src/main/resources/mbg.xml

@ -80,13 +80,15 @@
<!-- <table tableName="fms_followup_queue" domainObjectName="FmsFollowupQueue" enableDeleteByExample="false"/>--> <!-- <table tableName="fms_followup_queue" domainObjectName="FmsFollowupQueue" enableDeleteByExample="false"/>-->
<!-- <table tableName="fms_followup_task" domainObjectName="FmsFollowupTask" enableDeleteByExample="false"/>--> <!-- <table tableName="fms_followup_task" domainObjectName="FmsFollowupTask" enableDeleteByExample="false"/>-->
<!-- <table tableName="fms_patient_queue_relation" domainObjectName="FmsPatientQueueRelation" enableDeleteByExample="false"/>--> <!-- <table tableName="fms_patient_queue_relation" domainObjectName="FmsPatientQueueRelation" enableDeleteByExample="false"/>-->
<table tableName="pms_patient" domainObjectName="PmsPatient" enableDeleteByExample="false"/> <!-- <table tableName="pms_patient" domainObjectName="PmsPatient" enableDeleteByExample="false"/>-->
<!-- <table tableName="hms_weight_height" domainObjectName="HmsWeightHeight" enableDeleteByExample="false"/>--> <!-- <table tableName="hms_weight_height" domainObjectName="HmsWeightHeight" enableDeleteByExample="false"/>-->
<!-- <table tableName="pms_treatment" domainObjectName="PmsTreatment" enableDeleteByExample="false"/>--> <!-- <table tableName="pms_treatment" domainObjectName="PmsTreatment" enableDeleteByExample="false"/>-->
<!-- <table tableName="pms_treatment_record" domainObjectName="PmsTreatmentRecord" enableDeleteByExample="false"/>--> <!-- <table tableName="pms_treatment_record" domainObjectName="PmsTreatmentRecord" enableDeleteByExample="false"/>-->
<!-- <table tableName="rms_report_type" domainObjectName="RmsReportType" enableDeleteByExample="false"/>--> <!-- <table tableName="rms_report_type" domainObjectName="RmsReportType" enableDeleteByExample="false"/>-->
<!-- <table tableName="rms_report_management" domainObjectName="RmsReportManagement" enableDeleteByExample="false"/>--> <!-- <table tableName="rms_report_management" domainObjectName="RmsReportManagement" enableDeleteByExample="false"/>-->
<!-- <table tableName="ums_data_source" domainObjectName="UmsDataSource" enableDeleteByExample="false"/>--> <!-- <table tableName="ums_data_source" domainObjectName="UmsDataSource" enableDeleteByExample="false"/>-->
<table tableName="sys_notice_user" domainObjectName="SysNoticeUser" enableDeleteByExample="false"/>
<!-- 有些表的字段需要指定java类型 <!-- 有些表的字段需要指定java类型
<table schema="" tableName=""> <table schema="" tableName="">

37
acupuncture-system/src/main/java/com/acupuncture/system/domain/SysNotice.java

@ -2,11 +2,15 @@ package com.acupuncture.system.domain;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.acupuncture.common.core.domain.BaseEntity; import com.acupuncture.common.core.domain.BaseEntity;
import com.acupuncture.common.xss.Xss; import com.acupuncture.common.xss.Xss;
import java.util.List;
/** /**
* 通知公告表 sys_notice * 通知公告表 sys_notice
* *
@ -31,6 +35,39 @@ public class SysNotice extends BaseEntity
/** 公告状态(0正常 1关闭) */ /** 公告状态(0正常 1关闭) */
private String status; private String status;
/** 发送用户ID列表 不填则发送给所有 */
private List<Long> userIdList;
/** 是否公共的(0否 1是) */
private Byte isAll;
@JsonIgnore
private List<Long> noticeIdList;
public List<Long> getNoticeIdList() {
return noticeIdList;
}
public void setNoticeIdList(List<Long> noticeIdList) {
this.noticeIdList = noticeIdList;
}
public Byte getIsAll() {
return isAll;
}
public void setIsAll(Byte isAll) {
this.isAll = isAll;
}
public List<Long> getUserIdList() {
return userIdList;
}
public void setUserIdList(List<Long> userIdList) {
this.userIdList = userIdList;
}
public Long getNoticeId() public Long getNoticeId()
{ {
return noticeId; return noticeId;

15
acupuncture-system/src/main/java/com/acupuncture/system/domain/SysUserOnline.java

@ -1,5 +1,9 @@
package com.acupuncture.system.domain; package com.acupuncture.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
/** /**
* 当前在线会话 * 当前在线会话
* *
@ -31,6 +35,17 @@ public class SysUserOnline
/** 登录时间 */ /** 登录时间 */
private Long loginTime; private Long loginTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date lastVisitTime;
public Date getLastVisitTime() {
return lastVisitTime;
}
public void setLastVisitTime(Date lastVisitTime) {
this.lastVisitTime = lastVisitTime;
}
public String getTokenId() public String getTokenId()
{ {
return tokenId; return tokenId;

106
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/SysNoticeUser.java

@ -0,0 +1,106 @@
package com.acupuncture.system.domain.po;
import java.io.Serializable;
import java.util.Date;
public class SysNoticeUser implements Serializable {
private Long id;
private Long noticeId;
private Long userId;
private String createBy;
private Date createTime;
private String updateBy;
private Date updateTime;
private String remark;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getNoticeId() {
return noticeId;
}
public void setNoticeId(Long noticeId) {
this.noticeId = noticeId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy == null ? null : createBy.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy == null ? null : updateBy.trim();
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark == null ? null : remark.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(", noticeId=").append(noticeId);
sb.append(", userId=").append(userId);
sb.append(", createBy=").append(createBy);
sb.append(", createTime=").append(createTime);
sb.append(", updateBy=").append(updateBy);
sb.append(", updateTime=").append(updateTime);
sb.append(", remark=").append(remark);
sb.append("]");
return sb.toString();
}
}

711
acupuncture-system/src/main/java/com/acupuncture/system/domain/po/SysNoticeUserExample.java

@ -0,0 +1,711 @@
package com.acupuncture.system.domain.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class SysNoticeUserExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public SysNoticeUserExample() {
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 andNoticeIdIsNull() {
addCriterion("notice_id is null");
return (Criteria) this;
}
public Criteria andNoticeIdIsNotNull() {
addCriterion("notice_id is not null");
return (Criteria) this;
}
public Criteria andNoticeIdEqualTo(Long value) {
addCriterion("notice_id =", value, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdNotEqualTo(Long value) {
addCriterion("notice_id <>", value, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdGreaterThan(Long value) {
addCriterion("notice_id >", value, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdGreaterThanOrEqualTo(Long value) {
addCriterion("notice_id >=", value, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdLessThan(Long value) {
addCriterion("notice_id <", value, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdLessThanOrEqualTo(Long value) {
addCriterion("notice_id <=", value, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdIn(List<Long> values) {
addCriterion("notice_id in", values, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdNotIn(List<Long> values) {
addCriterion("notice_id not in", values, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdBetween(Long value1, Long value2) {
addCriterion("notice_id between", value1, value2, "noticeId");
return (Criteria) this;
}
public Criteria andNoticeIdNotBetween(Long value1, Long value2) {
addCriterion("notice_id not between", value1, value2, "noticeId");
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 andCreateByIsNull() {
addCriterion("create_by is null");
return (Criteria) this;
}
public Criteria andCreateByIsNotNull() {
addCriterion("create_by is not null");
return (Criteria) this;
}
public Criteria andCreateByEqualTo(String value) {
addCriterion("create_by =", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotEqualTo(String value) {
addCriterion("create_by <>", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThan(String value) {
addCriterion("create_by >", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByGreaterThanOrEqualTo(String value) {
addCriterion("create_by >=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThan(String value) {
addCriterion("create_by <", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLessThanOrEqualTo(String value) {
addCriterion("create_by <=", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByLike(String value) {
addCriterion("create_by like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotLike(String value) {
addCriterion("create_by not like", value, "createBy");
return (Criteria) this;
}
public Criteria andCreateByIn(List<String> values) {
addCriterion("create_by in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotIn(List<String> values) {
addCriterion("create_by not in", values, "createBy");
return (Criteria) this;
}
public Criteria andCreateByBetween(String value1, String value2) {
addCriterion("create_by between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateByNotBetween(String value1, String value2) {
addCriterion("create_by not between", value1, value2, "createBy");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateByIsNull() {
addCriterion("update_by is null");
return (Criteria) this;
}
public Criteria andUpdateByIsNotNull() {
addCriterion("update_by is not null");
return (Criteria) this;
}
public Criteria andUpdateByEqualTo(String value) {
addCriterion("update_by =", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotEqualTo(String value) {
addCriterion("update_by <>", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThan(String value) {
addCriterion("update_by >", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByGreaterThanOrEqualTo(String value) {
addCriterion("update_by >=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThan(String value) {
addCriterion("update_by <", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLessThanOrEqualTo(String value) {
addCriterion("update_by <=", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByLike(String value) {
addCriterion("update_by like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotLike(String value) {
addCriterion("update_by not like", value, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByIn(List<String> values) {
addCriterion("update_by in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotIn(List<String> values) {
addCriterion("update_by not in", values, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByBetween(String value1, String value2) {
addCriterion("update_by between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateByNotBetween(String value1, String value2) {
addCriterion("update_by not between", value1, value2, "updateBy");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andRemarkIsNull() {
addCriterion("remark is null");
return (Criteria) this;
}
public Criteria andRemarkIsNotNull() {
addCriterion("remark is not null");
return (Criteria) this;
}
public Criteria andRemarkEqualTo(String value) {
addCriterion("remark =", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotEqualTo(String value) {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
addCriterion("remark >=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThan(String value) {
addCriterion("remark <", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLessThanOrEqualTo(String value) {
addCriterion("remark <=", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkLike(String value) {
addCriterion("remark like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotLike(String value) {
addCriterion("remark not like", value, "remark");
return (Criteria) this;
}
public Criteria andRemarkIn(List<String> values) {
addCriterion("remark in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotIn(List<String> values) {
addCriterion("remark not in", values, "remark");
return (Criteria) this;
}
public Criteria andRemarkBetween(String value1, String value2) {
addCriterion("remark between", value1, value2, "remark");
return (Criteria) this;
}
public Criteria andRemarkNotBetween(String value1, String value2) {
addCriterion("remark not between", value1, value2, "remark");
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);
}
}
}

4
acupuncture-system/src/main/java/com/acupuncture/system/mapper/SysNoticeMapper.java

@ -2,6 +2,7 @@ package com.acupuncture.system.mapper;
import java.util.List; import java.util.List;
import com.acupuncture.system.domain.SysNotice; import com.acupuncture.system.domain.SysNotice;
import org.apache.ibatis.annotations.Param;
/** /**
* 通知公告表 数据层 * 通知公告表 数据层
@ -24,7 +25,8 @@ public interface SysNoticeMapper
* @param notice 公告信息 * @param notice 公告信息
* @return 公告集合 * @return 公告集合
*/ */
public List<SysNotice> selectNoticeList(SysNotice notice); public List<SysNotice> selectNoticeList(@Param("notice") SysNotice notice,
@Param("userId") Long userId);
/** /**
* 新增公告 * 新增公告

28
acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/SysNoticeUserMapper.java

@ -0,0 +1,28 @@
package com.acupuncture.system.persist.mapper;
import com.acupuncture.system.domain.po.SysNoticeUser;
import com.acupuncture.system.domain.po.SysNoticeUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface SysNoticeUserMapper {
long countByExample(SysNoticeUserExample example);
int deleteByPrimaryKey(Long id);
int insert(SysNoticeUser record);
int insertSelective(SysNoticeUser record);
List<SysNoticeUser> selectByExample(SysNoticeUserExample example);
SysNoticeUser selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") SysNoticeUser record, @Param("example") SysNoticeUserExample example);
int updateByExample(@Param("record") SysNoticeUser record, @Param("example") SysNoticeUserExample example);
int updateByPrimaryKeySelective(SysNoticeUser record);
int updateByPrimaryKey(SysNoticeUser record);
}

140
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/SysNoticeServiceImpl.java

@ -1,92 +1,184 @@
package com.acupuncture.system.service.impl; package com.acupuncture.system.service.impl;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.IdUtil;
import com.acupuncture.common.utils.SecurityUtils;
import com.acupuncture.system.domain.po.SysNoticeUser;
import com.acupuncture.system.domain.po.SysNoticeUserExample;
import com.acupuncture.system.persist.mapper.SysNoticeUserMapper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.acupuncture.system.domain.SysNotice; import com.acupuncture.system.domain.SysNotice;
import com.acupuncture.system.mapper.SysNoticeMapper; import com.acupuncture.system.mapper.SysNoticeMapper;
import com.acupuncture.system.service.ISysNoticeService; import com.acupuncture.system.service.ISysNoticeService;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
/** /**
* 公告 服务层实现 * 公告 服务层实现
* *
* @author acupuncture * @author acupuncture
*/ */
@Service @Service
public class SysNoticeServiceImpl implements ISysNoticeService @Transactional
{ public class SysNoticeServiceImpl implements ISysNoticeService {
@Autowired @Autowired
private SysNoticeMapper noticeMapper; private SysNoticeMapper noticeMapper;
@Resource
private SysNoticeUserMapper sysNoticeUserMapper;
/** /**
* 查询公告信息 * 查询公告信息
* *
* @param noticeId 公告ID * @param noticeId 公告ID
* @return 公告信息 * @return 公告信息
*/ */
@Override @Override
public SysNotice selectNoticeById(Long noticeId) public SysNotice selectNoticeById(Long noticeId) {
{
return noticeMapper.selectNoticeById(noticeId); return noticeMapper.selectNoticeById(noticeId);
} }
/** /**
* 查询公告列表 * 查询公告列表
* *
* @param notice 公告信息 * @param notice 公告信息
* @return 公告集合 * @return 公告集合
*/ */
@Override @Override
public List<SysNotice> selectNoticeList(SysNotice notice) public List<SysNotice> selectNoticeList(SysNotice notice) {
{ if (!SecurityUtils.isAdmin(SecurityUtils.getUserId())) {
return noticeMapper.selectNoticeList(notice); SysNoticeUserExample sysNoticeUserExample = new SysNoticeUserExample();
sysNoticeUserExample.createCriteria().andUserIdEqualTo(SecurityUtils.getUserId());
List<SysNoticeUser> sysNoticeUsers = sysNoticeUserMapper.selectByExample(sysNoticeUserExample);
List<Long> noticeIdList = new ArrayList<>();
if (CollUtil.isNotEmpty(sysNoticeUsers)) {
noticeIdList = sysNoticeUsers.stream().map(sysNoticeUser -> sysNoticeUser.getNoticeId()).collect(Collectors.toList());
}
notice.setNoticeIdList(noticeIdList);
}
List<SysNotice> sysNotices = noticeMapper.selectNoticeList(notice, SecurityUtils.getUserId());
if (CollUtil.isNotEmpty(sysNotices)) {
for (SysNotice sysNotice : sysNotices) {
SysNoticeUserExample sysNoticeUserExample1 = new SysNoticeUserExample();
sysNoticeUserExample1.createCriteria().andNoticeIdEqualTo(sysNotice.getNoticeId());
List<SysNoticeUser> sysNoticeUsers1 = sysNoticeUserMapper.selectByExample(sysNoticeUserExample1);
if (CollUtil.isNotEmpty(sysNoticeUsers1)) {
sysNotice.setUserIdList(sysNoticeUsers1.stream().map(SysNoticeUser::getUserId).collect(Collectors.toList()));
}
}
}
return sysNotices;
} }
/** /**
* 新增公告 * 新增公告
* *
* @param notice 公告信息 * @param notice 公告信息
* @return 结果 * @return 结果
*/ */
@Override @Override
public int insertNotice(SysNotice notice) public int insertNotice(SysNotice notice) {
{ if (CollUtil.isNotEmpty(notice.getUserIdList())) {
return noticeMapper.insertNotice(notice); notice.setIsAll((byte) 0);
} else {
notice.setIsAll((byte) 1);
}
int i = noticeMapper.insertNotice(notice);
if (CollUtil.isNotEmpty(notice.getUserIdList())) {
for (Long userId : notice.getUserIdList()) {
SysNoticeUser sysNoticeUser = new SysNoticeUser();
sysNoticeUser.setId(IdUtil.getSnowflakeNextId());
sysNoticeUser.setNoticeId(notice.getNoticeId());
sysNoticeUser.setUserId(userId);
sysNoticeUser.setCreateBy(SecurityUtils.getUsername());
sysNoticeUser.setCreateTime(new Date());
//新增通知用户关联关系
sysNoticeUserMapper.insertSelective(sysNoticeUser);
}
}
return i;
} }
/** /**
* 修改公告 * 修改公告
* *
* @param notice 公告信息 * @param notice 公告信息
* @return 结果 * @return 结果
*/ */
@Override @Override
public int updateNotice(SysNotice notice) public int updateNotice(SysNotice notice) {
{ if (CollUtil.isNotEmpty(notice.getUserIdList())) {
return noticeMapper.updateNotice(notice); notice.setIsAll((byte) 0);
} else {
notice.setIsAll((byte) 1);
}
int i = noticeMapper.updateNotice(notice);
SysNoticeUserExample sysNoticeUserExample = new SysNoticeUserExample();
sysNoticeUserExample.createCriteria().andNoticeIdEqualTo(notice.getNoticeId());
List<SysNoticeUser> sysNoticeUsers = sysNoticeUserMapper.selectByExample(sysNoticeUserExample);
if (CollUtil.isNotEmpty(sysNoticeUsers)) {
for (SysNoticeUser sysNoticeUser : sysNoticeUsers) {
sysNoticeUserMapper.deleteByPrimaryKey(sysNoticeUser.getId());
}
}
if (CollUtil.isNotEmpty(notice.getUserIdList())) {
for (Long userId : notice.getUserIdList()) {
SysNoticeUser sysNoticeUser = new SysNoticeUser();
sysNoticeUser.setId(IdUtil.getSnowflakeNextId());
sysNoticeUser.setNoticeId(notice.getNoticeId());
sysNoticeUser.setUserId(userId);
sysNoticeUser.setCreateBy(SecurityUtils.getUsername());
sysNoticeUser.setCreateTime(new Date());
//新增通知用户关联关系
sysNoticeUserMapper.insertSelective(sysNoticeUser);
}
}
return i;
} }
/** /**
* 删除公告对象 * 删除公告对象
* *
* @param noticeId 公告ID * @param noticeId 公告ID
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteNoticeById(Long noticeId) public int deleteNoticeById(Long noticeId) {
{ SysNoticeUserExample sysNoticeUserExample = new SysNoticeUserExample();
sysNoticeUserExample.createCriteria().andNoticeIdEqualTo(noticeId);
List<SysNoticeUser> sysNoticeUsers = sysNoticeUserMapper.selectByExample(sysNoticeUserExample);
if (CollUtil.isNotEmpty(sysNoticeUsers)) {
for (SysNoticeUser sysNoticeUser : sysNoticeUsers) {
sysNoticeUserMapper.deleteByPrimaryKey(sysNoticeUser.getId());
}
}
return noticeMapper.deleteNoticeById(noticeId); return noticeMapper.deleteNoticeById(noticeId);
} }
/** /**
* 批量删除公告信息 * 批量删除公告信息
* *
* @param noticeIds 需要删除的公告ID * @param noticeIds 需要删除的公告ID
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteNoticeByIds(Long[] noticeIds) public int deleteNoticeByIds(Long[] noticeIds) {
{ SysNoticeUserExample sysNoticeUserExample = new SysNoticeUserExample();
sysNoticeUserExample.createCriteria().andNoticeIdIn(Arrays.asList(noticeIds));
List<SysNoticeUser> sysNoticeUsers = sysNoticeUserMapper.selectByExample(sysNoticeUserExample);
if (CollUtil.isNotEmpty(sysNoticeUsers)) {
for (SysNoticeUser sysNoticeUser : sysNoticeUsers) {
sysNoticeUserMapper.deleteByPrimaryKey(sysNoticeUser.getId());
}
}
return noticeMapper.deleteNoticeByIds(noticeIds); return noticeMapper.deleteNoticeByIds(noticeIds);
} }
} }

1
acupuncture-system/src/main/java/com/acupuncture/system/service/impl/SysUserOnlineServiceImpl.java

@ -87,6 +87,7 @@ public class SysUserOnlineServiceImpl implements ISysUserOnlineService
sysUserOnline.setBrowser(user.getBrowser()); sysUserOnline.setBrowser(user.getBrowser());
sysUserOnline.setOs(user.getOs()); sysUserOnline.setOs(user.getOs());
sysUserOnline.setLoginTime(user.getLoginTime()); sysUserOnline.setLoginTime(user.getLoginTime());
sysUserOnline.setLastVisitTime(user.getUser().getLoginDate());
if (StringUtils.isNotNull(user.getUser().getDept())) if (StringUtils.isNotNull(user.getUser().getDept()))
{ {
sysUserOnline.setDeptName(user.getUser().getDept().getDeptName()); sysUserOnline.setDeptName(user.getUser().getDept().getDeptName());

41
acupuncture-system/src/main/resources/mapper/system/SysNoticeMapper.xml

@ -30,19 +30,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult"> <select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult">
<include refid="selectNoticeVo"/> <include refid="selectNoticeVo"/>
<where> <where>
<if test="noticeTitle != null and noticeTitle != ''"> <if test="notice.noticeTitle != null and notice.noticeTitle != ''">
AND notice_title like concat('%', #{noticeTitle}, '%') AND notice_title like concat('%', #{notice.noticeTitle}, '%')
</if> </if>
<if test="noticeType != null and noticeType != ''"> <if test="notice.noticeType != null and notice.noticeType != ''">
AND notice_type = #{noticeType} AND notice_type = #{notice.noticeType}
</if> </if>
<if test="createBy != null and createBy != ''"> <if test="notice.createBy != null and notice.createBy != ''">
AND create_by like concat('%', #{createBy}, '%') AND create_by like concat('%', #{notice.createBy}, '%')
</if> </if>
</where> <if test="userId != null and userId != 1">
<if test="notice.noticeIdList != null and notice.noticeIdList.size() > 0">
and ((notice_id in
<foreach collection="notice.noticeIdList" item="noticeId" open="(" separator="," close=")">
#{noticeId}
</foreach>
)
or is_all = 1
)
</if>
<if test="notice.noticeIdList == null or notice.noticeIdList.size() == 0">
and is_all = 1
</if>
</if>
</where>
</select> </select>
<insert id="insertNotice" parameterType="SysNotice"> <insert id="insertNotice" parameterType="SysNotice" useGeneratedKeys="true" keyProperty="noticeId">
insert into sys_notice ( insert into sys_notice (
<if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if> <if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if>
<if test="noticeType != null and noticeType != '' ">notice_type, </if> <if test="noticeType != null and noticeType != '' ">notice_type, </if>
@ -50,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != '' ">status, </if> <if test="status != null and status != '' ">status, </if>
<if test="remark != null and remark != ''">remark,</if> <if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if> <if test="createBy != null and createBy != ''">create_by,</if>
<if test="isAll != null">is_all,</if>
create_time create_time
)values( )values(
<if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if> <if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if>
@ -58,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">#{status}, </if> <if test="status != null and status != ''">#{status}, </if>
<if test="remark != null and remark != ''">#{remark},</if> <if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if> <if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="isAll != null">#{isAll},</if>
sysdate() sysdate()
) )
</insert> </insert>
@ -70,7 +86,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="noticeContent != null">notice_content = #{noticeContent}, </if> <if test="noticeContent != null">notice_content = #{noticeContent}, </if>
<if test="status != null and status != ''">status = #{status}, </if> <if test="status != null and status != ''">status = #{status}, </if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = sysdate() <if test="isAll != null">is_all = #{isAll},</if>
update_time = sysdate()
</set> </set>
where notice_id = #{noticeId} where notice_id = #{noticeId}
</update> </update>

252
acupuncture-system/src/main/resources/mapper/system/SysNoticeUserMapper.xml

@ -0,0 +1,252 @@
<?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.acupuncture.system.persist.mapper.SysNoticeUserMapper">
<resultMap id="BaseResultMap" type="com.acupuncture.system.domain.po.SysNoticeUser">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="notice_id" jdbcType="BIGINT" property="noticeId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</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, notice_id, user_id, create_by, create_time, update_by, update_time, remark
</sql>
<select id="selectByExample" parameterType="com.acupuncture.system.domain.po.SysNoticeUserExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from sys_notice_user
<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 sys_notice_user
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from sys_notice_user
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.acupuncture.system.domain.po.SysNoticeUser">
insert into sys_notice_user (id, notice_id, user_id,
create_by, create_time, update_by,
update_time, remark)
values (#{id,jdbcType=BIGINT}, #{noticeId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
#{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.acupuncture.system.domain.po.SysNoticeUser">
insert into sys_notice_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="noticeId != null">
notice_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="remark != null">
remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="noticeId != null">
#{noticeId,jdbcType=BIGINT},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.acupuncture.system.domain.po.SysNoticeUserExample" resultType="java.lang.Long">
select count(*) from sys_notice_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update sys_notice_user
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.noticeId != null">
notice_id = #{record.noticeId,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateBy != null">
update_by = #{record.updateBy,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.remark != null">
remark = #{record.remark,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update sys_notice_user
set id = #{record.id,jdbcType=BIGINT},
notice_id = #{record.noticeId,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
remark = #{record.remark,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.acupuncture.system.domain.po.SysNoticeUser">
update sys_notice_user
<set>
<if test="noticeId != null">
notice_id = #{noticeId,jdbcType=BIGINT},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.acupuncture.system.domain.po.SysNoticeUser">
update sys_notice_user
set notice_id = #{noticeId,jdbcType=BIGINT},
user_id = #{userId,jdbcType=BIGINT},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
remark = #{remark,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
Loading…
Cancel
Save