From bb17350411b7d1d44af2bf8ef7c7fee4ba258899 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 24 Feb 2021 14:29:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=AE=A1=E7=90=86dao=E5=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/dataease/base/domain/SysUser.java | 39 + .../dataease/base/domain/SysUserExample.java | 1180 +++++++++++++++++ .../base/domain/SysUsersRolesExample.java | 320 +++++ .../base/domain/SysUsersRolesKey.java | 13 + .../dataease/base/mapper/SysUserMapper.java | 30 + .../io/dataease/base/mapper/SysUserMapper.xml | 370 ++++++ .../base/mapper/SysUsersRolesMapper.java | 24 + .../base/mapper/SysUsersRolesMapper.xml | 145 ++ 8 files changed, 2121 insertions(+) create mode 100644 backend/src/main/java/io/dataease/base/domain/SysUser.java create mode 100644 backend/src/main/java/io/dataease/base/domain/SysUserExample.java create mode 100644 backend/src/main/java/io/dataease/base/domain/SysUsersRolesExample.java create mode 100644 backend/src/main/java/io/dataease/base/domain/SysUsersRolesKey.java create mode 100644 backend/src/main/java/io/dataease/base/mapper/SysUserMapper.java create mode 100644 backend/src/main/java/io/dataease/base/mapper/SysUserMapper.xml create mode 100644 backend/src/main/java/io/dataease/base/mapper/SysUsersRolesMapper.java create mode 100644 backend/src/main/java/io/dataease/base/mapper/SysUsersRolesMapper.xml diff --git a/backend/src/main/java/io/dataease/base/domain/SysUser.java b/backend/src/main/java/io/dataease/base/domain/SysUser.java new file mode 100644 index 0000000000..56775ba68b --- /dev/null +++ b/backend/src/main/java/io/dataease/base/domain/SysUser.java @@ -0,0 +1,39 @@ +package io.dataease.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class SysUser implements Serializable { + private Long userId; + + private Long deptId; + + private String username; + + private String nickName; + + private String gender; + + private String phone; + + private String email; + + private String password; + + private Boolean isAdmin; + + private Long enabled; + + private String createBy; + + private String updateBy; + + private Long pwdResetTime; + + private Long createTime; + + private Long updateTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/domain/SysUserExample.java b/backend/src/main/java/io/dataease/base/domain/SysUserExample.java new file mode 100644 index 0000000000..1bc5260883 --- /dev/null +++ b/backend/src/main/java/io/dataease/base/domain/SysUserExample.java @@ -0,0 +1,1180 @@ +package io.dataease.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class SysUserExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysUserExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 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 andDeptIdIsNull() { + addCriterion("dept_id is null"); + return (Criteria) this; + } + + public Criteria andDeptIdIsNotNull() { + addCriterion("dept_id is not null"); + return (Criteria) this; + } + + public Criteria andDeptIdEqualTo(Long value) { + addCriterion("dept_id =", value, "deptId"); + return (Criteria) this; + } + + public Criteria andDeptIdNotEqualTo(Long value) { + addCriterion("dept_id <>", value, "deptId"); + return (Criteria) this; + } + + public Criteria andDeptIdGreaterThan(Long value) { + addCriterion("dept_id >", value, "deptId"); + return (Criteria) this; + } + + public Criteria andDeptIdGreaterThanOrEqualTo(Long value) { + addCriterion("dept_id >=", value, "deptId"); + return (Criteria) this; + } + + public Criteria andDeptIdLessThan(Long value) { + addCriterion("dept_id <", value, "deptId"); + return (Criteria) this; + } + + public Criteria andDeptIdLessThanOrEqualTo(Long value) { + addCriterion("dept_id <=", value, "deptId"); + return (Criteria) this; + } + + public Criteria andDeptIdIn(List values) { + addCriterion("dept_id in", values, "deptId"); + return (Criteria) this; + } + + public Criteria andDeptIdNotIn(List values) { + addCriterion("dept_id not in", values, "deptId"); + return (Criteria) this; + } + + public Criteria andDeptIdBetween(Long value1, Long value2) { + addCriterion("dept_id between", value1, value2, "deptId"); + return (Criteria) this; + } + + public Criteria andDeptIdNotBetween(Long value1, Long value2) { + addCriterion("dept_id not between", value1, value2, "deptId"); + return (Criteria) this; + } + + public Criteria andUsernameIsNull() { + addCriterion("username is null"); + return (Criteria) this; + } + + public Criteria andUsernameIsNotNull() { + addCriterion("username is not null"); + return (Criteria) this; + } + + public Criteria andUsernameEqualTo(String value) { + addCriterion("username =", value, "username"); + return (Criteria) this; + } + + public Criteria andUsernameNotEqualTo(String value) { + addCriterion("username <>", value, "username"); + return (Criteria) this; + } + + public Criteria andUsernameGreaterThan(String value) { + addCriterion("username >", value, "username"); + return (Criteria) this; + } + + public Criteria andUsernameGreaterThanOrEqualTo(String value) { + addCriterion("username >=", value, "username"); + return (Criteria) this; + } + + public Criteria andUsernameLessThan(String value) { + addCriterion("username <", value, "username"); + return (Criteria) this; + } + + public Criteria andUsernameLessThanOrEqualTo(String value) { + addCriterion("username <=", value, "username"); + return (Criteria) this; + } + + public Criteria andUsernameLike(String value) { + addCriterion("username like", value, "username"); + return (Criteria) this; + } + + public Criteria andUsernameNotLike(String value) { + addCriterion("username not like", value, "username"); + return (Criteria) this; + } + + public Criteria andUsernameIn(List values) { + addCriterion("username in", values, "username"); + return (Criteria) this; + } + + public Criteria andUsernameNotIn(List values) { + addCriterion("username not in", values, "username"); + return (Criteria) this; + } + + public Criteria andUsernameBetween(String value1, String value2) { + addCriterion("username between", value1, value2, "username"); + return (Criteria) this; + } + + public Criteria andUsernameNotBetween(String value1, String value2) { + addCriterion("username not between", value1, value2, "username"); + return (Criteria) this; + } + + public Criteria andNickNameIsNull() { + addCriterion("nick_name is null"); + return (Criteria) this; + } + + public Criteria andNickNameIsNotNull() { + addCriterion("nick_name is not null"); + return (Criteria) this; + } + + public Criteria andNickNameEqualTo(String value) { + addCriterion("nick_name =", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotEqualTo(String value) { + addCriterion("nick_name <>", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameGreaterThan(String value) { + addCriterion("nick_name >", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameGreaterThanOrEqualTo(String value) { + addCriterion("nick_name >=", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameLessThan(String value) { + addCriterion("nick_name <", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameLessThanOrEqualTo(String value) { + addCriterion("nick_name <=", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameLike(String value) { + addCriterion("nick_name like", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotLike(String value) { + addCriterion("nick_name not like", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameIn(List values) { + addCriterion("nick_name in", values, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotIn(List values) { + addCriterion("nick_name not in", values, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameBetween(String value1, String value2) { + addCriterion("nick_name between", value1, value2, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotBetween(String value1, String value2) { + addCriterion("nick_name not between", value1, value2, "nickName"); + return (Criteria) this; + } + + public Criteria andGenderIsNull() { + addCriterion("gender is null"); + return (Criteria) this; + } + + public Criteria andGenderIsNotNull() { + addCriterion("gender is not null"); + return (Criteria) this; + } + + public Criteria andGenderEqualTo(String value) { + addCriterion("gender =", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotEqualTo(String value) { + addCriterion("gender <>", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderGreaterThan(String value) { + addCriterion("gender >", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderGreaterThanOrEqualTo(String value) { + addCriterion("gender >=", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderLessThan(String value) { + addCriterion("gender <", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderLessThanOrEqualTo(String value) { + addCriterion("gender <=", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderLike(String value) { + addCriterion("gender like", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotLike(String value) { + addCriterion("gender not like", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderIn(List values) { + addCriterion("gender in", values, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotIn(List values) { + addCriterion("gender not in", values, "gender"); + return (Criteria) this; + } + + public Criteria andGenderBetween(String value1, String value2) { + addCriterion("gender between", value1, value2, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotBetween(String value1, String value2) { + addCriterion("gender not between", value1, value2, "gender"); + return (Criteria) this; + } + + public Criteria andPhoneIsNull() { + addCriterion("phone is null"); + return (Criteria) this; + } + + public Criteria andPhoneIsNotNull() { + addCriterion("phone is not null"); + return (Criteria) this; + } + + public Criteria andPhoneEqualTo(String value) { + addCriterion("phone =", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotEqualTo(String value) { + addCriterion("phone <>", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThan(String value) { + addCriterion("phone >", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThanOrEqualTo(String value) { + addCriterion("phone >=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThan(String value) { + addCriterion("phone <", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThanOrEqualTo(String value) { + addCriterion("phone <=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLike(String value) { + addCriterion("phone like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotLike(String value) { + addCriterion("phone not like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneIn(List values) { + addCriterion("phone in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotIn(List values) { + addCriterion("phone not in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneBetween(String value1, String value2) { + addCriterion("phone between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotBetween(String value1, String value2) { + addCriterion("phone not between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andEmailIsNull() { + addCriterion("email is null"); + return (Criteria) this; + } + + public Criteria andEmailIsNotNull() { + addCriterion("email is not null"); + return (Criteria) this; + } + + public Criteria andEmailEqualTo(String value) { + addCriterion("email =", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotEqualTo(String value) { + addCriterion("email <>", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThan(String value) { + addCriterion("email >", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThanOrEqualTo(String value) { + addCriterion("email >=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThan(String value) { + addCriterion("email <", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThanOrEqualTo(String value) { + addCriterion("email <=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLike(String value) { + addCriterion("email like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotLike(String value) { + addCriterion("email not like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailIn(List values) { + addCriterion("email in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotIn(List values) { + addCriterion("email not in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailBetween(String value1, String value2) { + addCriterion("email between", value1, value2, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotBetween(String value1, String value2) { + addCriterion("email not between", value1, value2, "email"); + return (Criteria) this; + } + + public Criteria andPasswordIsNull() { + addCriterion("`password` is null"); + return (Criteria) this; + } + + public Criteria andPasswordIsNotNull() { + addCriterion("`password` is not null"); + return (Criteria) this; + } + + public Criteria andPasswordEqualTo(String value) { + addCriterion("`password` =", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotEqualTo(String value) { + addCriterion("`password` <>", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordGreaterThan(String value) { + addCriterion("`password` >", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordGreaterThanOrEqualTo(String value) { + addCriterion("`password` >=", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordLessThan(String value) { + addCriterion("`password` <", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordLessThanOrEqualTo(String value) { + addCriterion("`password` <=", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordLike(String value) { + addCriterion("`password` like", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotLike(String value) { + addCriterion("`password` not like", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordIn(List values) { + addCriterion("`password` in", values, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotIn(List values) { + addCriterion("`password` not in", values, "password"); + return (Criteria) this; + } + + public Criteria andPasswordBetween(String value1, String value2) { + addCriterion("`password` between", value1, value2, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotBetween(String value1, String value2) { + addCriterion("`password` not between", value1, value2, "password"); + return (Criteria) this; + } + + public Criteria andIsAdminIsNull() { + addCriterion("is_admin is null"); + return (Criteria) this; + } + + public Criteria andIsAdminIsNotNull() { + addCriterion("is_admin is not null"); + return (Criteria) this; + } + + public Criteria andIsAdminEqualTo(Boolean value) { + addCriterion("is_admin =", value, "isAdmin"); + return (Criteria) this; + } + + public Criteria andIsAdminNotEqualTo(Boolean value) { + addCriterion("is_admin <>", value, "isAdmin"); + return (Criteria) this; + } + + public Criteria andIsAdminGreaterThan(Boolean value) { + addCriterion("is_admin >", value, "isAdmin"); + return (Criteria) this; + } + + public Criteria andIsAdminGreaterThanOrEqualTo(Boolean value) { + addCriterion("is_admin >=", value, "isAdmin"); + return (Criteria) this; + } + + public Criteria andIsAdminLessThan(Boolean value) { + addCriterion("is_admin <", value, "isAdmin"); + return (Criteria) this; + } + + public Criteria andIsAdminLessThanOrEqualTo(Boolean value) { + addCriterion("is_admin <=", value, "isAdmin"); + return (Criteria) this; + } + + public Criteria andIsAdminIn(List values) { + addCriterion("is_admin in", values, "isAdmin"); + return (Criteria) this; + } + + public Criteria andIsAdminNotIn(List values) { + addCriterion("is_admin not in", values, "isAdmin"); + return (Criteria) this; + } + + public Criteria andIsAdminBetween(Boolean value1, Boolean value2) { + addCriterion("is_admin between", value1, value2, "isAdmin"); + return (Criteria) this; + } + + public Criteria andIsAdminNotBetween(Boolean value1, Boolean value2) { + addCriterion("is_admin not between", value1, value2, "isAdmin"); + return (Criteria) this; + } + + public Criteria andEnabledIsNull() { + addCriterion("enabled is null"); + return (Criteria) this; + } + + public Criteria andEnabledIsNotNull() { + addCriterion("enabled is not null"); + return (Criteria) this; + } + + public Criteria andEnabledEqualTo(Long value) { + addCriterion("enabled =", value, "enabled"); + return (Criteria) this; + } + + public Criteria andEnabledNotEqualTo(Long value) { + addCriterion("enabled <>", value, "enabled"); + return (Criteria) this; + } + + public Criteria andEnabledGreaterThan(Long value) { + addCriterion("enabled >", value, "enabled"); + return (Criteria) this; + } + + public Criteria andEnabledGreaterThanOrEqualTo(Long value) { + addCriterion("enabled >=", value, "enabled"); + return (Criteria) this; + } + + public Criteria andEnabledLessThan(Long value) { + addCriterion("enabled <", value, "enabled"); + return (Criteria) this; + } + + public Criteria andEnabledLessThanOrEqualTo(Long value) { + addCriterion("enabled <=", value, "enabled"); + return (Criteria) this; + } + + public Criteria andEnabledIn(List values) { + addCriterion("enabled in", values, "enabled"); + return (Criteria) this; + } + + public Criteria andEnabledNotIn(List values) { + addCriterion("enabled not in", values, "enabled"); + return (Criteria) this; + } + + public Criteria andEnabledBetween(Long value1, Long value2) { + addCriterion("enabled between", value1, value2, "enabled"); + return (Criteria) this; + } + + public Criteria andEnabledNotBetween(Long value1, Long value2) { + addCriterion("enabled not between", value1, value2, "enabled"); + 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 values) { + addCriterion("create_by in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotIn(List 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 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 values) { + addCriterion("update_by in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotIn(List 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 andPwdResetTimeIsNull() { + addCriterion("pwd_reset_time is null"); + return (Criteria) this; + } + + public Criteria andPwdResetTimeIsNotNull() { + addCriterion("pwd_reset_time is not null"); + return (Criteria) this; + } + + public Criteria andPwdResetTimeEqualTo(Long value) { + addCriterion("pwd_reset_time =", value, "pwdResetTime"); + return (Criteria) this; + } + + public Criteria andPwdResetTimeNotEqualTo(Long value) { + addCriterion("pwd_reset_time <>", value, "pwdResetTime"); + return (Criteria) this; + } + + public Criteria andPwdResetTimeGreaterThan(Long value) { + addCriterion("pwd_reset_time >", value, "pwdResetTime"); + return (Criteria) this; + } + + public Criteria andPwdResetTimeGreaterThanOrEqualTo(Long value) { + addCriterion("pwd_reset_time >=", value, "pwdResetTime"); + return (Criteria) this; + } + + public Criteria andPwdResetTimeLessThan(Long value) { + addCriterion("pwd_reset_time <", value, "pwdResetTime"); + return (Criteria) this; + } + + public Criteria andPwdResetTimeLessThanOrEqualTo(Long value) { + addCriterion("pwd_reset_time <=", value, "pwdResetTime"); + return (Criteria) this; + } + + public Criteria andPwdResetTimeIn(List values) { + addCriterion("pwd_reset_time in", values, "pwdResetTime"); + return (Criteria) this; + } + + public Criteria andPwdResetTimeNotIn(List values) { + addCriterion("pwd_reset_time not in", values, "pwdResetTime"); + return (Criteria) this; + } + + public Criteria andPwdResetTimeBetween(Long value1, Long value2) { + addCriterion("pwd_reset_time between", value1, value2, "pwdResetTime"); + return (Criteria) this; + } + + public Criteria andPwdResetTimeNotBetween(Long value1, Long value2) { + addCriterion("pwd_reset_time not between", value1, value2, "pwdResetTime"); + 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(Long value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Long value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Long value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Long value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Long value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Long value1, Long value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Long value1, Long value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + 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(Long value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Long value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Long value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Long value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Long value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Long value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Long value1, Long value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Long value1, Long value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + 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); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/domain/SysUsersRolesExample.java b/backend/src/main/java/io/dataease/base/domain/SysUsersRolesExample.java new file mode 100644 index 0000000000..7065c280ba --- /dev/null +++ b/backend/src/main/java/io/dataease/base/domain/SysUsersRolesExample.java @@ -0,0 +1,320 @@ +package io.dataease.base.domain; + +import java.util.ArrayList; +import java.util.List; + +public class SysUsersRolesExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public SysUsersRolesExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 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 andRoleIdIsNull() { + addCriterion("role_id is null"); + return (Criteria) this; + } + + public Criteria andRoleIdIsNotNull() { + addCriterion("role_id is not null"); + return (Criteria) this; + } + + public Criteria andRoleIdEqualTo(Long value) { + addCriterion("role_id =", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotEqualTo(Long value) { + addCriterion("role_id <>", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThan(Long value) { + addCriterion("role_id >", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdGreaterThanOrEqualTo(Long value) { + addCriterion("role_id >=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThan(Long value) { + addCriterion("role_id <", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdLessThanOrEqualTo(Long value) { + addCriterion("role_id <=", value, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdIn(List values) { + addCriterion("role_id in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotIn(List values) { + addCriterion("role_id not in", values, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdBetween(Long value1, Long value2) { + addCriterion("role_id between", value1, value2, "roleId"); + return (Criteria) this; + } + + public Criteria andRoleIdNotBetween(Long value1, Long value2) { + addCriterion("role_id not between", value1, value2, "roleId"); + return (Criteria) this; + } + } + + public 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); + } + } +} \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/domain/SysUsersRolesKey.java b/backend/src/main/java/io/dataease/base/domain/SysUsersRolesKey.java new file mode 100644 index 0000000000..5fd0a8974e --- /dev/null +++ b/backend/src/main/java/io/dataease/base/domain/SysUsersRolesKey.java @@ -0,0 +1,13 @@ +package io.dataease.base.domain; + +import java.io.Serializable; +import lombok.Data; + +@Data +public class SysUsersRolesKey implements Serializable { + private Long userId; + + private Long roleId; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/mapper/SysUserMapper.java b/backend/src/main/java/io/dataease/base/mapper/SysUserMapper.java new file mode 100644 index 0000000000..8456e7ad70 --- /dev/null +++ b/backend/src/main/java/io/dataease/base/mapper/SysUserMapper.java @@ -0,0 +1,30 @@ +package io.dataease.base.mapper; + +import io.dataease.base.domain.SysUser; +import io.dataease.base.domain.SysUserExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysUserMapper { + long countByExample(SysUserExample example); + + int deleteByExample(SysUserExample example); + + int deleteByPrimaryKey(Long userId); + + int insert(SysUser record); + + int insertSelective(SysUser record); + + List selectByExample(SysUserExample example); + + SysUser selectByPrimaryKey(Long userId); + + int updateByExampleSelective(@Param("record") SysUser record, @Param("example") SysUserExample example); + + int updateByExample(@Param("record") SysUser record, @Param("example") SysUserExample example); + + int updateByPrimaryKeySelective(SysUser record); + + int updateByPrimaryKey(SysUser record); +} \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/mapper/SysUserMapper.xml b/backend/src/main/java/io/dataease/base/mapper/SysUserMapper.xml new file mode 100644 index 0000000000..de12f32bbc --- /dev/null +++ b/backend/src/main/java/io/dataease/base/mapper/SysUserMapper.xml @@ -0,0 +1,370 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + user_id, dept_id, username, nick_name, gender, phone, email, `password`, is_admin, + enabled, create_by, update_by, pwd_reset_time, create_time, update_time + + + + + delete from sys_user + where user_id = #{userId,jdbcType=BIGINT} + + + delete from sys_user + + + + + + insert into sys_user (user_id, dept_id, username, + nick_name, gender, phone, + email, `password`, is_admin, + enabled, create_by, update_by, + pwd_reset_time, create_time, update_time + ) + values (#{userId,jdbcType=BIGINT}, #{deptId,jdbcType=BIGINT}, #{username,jdbcType=VARCHAR}, + #{nickName,jdbcType=VARCHAR}, #{gender,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, + #{email,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{isAdmin,jdbcType=BIT}, + #{enabled,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR}, + #{pwdResetTime,jdbcType=BIGINT}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT} + ) + + + insert into sys_user + + + user_id, + + + dept_id, + + + username, + + + nick_name, + + + gender, + + + phone, + + + email, + + + `password`, + + + is_admin, + + + enabled, + + + create_by, + + + update_by, + + + pwd_reset_time, + + + create_time, + + + update_time, + + + + + #{userId,jdbcType=BIGINT}, + + + #{deptId,jdbcType=BIGINT}, + + + #{username,jdbcType=VARCHAR}, + + + #{nickName,jdbcType=VARCHAR}, + + + #{gender,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{email,jdbcType=VARCHAR}, + + + #{password,jdbcType=VARCHAR}, + + + #{isAdmin,jdbcType=BIT}, + + + #{enabled,jdbcType=BIGINT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{pwdResetTime,jdbcType=BIGINT}, + + + #{createTime,jdbcType=BIGINT}, + + + #{updateTime,jdbcType=BIGINT}, + + + + + + update sys_user + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + dept_id = #{record.deptId,jdbcType=BIGINT}, + + + username = #{record.username,jdbcType=VARCHAR}, + + + nick_name = #{record.nickName,jdbcType=VARCHAR}, + + + gender = #{record.gender,jdbcType=VARCHAR}, + + + phone = #{record.phone,jdbcType=VARCHAR}, + + + email = #{record.email,jdbcType=VARCHAR}, + + + `password` = #{record.password,jdbcType=VARCHAR}, + + + is_admin = #{record.isAdmin,jdbcType=BIT}, + + + enabled = #{record.enabled,jdbcType=BIGINT}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + pwd_reset_time = #{record.pwdResetTime,jdbcType=BIGINT}, + + + create_time = #{record.createTime,jdbcType=BIGINT}, + + + update_time = #{record.updateTime,jdbcType=BIGINT}, + + + + + + + + update sys_user + set user_id = #{record.userId,jdbcType=BIGINT}, + dept_id = #{record.deptId,jdbcType=BIGINT}, + username = #{record.username,jdbcType=VARCHAR}, + nick_name = #{record.nickName,jdbcType=VARCHAR}, + gender = #{record.gender,jdbcType=VARCHAR}, + phone = #{record.phone,jdbcType=VARCHAR}, + email = #{record.email,jdbcType=VARCHAR}, + `password` = #{record.password,jdbcType=VARCHAR}, + is_admin = #{record.isAdmin,jdbcType=BIT}, + enabled = #{record.enabled,jdbcType=BIGINT}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + pwd_reset_time = #{record.pwdResetTime,jdbcType=BIGINT}, + create_time = #{record.createTime,jdbcType=BIGINT}, + update_time = #{record.updateTime,jdbcType=BIGINT} + + + + + + update sys_user + + + dept_id = #{deptId,jdbcType=BIGINT}, + + + username = #{username,jdbcType=VARCHAR}, + + + nick_name = #{nickName,jdbcType=VARCHAR}, + + + gender = #{gender,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + email = #{email,jdbcType=VARCHAR}, + + + `password` = #{password,jdbcType=VARCHAR}, + + + is_admin = #{isAdmin,jdbcType=BIT}, + + + enabled = #{enabled,jdbcType=BIGINT}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + pwd_reset_time = #{pwdResetTime,jdbcType=BIGINT}, + + + create_time = #{createTime,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=BIGINT}, + + + where user_id = #{userId,jdbcType=BIGINT} + + + update sys_user + set dept_id = #{deptId,jdbcType=BIGINT}, + username = #{username,jdbcType=VARCHAR}, + nick_name = #{nickName,jdbcType=VARCHAR}, + gender = #{gender,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + email = #{email,jdbcType=VARCHAR}, + `password` = #{password,jdbcType=VARCHAR}, + is_admin = #{isAdmin,jdbcType=BIT}, + enabled = #{enabled,jdbcType=BIGINT}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_by = #{updateBy,jdbcType=VARCHAR}, + pwd_reset_time = #{pwdResetTime,jdbcType=BIGINT}, + create_time = #{createTime,jdbcType=BIGINT}, + update_time = #{updateTime,jdbcType=BIGINT} + where user_id = #{userId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/mapper/SysUsersRolesMapper.java b/backend/src/main/java/io/dataease/base/mapper/SysUsersRolesMapper.java new file mode 100644 index 0000000000..101fa6238f --- /dev/null +++ b/backend/src/main/java/io/dataease/base/mapper/SysUsersRolesMapper.java @@ -0,0 +1,24 @@ +package io.dataease.base.mapper; + +import io.dataease.base.domain.SysUsersRolesExample; +import io.dataease.base.domain.SysUsersRolesKey; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface SysUsersRolesMapper { + long countByExample(SysUsersRolesExample example); + + int deleteByExample(SysUsersRolesExample example); + + int deleteByPrimaryKey(SysUsersRolesKey key); + + int insert(SysUsersRolesKey record); + + int insertSelective(SysUsersRolesKey record); + + List selectByExample(SysUsersRolesExample example); + + int updateByExampleSelective(@Param("record") SysUsersRolesKey record, @Param("example") SysUsersRolesExample example); + + int updateByExample(@Param("record") SysUsersRolesKey record, @Param("example") SysUsersRolesExample example); +} \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/mapper/SysUsersRolesMapper.xml b/backend/src/main/java/io/dataease/base/mapper/SysUsersRolesMapper.xml new file mode 100644 index 0000000000..4be29edeee --- /dev/null +++ b/backend/src/main/java/io/dataease/base/mapper/SysUsersRolesMapper.xml @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + user_id, role_id + + + + delete from sys_users_roles + where user_id = #{userId,jdbcType=BIGINT} + and role_id = #{roleId,jdbcType=BIGINT} + + + delete from sys_users_roles + + + + + + insert into sys_users_roles (user_id, role_id) + values (#{userId,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}) + + + insert into sys_users_roles + + + user_id, + + + role_id, + + + + + #{userId,jdbcType=BIGINT}, + + + #{roleId,jdbcType=BIGINT}, + + + + + + update sys_users_roles + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + role_id = #{record.roleId,jdbcType=BIGINT}, + + + + + + + + update sys_users_roles + set user_id = #{record.userId,jdbcType=BIGINT}, + role_id = #{record.roleId,jdbcType=BIGINT} + + + + + \ No newline at end of file