From 298b2cbe6fc0136fa382d76c64935a1e02650bc5 Mon Sep 17 00:00:00 2001 From: wangjiahao <1522128093@qq.com> Date: Fri, 26 Nov 2021 18:15:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=9B=86=E6=9F=A5=E8=AF=A2=E6=A0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/base/domain/VAuthModel.java | 2 + .../base/domain/VAuthModelExample.java | 60 +++++++++++++++++++ .../dataease/base/mapper/VAuthModelMapper.xml | 25 ++++++-- .../base/mapper/ext/ExtVAuthModelMapper.xml | 1 + 4 files changed, 82 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/dataease/base/domain/VAuthModel.java b/backend/src/main/java/io/dataease/base/domain/VAuthModel.java index 106b6a0a9d..fba8882d5a 100644 --- a/backend/src/main/java/io/dataease/base/domain/VAuthModel.java +++ b/backend/src/main/java/io/dataease/base/domain/VAuthModel.java @@ -21,5 +21,7 @@ public class VAuthModel implements Serializable { private Long level; + private Long mode; + private static final long serialVersionUID = 1L; } \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/domain/VAuthModelExample.java b/backend/src/main/java/io/dataease/base/domain/VAuthModelExample.java index 7f5b1d023f..df1a563922 100644 --- a/backend/src/main/java/io/dataease/base/domain/VAuthModelExample.java +++ b/backend/src/main/java/io/dataease/base/domain/VAuthModelExample.java @@ -653,6 +653,66 @@ public class VAuthModelExample { addCriterion("`level` not between", value1, value2, "level"); return (Criteria) this; } + + public Criteria andModeIsNull() { + addCriterion("`mode` is null"); + return (Criteria) this; + } + + public Criteria andModeIsNotNull() { + addCriterion("`mode` is not null"); + return (Criteria) this; + } + + public Criteria andModeEqualTo(Long value) { + addCriterion("`mode` =", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeNotEqualTo(Long value) { + addCriterion("`mode` <>", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeGreaterThan(Long value) { + addCriterion("`mode` >", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeGreaterThanOrEqualTo(Long value) { + addCriterion("`mode` >=", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeLessThan(Long value) { + addCriterion("`mode` <", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeLessThanOrEqualTo(Long value) { + addCriterion("`mode` <=", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeIn(List values) { + addCriterion("`mode` in", values, "mode"); + return (Criteria) this; + } + + public Criteria andModeNotIn(List values) { + addCriterion("`mode` not in", values, "mode"); + return (Criteria) this; + } + + public Criteria andModeBetween(Long value1, Long value2) { + addCriterion("`mode` between", value1, value2, "mode"); + return (Criteria) this; + } + + public Criteria andModeNotBetween(Long value1, Long value2) { + addCriterion("`mode` not between", value1, value2, "mode"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/backend/src/main/java/io/dataease/base/mapper/VAuthModelMapper.xml b/backend/src/main/java/io/dataease/base/mapper/VAuthModelMapper.xml index 817d429b7c..13d82274ac 100644 --- a/backend/src/main/java/io/dataease/base/mapper/VAuthModelMapper.xml +++ b/backend/src/main/java/io/dataease/base/mapper/VAuthModelMapper.xml @@ -10,6 +10,7 @@ + @@ -74,7 +75,8 @@ - id, pid, node_type, model_type, model_inner_type, auth_type, create_by, `level` + id, pid, node_type, model_type, model_inner_type, auth_type, create_by, `level`, + `mode` `name`, `label` @@ -118,12 +120,12 @@ insert into v_auth_model (id, pid, node_type, model_type, model_inner_type, auth_type, - create_by, `level`, `name`, - `label`) + create_by, `level`, `mode`, + `name`, `label`) values (#{id,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, #{nodeType,jdbcType=VARCHAR}, #{modelType,jdbcType=VARCHAR}, #{modelInnerType,jdbcType=VARCHAR}, #{authType,jdbcType=VARCHAR}, - #{createBy,jdbcType=VARCHAR}, #{level,jdbcType=BIGINT}, #{name,jdbcType=LONGVARCHAR}, - #{label,jdbcType=LONGVARCHAR}) + #{createBy,jdbcType=VARCHAR}, #{level,jdbcType=BIGINT}, #{mode,jdbcType=BIGINT}, + #{name,jdbcType=LONGVARCHAR}, #{label,jdbcType=LONGVARCHAR}) insert into v_auth_model @@ -152,6 +154,9 @@ `level`, + + `mode`, + `name`, @@ -184,6 +189,9 @@ #{level,jdbcType=BIGINT}, + + #{mode,jdbcType=BIGINT}, + #{name,jdbcType=LONGVARCHAR}, @@ -225,6 +233,9 @@ `level` = #{record.level,jdbcType=BIGINT}, + + `mode` = #{record.mode,jdbcType=BIGINT}, + `name` = #{record.name,jdbcType=LONGVARCHAR}, @@ -246,6 +257,7 @@ auth_type = #{record.authType,jdbcType=VARCHAR}, create_by = #{record.createBy,jdbcType=VARCHAR}, `level` = #{record.level,jdbcType=BIGINT}, + `mode` = #{record.mode,jdbcType=BIGINT}, `name` = #{record.name,jdbcType=LONGVARCHAR}, `label` = #{record.label,jdbcType=LONGVARCHAR} @@ -261,7 +273,8 @@ model_inner_type = #{record.modelInnerType,jdbcType=VARCHAR}, auth_type = #{record.authType,jdbcType=VARCHAR}, create_by = #{record.createBy,jdbcType=VARCHAR}, - `level` = #{record.level,jdbcType=BIGINT} + `level` = #{record.level,jdbcType=BIGINT}, + `mode` = #{record.mode,jdbcType=BIGINT} diff --git a/backend/src/main/java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.xml b/backend/src/main/java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.xml index 96b7a4b673..eb9edf9ae3 100644 --- a/backend/src/main/java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.xml +++ b/backend/src/main/java/io/dataease/base/mapper/ext/ExtVAuthModelMapper.xml @@ -18,6 +18,7 @@ v_auth_model.auth_type, v_auth_model.create_by, v_auth_model.level, + v_auth_model.mode, authInfo.PRIVILEGES AS `privileges` FROM ( SELECT GET_V_AUTH_MODEL_ID_P_USE ( #{request.userId}, #{request.modelType} ) cids ) t,