给消息通知表增加用户id字段
This commit is contained in:
parent
89c152647a
commit
e7287d0f8b
@ -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
|
||||
|
||||
@ -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', '发起流程地址', '');
|
||||
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;
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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<Criteria> oredCriteria;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_msg
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public MsgExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
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<Criteria> 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<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
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<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 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;
|
||||
|
||||
|
||||
@ -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<Msg> 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);
|
||||
}
|
||||
@ -1,43 +1,36 @@
|
||||
<?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.jsh.erp.datasource.mappers.MsgMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Msg" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<id column="id" property="id" jdbcType="BIGINT" />
|
||||
<result column="msg_title" property="msgTitle" jdbcType="VARCHAR" />
|
||||
<result column="msg_content" property="msgContent" jdbcType="VARCHAR" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="type" property="type" jdbcType="VARCHAR" />
|
||||
<result column="status" property="status" jdbcType="VARCHAR" />
|
||||
<result column="tenant_id" property="tenantId" jdbcType="BIGINT" />
|
||||
<result column="delete_Flag" property="deleteFlag" jdbcType="VARCHAR" />
|
||||
<?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.jsh.erp.datasource.mappers.MsgMapper">
|
||||
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Msg">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="msg_title" jdbcType="VARCHAR" property="msgTitle" />
|
||||
<result column="msg_content" jdbcType="VARCHAR" property="msgContent" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
<result column="user_id" jdbcType="BIGINT" property="userId" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
|
||||
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
<if test="criteria.valid" >
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
||||
<foreach collection="criteria.criteria" item="criterion" >
|
||||
<choose >
|
||||
<when test="criterion.noValue" >
|
||||
<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" >
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue" >
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue" >
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
@ -48,29 +41,25 @@
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Update_By_Example_Where_Clause" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<where >
|
||||
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
|
||||
<if test="criteria.valid" >
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
||||
<foreach collection="criteria.criteria" item="criterion" >
|
||||
<choose >
|
||||
<when test="criterion.noValue" >
|
||||
<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" >
|
||||
<when test="criterion.singleValue">
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue" >
|
||||
<when test="criterion.betweenValue">
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue" >
|
||||
<when test="criterion.listValue">
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
@ -81,235 +70,203 @@
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
id, msg_title, msg_content, create_time, type, status, tenant_id, delete_Flag
|
||||
<sql id="Base_Column_List">
|
||||
id, msg_title, msg_content, create_time, type, user_id, status, tenant_id, delete_Flag
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.jsh.erp.datasource.entities.MsgExample" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.MsgExample" resultMap="BaseResultMap">
|
||||
select
|
||||
<if test="distinct" >
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from jsh_msg
|
||||
<if test="_parameter != null" >
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null" >
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from jsh_msg
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from jsh_msg
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MsgExample" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<delete id="deleteByExample" parameterType="com.jsh.erp.datasource.entities.MsgExample">
|
||||
delete from jsh_msg
|
||||
<if test="_parameter != null" >
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.Msg" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<insert id="insert" parameterType="com.jsh.erp.datasource.entities.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>
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Msg" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Msg">
|
||||
insert into jsh_msg
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="msgTitle != null" >
|
||||
<if test="msgTitle != null">
|
||||
msg_title,
|
||||
</if>
|
||||
<if test="msgContent != null" >
|
||||
<if test="msgContent != null">
|
||||
msg_content,
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="type != null" >
|
||||
<if test="type != null">
|
||||
type,
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
<if test="userId != null">
|
||||
user_id,
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="tenantId != null" >
|
||||
<if test="tenantId != null">
|
||||
tenant_id,
|
||||
</if>
|
||||
<if test="deleteFlag != null" >
|
||||
<if test="deleteFlag != null">
|
||||
delete_Flag,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="id != null" >
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="msgTitle != null" >
|
||||
<if test="msgTitle != null">
|
||||
#{msgTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="msgContent != null" >
|
||||
<if test="msgContent != null">
|
||||
#{msgContent,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
<if test="createTime != null">
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="type != null" >
|
||||
<if test="type != null">
|
||||
#{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
<if test="userId != null">
|
||||
#{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null" >
|
||||
<if test="tenantId != null">
|
||||
#{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="deleteFlag != null" >
|
||||
<if test="deleteFlag != null">
|
||||
#{deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MsgExample" resultType="java.lang.Integer" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<select id="countByExample" parameterType="com.jsh.erp.datasource.entities.MsgExample" resultType="java.lang.Long">
|
||||
select count(*) from jsh_msg
|
||||
<if test="_parameter != null" >
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</select>
|
||||
<update id="updateByExampleSelective" parameterType="map" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<update id="updateByExampleSelective" parameterType="map">
|
||||
update jsh_msg
|
||||
<set >
|
||||
<if test="record.id != null" >
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.msgTitle != null" >
|
||||
<if test="record.msgTitle != null">
|
||||
msg_title = #{record.msgTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.msgContent != null" >
|
||||
<if test="record.msgContent != null">
|
||||
msg_content = #{record.msgContent,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.createTime != null" >
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.type != null" >
|
||||
<if test="record.type != null">
|
||||
type = #{record.type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.status != null" >
|
||||
<if test="record.userId != null">
|
||||
user_id = #{record.userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status = #{record.status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.tenantId != null" >
|
||||
<if test="record.tenantId != null">
|
||||
tenant_id = #{record.tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="record.deleteFlag != null" >
|
||||
<if test="record.deleteFlag != null">
|
||||
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
<if test="_parameter != null" >
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByExample" parameterType="map" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<update id="updateByExample" parameterType="map">
|
||||
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}
|
||||
<if test="_parameter != null" >
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Msg" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.jsh.erp.datasource.entities.Msg">
|
||||
update jsh_msg
|
||||
<set >
|
||||
<if test="msgTitle != null" >
|
||||
<set>
|
||||
<if test="msgTitle != null">
|
||||
msg_title = #{msgTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="msgContent != null" >
|
||||
<if test="msgContent != null">
|
||||
msg_content = #{msgContent,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null" >
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="type != null" >
|
||||
<if test="type != null">
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
<if test="userId != null">
|
||||
user_id = #{userId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="status != null">
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="tenantId != null" >
|
||||
<if test="tenantId != null">
|
||||
tenant_id = #{tenantId,jdbcType=BIGINT},
|
||||
</if>
|
||||
<if test="deleteFlag != null" >
|
||||
<if test="deleteFlag != null">
|
||||
delete_Flag = #{deleteFlag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Msg" >
|
||||
<!--
|
||||
WARNING - @mbggenerated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<update id="updateByPrimaryKey" parameterType="com.jsh.erp.datasource.entities.Msg">
|
||||
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}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user