diff --git a/jshERP-boot/docs/jsh_erp.sql b/jshERP-boot/docs/jsh_erp.sql index aa9035988..6030f939a 100644 --- a/jshERP-boot/docs/jsh_erp.sql +++ b/jshERP-boot/docs/jsh_erp.sql @@ -599,6 +599,7 @@ CREATE TABLE `jsh_msg` ( `msg_content` varchar(500) DEFAULT NULL COMMENT '消息内容', `create_time` datetime DEFAULT NULL COMMENT '创建时间', `type` varchar(20) DEFAULT NULL COMMENT '消息类型', + `user_id` bigint(20) NULL DEFAULT NULL COMMENT '接收人id' , `status` varchar(1) DEFAULT NULL COMMENT '状态,1未读 2已读', `tenant_id` bigint(20) DEFAULT NULL COMMENT '租户id', `delete_Flag` varchar(1) DEFAULT '0' COMMENT '删除标记,0未删除,1删除', @@ -608,7 +609,7 @@ CREATE TABLE `jsh_msg` ( -- ---------------------------- -- Records of jsh_msg -- ---------------------------- -INSERT INTO `jsh_msg` VALUES ('2', '标题1', '内容1', '2019-09-10 00:11:39', '类型1', '2', '63', '0'); +INSERT INTO `jsh_msg` VALUES ('2', '标题1', '内容1', '2019-09-10 00:11:39', '类型1', '63', '2', '63', '0'); -- ---------------------------- -- Table structure for jsh_organization diff --git a/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt b/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt index b2b6bcc26..221c2697d 100644 --- a/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt +++ b/jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt @@ -1429,7 +1429,9 @@ alter table jsh_role add price_limit varchar(50) DEFAULT NULL COMMENT '价格屏 -- 给系统参数表增加多级审核开关字段 -- 给用户表增加是否经理字段,默认为否 -- 给平台配置表增加发起流程地址 +-- 给消息表增加接收人字段 -- -------------------------------------------------------- alter table jsh_system_config add multi_level_approval_flag varchar(1) DEFAULT '0' COMMENT '多级审核启用标记,0未启用,1启用' after purchase_by_sale_flag; alter table jsh_user add leader_flag varchar(1) DEFAULT '0' COMMENT '是否经理,0否,1是' after password; -INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('send_workflow_url', '发起流程地址', ''); \ No newline at end of file +INSERT INTO `jsh_platform_config` (`platform_key`, `platform_key_info`, `platform_value`) VALUES ('send_workflow_url', '发起流程地址', ''); +alter table jsh_msg add user_id bigint(20) DEFAULT NULL COMMENT '接收人id' after type; \ No newline at end of file diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/Msg.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/Msg.java index 931521b63..f2e6ca773 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/Msg.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/Msg.java @@ -3,258 +3,92 @@ package com.jsh.erp.datasource.entities; import java.util.Date; public class Msg { - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database column jsh_msg.id - * - * @mbggenerated - */ private Long id; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database column jsh_msg.msg_title - * - * @mbggenerated - */ private String msgTitle; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database column jsh_msg.msg_content - * - * @mbggenerated - */ private String msgContent; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database column jsh_msg.create_time - * - * @mbggenerated - */ private Date createTime; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database column jsh_msg.type - * - * @mbggenerated - */ private String type; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database column jsh_msg.status - * - * @mbggenerated - */ + private Long userId; + private String status; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database column jsh_msg.tenant_id - * - * @mbggenerated - */ private Long tenantId; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database column jsh_msg.delete_Flag - * - * @mbggenerated - */ private String deleteFlag; - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column jsh_msg.id - * - * @return the value of jsh_msg.id - * - * @mbggenerated - */ public Long getId() { return id; } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column jsh_msg.id - * - * @param id the value for jsh_msg.id - * - * @mbggenerated - */ public void setId(Long id) { this.id = id; } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column jsh_msg.msg_title - * - * @return the value of jsh_msg.msg_title - * - * @mbggenerated - */ public String getMsgTitle() { return msgTitle; } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column jsh_msg.msg_title - * - * @param msgTitle the value for jsh_msg.msg_title - * - * @mbggenerated - */ public void setMsgTitle(String msgTitle) { this.msgTitle = msgTitle == null ? null : msgTitle.trim(); } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column jsh_msg.msg_content - * - * @return the value of jsh_msg.msg_content - * - * @mbggenerated - */ public String getMsgContent() { return msgContent; } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column jsh_msg.msg_content - * - * @param msgContent the value for jsh_msg.msg_content - * - * @mbggenerated - */ public void setMsgContent(String msgContent) { this.msgContent = msgContent == null ? null : msgContent.trim(); } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column jsh_msg.create_time - * - * @return the value of jsh_msg.create_time - * - * @mbggenerated - */ public Date getCreateTime() { return createTime; } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column jsh_msg.create_time - * - * @param createTime the value for jsh_msg.create_time - * - * @mbggenerated - */ public void setCreateTime(Date createTime) { this.createTime = createTime; } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column jsh_msg.type - * - * @return the value of jsh_msg.type - * - * @mbggenerated - */ public String getType() { return type; } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column jsh_msg.type - * - * @param type the value for jsh_msg.type - * - * @mbggenerated - */ public void setType(String type) { this.type = type == null ? null : type.trim(); } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column jsh_msg.status - * - * @return the value of jsh_msg.status - * - * @mbggenerated - */ + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + public String getStatus() { return status; } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column jsh_msg.status - * - * @param status the value for jsh_msg.status - * - * @mbggenerated - */ public void setStatus(String status) { this.status = status == null ? null : status.trim(); } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column jsh_msg.tenant_id - * - * @return the value of jsh_msg.tenant_id - * - * @mbggenerated - */ public Long getTenantId() { return tenantId; } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column jsh_msg.tenant_id - * - * @param tenantId the value for jsh_msg.tenant_id - * - * @mbggenerated - */ public void setTenantId(Long tenantId) { this.tenantId = tenantId; } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column jsh_msg.delete_Flag - * - * @return the value of jsh_msg.delete_Flag - * - * @mbggenerated - */ public String getDeleteFlag() { return deleteFlag; } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column jsh_msg.delete_Flag - * - * @param deleteFlag the value for jsh_msg.delete_Flag - * - * @mbggenerated - */ public void setDeleteFlag(String deleteFlag) { this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim(); } diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/MsgExample.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/MsgExample.java index 88dff99f7..5f2ba3c3e 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/MsgExample.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/MsgExample.java @@ -5,118 +5,46 @@ import java.util.Date; import java.util.List; public class MsgExample { - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table jsh_msg - * - * @mbggenerated - */ protected String orderByClause; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table jsh_msg - * - * @mbggenerated - */ protected boolean distinct; - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table jsh_msg - * - * @mbggenerated - */ protected List oredCriteria; - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ public MsgExample() { - oredCriteria = new ArrayList(); + oredCriteria = new ArrayList<>(); } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ public String getOrderByClause() { return orderByClause; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ public void setDistinct(boolean distinct) { this.distinct = distinct; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ public boolean isDistinct() { return distinct; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ public List getOredCriteria() { return oredCriteria; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ public void or(Criteria criteria) { oredCriteria.add(criteria); } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { @@ -125,41 +53,23 @@ public class MsgExample { return criteria; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table jsh_msg - * - * @mbggenerated - */ protected abstract static class GeneratedCriteria { protected List criteria; protected GeneratedCriteria() { super(); - criteria = new ArrayList(); + criteria = new ArrayList<>(); } public boolean isValid() { @@ -525,6 +435,66 @@ public class MsgExample { 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 values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List 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 andStatusIsNull() { addCriterion("status is null"); return (Criteria) this; @@ -726,25 +696,12 @@ public class MsgExample { } } - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table jsh_msg - * - * @mbggenerated do_not_delete_during_merge - */ public static class Criteria extends GeneratedCriteria { - protected Criteria() { super(); } } - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table jsh_msg - * - * @mbggenerated - */ public static class Criterion { private String condition; diff --git a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/MsgMapper.java b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/MsgMapper.java index dc3cd823a..f52727de5 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/MsgMapper.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/datasource/mappers/MsgMapper.java @@ -6,91 +6,25 @@ import java.util.List; import org.apache.ibatis.annotations.Param; public interface MsgMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ - int countByExample(MsgExample example); + long countByExample(MsgExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ int deleteByExample(MsgExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ int insert(Msg record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ int insertSelective(Msg record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ List selectByExample(MsgExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ Msg selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ int updateByExampleSelective(@Param("record") Msg record, @Param("example") MsgExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ int updateByExample(@Param("record") Msg record, @Param("example") MsgExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ int updateByPrimaryKeySelective(Msg record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table jsh_msg - * - * @mbggenerated - */ int updateByPrimaryKey(Msg record); } \ No newline at end of file diff --git a/jshERP-boot/src/main/resources/mapper_xml/MsgMapper.xml b/jshERP-boot/src/main/resources/mapper_xml/MsgMapper.xml index 419dee9ea..d9e4cf9aa 100644 --- a/jshERP-boot/src/main/resources/mapper_xml/MsgMapper.xml +++ b/jshERP-boot/src/main/resources/mapper_xml/MsgMapper.xml @@ -1,43 +1,36 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -48,29 +41,25 @@ - - - - - - - - - + + + + + + + + and ${criterion.condition} - + and ${criterion.condition} #{criterion.value} - + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - + and ${criterion.condition} - + #{listItem} @@ -81,235 +70,203 @@ - - - id, msg_title, msg_content, create_time, type, status, tenant_id, delete_Flag + + id, msg_title, msg_content, create_time, type, user_id, status, tenant_id, delete_Flag - select - + distinct from jsh_msg - + - + order by ${orderByClause} - select from jsh_msg where id = #{id,jdbcType=BIGINT} - - + delete from jsh_msg where id = #{id,jdbcType=BIGINT} - - + delete from jsh_msg - + - - + insert into jsh_msg (id, msg_title, msg_content, - create_time, type, status, - tenant_id, delete_Flag) + create_time, type, user_id, + status, tenant_id, delete_Flag + ) values (#{id,jdbcType=BIGINT}, #{msgTitle,jdbcType=VARCHAR}, #{msgContent,jdbcType=VARCHAR}, - #{createTime,jdbcType=TIMESTAMP}, #{type,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, - #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR}) + #{createTime,jdbcType=TIMESTAMP}, #{type,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, + #{status,jdbcType=VARCHAR}, #{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR} + ) - - + insert into jsh_msg - - + + id, - + msg_title, - + msg_content, - + create_time, - + type, - + + user_id, + + status, - + tenant_id, - + delete_Flag, - - + + #{id,jdbcType=BIGINT}, - + #{msgTitle,jdbcType=VARCHAR}, - + #{msgContent,jdbcType=VARCHAR}, - + #{createTime,jdbcType=TIMESTAMP}, - + #{type,jdbcType=VARCHAR}, - + + #{userId,jdbcType=BIGINT}, + + #{status,jdbcType=VARCHAR}, - + #{tenantId,jdbcType=BIGINT}, - + #{deleteFlag,jdbcType=VARCHAR}, - select count(*) from jsh_msg - + - - + update jsh_msg - - + + id = #{record.id,jdbcType=BIGINT}, - + msg_title = #{record.msgTitle,jdbcType=VARCHAR}, - + msg_content = #{record.msgContent,jdbcType=VARCHAR}, - + create_time = #{record.createTime,jdbcType=TIMESTAMP}, - + type = #{record.type,jdbcType=VARCHAR}, - + + user_id = #{record.userId,jdbcType=BIGINT}, + + status = #{record.status,jdbcType=VARCHAR}, - + tenant_id = #{record.tenantId,jdbcType=BIGINT}, - + delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR}, - + - - + update jsh_msg set id = #{record.id,jdbcType=BIGINT}, msg_title = #{record.msgTitle,jdbcType=VARCHAR}, msg_content = #{record.msgContent,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=TIMESTAMP}, type = #{record.type,jdbcType=VARCHAR}, + user_id = #{record.userId,jdbcType=BIGINT}, status = #{record.status,jdbcType=VARCHAR}, tenant_id = #{record.tenantId,jdbcType=BIGINT}, delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR} - + - - + update jsh_msg - - + + msg_title = #{msgTitle,jdbcType=VARCHAR}, - + msg_content = #{msgContent,jdbcType=VARCHAR}, - + create_time = #{createTime,jdbcType=TIMESTAMP}, - + type = #{type,jdbcType=VARCHAR}, - + + user_id = #{userId,jdbcType=BIGINT}, + + status = #{status,jdbcType=VARCHAR}, - + tenant_id = #{tenantId,jdbcType=BIGINT}, - + delete_Flag = #{deleteFlag,jdbcType=VARCHAR}, where id = #{id,jdbcType=BIGINT} - - + update jsh_msg set msg_title = #{msgTitle,jdbcType=VARCHAR}, msg_content = #{msgContent,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=TIMESTAMP}, type = #{type,jdbcType=VARCHAR}, + user_id = #{userId,jdbcType=BIGINT}, status = #{status,jdbcType=VARCHAR}, tenant_id = #{tenantId,jdbcType=BIGINT}, delete_Flag = #{deleteFlag,jdbcType=VARCHAR}