Merge pull request #1293 from dataease/pr@dev@fix_panel-edit

refactor: 优化数据集查询树
This commit is contained in:
王嘉豪 2021-11-26 18:17:12 +08:00 committed by GitHub
commit d9cd58a8e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 82 additions and 6 deletions

View File

@ -21,5 +21,7 @@ public class VAuthModel implements Serializable {
private Long level;
private Long mode;
private static final long serialVersionUID = 1L;
}

View File

@ -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<Long> values) {
addCriterion("`mode` in", values, "mode");
return (Criteria) this;
}
public Criteria andModeNotIn(List<Long> 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 {

View File

@ -10,6 +10,7 @@
<result column="auth_type" jdbcType="VARCHAR" property="authType" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="level" jdbcType="BIGINT" property="level" />
<result column="mode" jdbcType="BIGINT" property="mode" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="io.dataease.base.domain.VAuthModelWithBLOBs">
<result column="name" jdbcType="LONGVARCHAR" property="name" />
@ -74,7 +75,8 @@
</where>
</sql>
<sql id="Base_Column_List">
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`
</sql>
<sql id="Blob_Column_List">
`name`, `label`
@ -118,12 +120,12 @@
<insert id="insert" parameterType="io.dataease.base.domain.VAuthModelWithBLOBs">
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>
<insert id="insertSelective" parameterType="io.dataease.base.domain.VAuthModelWithBLOBs">
insert into v_auth_model
@ -152,6 +154,9 @@
<if test="level != null">
`level`,
</if>
<if test="mode != null">
`mode`,
</if>
<if test="name != null">
`name`,
</if>
@ -184,6 +189,9 @@
<if test="level != null">
#{level,jdbcType=BIGINT},
</if>
<if test="mode != null">
#{mode,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=LONGVARCHAR},
</if>
@ -225,6 +233,9 @@
<if test="record.level != null">
`level` = #{record.level,jdbcType=BIGINT},
</if>
<if test="record.mode != null">
`mode` = #{record.mode,jdbcType=BIGINT},
</if>
<if test="record.name != null">
`name` = #{record.name,jdbcType=LONGVARCHAR},
</if>
@ -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}
<if test="_parameter != null">
@ -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}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>

View File

@ -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,