From ae13d33279228fc431bdcfa71274a6a6c10b73ef Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Tue, 18 Feb 2020 15:35:31 +0800 Subject: [PATCH] user add column last_role_id --- .../java/io/metersphere/base/domain/User.java | 10 +++ .../metersphere/base/domain/UserExample.java | 70 +++++++++++++++++++ .../io/metersphere/base/mapper/UserMapper.xml | 27 +++++-- 3 files changed, 102 insertions(+), 5 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/domain/User.java b/backend/src/main/java/io/metersphere/base/domain/User.java index 1f57892f2c..8d6a18dd3f 100644 --- a/backend/src/main/java/io/metersphere/base/domain/User.java +++ b/backend/src/main/java/io/metersphere/base/domain/User.java @@ -19,6 +19,8 @@ public class User implements Serializable { private String lastSourceId; + private String lastRoleId; + private static final long serialVersionUID = 1L; public String getId() { @@ -84,4 +86,12 @@ public class User implements Serializable { public void setLastSourceId(String lastSourceId) { this.lastSourceId = lastSourceId == null ? null : lastSourceId.trim(); } + + public String getLastRoleId() { + return lastRoleId; + } + + public void setLastRoleId(String lastRoleId) { + this.lastRoleId = lastRoleId == null ? null : lastRoleId.trim(); + } } \ No newline at end of file diff --git a/backend/src/main/java/io/metersphere/base/domain/UserExample.java b/backend/src/main/java/io/metersphere/base/domain/UserExample.java index 7fd72a8f11..0d85de3ff4 100644 --- a/backend/src/main/java/io/metersphere/base/domain/UserExample.java +++ b/backend/src/main/java/io/metersphere/base/domain/UserExample.java @@ -643,6 +643,76 @@ public class UserExample { addCriterion("last_source_id not between", value1, value2, "lastSourceId"); return (Criteria) this; } + + public Criteria andLastRoleIdIsNull() { + addCriterion("last_role_id is null"); + return (Criteria) this; + } + + public Criteria andLastRoleIdIsNotNull() { + addCriterion("last_role_id is not null"); + return (Criteria) this; + } + + public Criteria andLastRoleIdEqualTo(String value) { + addCriterion("last_role_id =", value, "lastRoleId"); + return (Criteria) this; + } + + public Criteria andLastRoleIdNotEqualTo(String value) { + addCriterion("last_role_id <>", value, "lastRoleId"); + return (Criteria) this; + } + + public Criteria andLastRoleIdGreaterThan(String value) { + addCriterion("last_role_id >", value, "lastRoleId"); + return (Criteria) this; + } + + public Criteria andLastRoleIdGreaterThanOrEqualTo(String value) { + addCriterion("last_role_id >=", value, "lastRoleId"); + return (Criteria) this; + } + + public Criteria andLastRoleIdLessThan(String value) { + addCriterion("last_role_id <", value, "lastRoleId"); + return (Criteria) this; + } + + public Criteria andLastRoleIdLessThanOrEqualTo(String value) { + addCriterion("last_role_id <=", value, "lastRoleId"); + return (Criteria) this; + } + + public Criteria andLastRoleIdLike(String value) { + addCriterion("last_role_id like", value, "lastRoleId"); + return (Criteria) this; + } + + public Criteria andLastRoleIdNotLike(String value) { + addCriterion("last_role_id not like", value, "lastRoleId"); + return (Criteria) this; + } + + public Criteria andLastRoleIdIn(List values) { + addCriterion("last_role_id in", values, "lastRoleId"); + return (Criteria) this; + } + + public Criteria andLastRoleIdNotIn(List values) { + addCriterion("last_role_id not in", values, "lastRoleId"); + return (Criteria) this; + } + + public Criteria andLastRoleIdBetween(String value1, String value2) { + addCriterion("last_role_id between", value1, value2, "lastRoleId"); + return (Criteria) this; + } + + public Criteria andLastRoleIdNotBetween(String value1, String value2) { + addCriterion("last_role_id not between", value1, value2, "lastRoleId"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/metersphere/base/mapper/UserMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/UserMapper.xml index 2cd87f27e1..a2f56b3b20 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/UserMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/UserMapper.xml @@ -10,6 +10,7 @@ + @@ -70,7 +71,7 @@ - id, name, email, phone, status, create_time, update_time, last_source_id + id, name, email, phone, status, create_time, update_time, last_source_id, last_role_id @@ -198,6 +207,9 @@ last_source_id = #{record.lastSourceId,jdbcType=VARCHAR}, + + last_role_id = #{record.lastRoleId,jdbcType=VARCHAR}, + @@ -212,7 +224,8 @@ status = #{record.status,jdbcType=VARCHAR}, create_time = #{record.createTime,jdbcType=BIGINT}, update_time = #{record.updateTime,jdbcType=BIGINT}, - last_source_id = #{record.lastSourceId,jdbcType=VARCHAR} + last_source_id = #{record.lastSourceId,jdbcType=VARCHAR}, + last_role_id = #{record.lastRoleId,jdbcType=VARCHAR} @@ -241,6 +254,9 @@ last_source_id = #{lastSourceId,jdbcType=VARCHAR}, + + last_role_id = #{lastRoleId,jdbcType=VARCHAR}, + where id = #{id,jdbcType=VARCHAR} @@ -252,7 +268,8 @@ status = #{status,jdbcType=VARCHAR}, create_time = #{createTime,jdbcType=BIGINT}, update_time = #{updateTime,jdbcType=BIGINT}, - last_source_id = #{lastSourceId,jdbcType=VARCHAR} + last_source_id = #{lastSourceId,jdbcType=VARCHAR}, + last_role_id = #{lastRoleId,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file