diff --git a/backend/pom.xml b/backend/pom.xml index 198f58b0bf..8b1075bb04 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -16,6 +16,7 @@ 1.7.1 1.8 20.1.0 + 3.12.1 @@ -104,12 +105,22 @@ 5.0.3 + org.apache.shiro shiro-spring-boot-starter ${shiro.version} + + org.springframework.boot + spring-boot-starter-validation + + org.apache.commons commons-lang3 @@ -135,6 +146,12 @@ 1.2.72 + + com.auth0 + java-jwt + ${jwt.version} + + org.springdoc @@ -345,27 +362,27 @@ true - - - - - - - - - - - - - - - - - - - - - + + maven-clean-plugin + + + + src/main/resources/static + + ** + + false + + + src/main/resources/templates + + ** + + false + + + + org.apache.maven.plugins maven-compiler-plugin diff --git a/backend/src/main/java/io/dataease/auth/api/dto/CurrentRoleDto.java b/backend/src/main/java/io/dataease/auth/api/dto/CurrentRoleDto.java new file mode 100644 index 0000000000..1b9d86d16f --- /dev/null +++ b/backend/src/main/java/io/dataease/auth/api/dto/CurrentRoleDto.java @@ -0,0 +1,15 @@ +package io.dataease.auth.api.dto; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class CurrentRoleDto implements Serializable { + + private Long id; + + private String code; + + private String name; +} diff --git a/backend/src/main/java/io/dataease/auth/api/dto/CurrentUserDto.java b/backend/src/main/java/io/dataease/auth/api/dto/CurrentUserDto.java new file mode 100644 index 0000000000..49e0826aa8 --- /dev/null +++ b/backend/src/main/java/io/dataease/auth/api/dto/CurrentUserDto.java @@ -0,0 +1,15 @@ +package io.dataease.auth.api.dto; + +import io.dataease.auth.entity.SysUserEntity; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +@Data +@NoArgsConstructor +public class CurrentUserDto extends SysUserEntity implements Serializable { + + private List roles; +} diff --git a/backend/src/main/java/io/dataease/auth/config/CorsConfig.java b/backend/src/main/java/io/dataease/auth/config/CorsConfig.java new file mode 100644 index 0000000000..8dbbe29f50 --- /dev/null +++ b/backend/src/main/java/io/dataease/auth/config/CorsConfig.java @@ -0,0 +1,31 @@ +package io.dataease.auth.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.UrlBasedCorsConfigurationSource; +import org.springframework.web.filter.CorsFilter; + +import java.util.Collections; + +@Configuration +public class CorsConfig { + + @Bean + public CorsFilter corsFilter() { + CorsConfiguration corsConfiguration = new CorsConfiguration(); + //1,允许任何来源 + corsConfiguration.setAllowedOriginPatterns(Collections.singletonList("*")); + //2,允许任何请求头 + corsConfiguration.addAllowedHeader(CorsConfiguration.ALL); + //3,允许任何方法 + corsConfiguration.addAllowedMethod(CorsConfiguration.ALL); + //4,允许凭证 + corsConfiguration.setAllowCredentials(true); + + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + source.registerCorsConfiguration("/**", corsConfiguration); + return new CorsFilter(source); + } + +} diff --git a/backend/src/main/java/io/dataease/base/domain/ChartGroup.java b/backend/src/main/java/io/dataease/base/domain/ChartGroup.java deleted file mode 100644 index 4d2128a4b6..0000000000 --- a/backend/src/main/java/io/dataease/base/domain/ChartGroup.java +++ /dev/null @@ -1,23 +0,0 @@ -package io.dataease.base.domain; - -import java.io.Serializable; -import lombok.Data; - -@Data -public class ChartGroup implements Serializable { - private String id; - - private String name; - - private String pid; - - private Integer level; - - private String type; - - private String createBy; - - private Long createTime; - - private static final long serialVersionUID = 1L; -} \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/domain/ChartGroupExample.java b/backend/src/main/java/io/dataease/base/domain/ChartGroupExample.java deleted file mode 100644 index c3bf4973e6..0000000000 --- a/backend/src/main/java/io/dataease/base/domain/ChartGroupExample.java +++ /dev/null @@ -1,670 +0,0 @@ -package io.dataease.base.domain; - -import java.util.ArrayList; -import java.util.List; - -public class ChartGroupExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public ChartGroupExample() { - 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 andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(String value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(String value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(String value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(String value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(String value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(String value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLike(String value) { - addCriterion("id like", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotLike(String value) { - addCriterion("id not like", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(String value1, String value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(String value1, String value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andNameIsNull() { - addCriterion("`name` is null"); - return (Criteria) this; - } - - public Criteria andNameIsNotNull() { - addCriterion("`name` is not null"); - return (Criteria) this; - } - - public Criteria andNameEqualTo(String value) { - addCriterion("`name` =", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotEqualTo(String value) { - addCriterion("`name` <>", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThan(String value) { - addCriterion("`name` >", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("`name` >=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThan(String value) { - addCriterion("`name` <", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("`name` <=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLike(String value) { - addCriterion("`name` like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotLike(String value) { - addCriterion("`name` not like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameIn(List values) { - addCriterion("`name` in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameNotIn(List values) { - addCriterion("`name` not in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameBetween(String value1, String value2) { - addCriterion("`name` between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("`name` not between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andPidIsNull() { - addCriterion("pid is null"); - return (Criteria) this; - } - - public Criteria andPidIsNotNull() { - addCriterion("pid is not null"); - return (Criteria) this; - } - - public Criteria andPidEqualTo(String value) { - addCriterion("pid =", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidNotEqualTo(String value) { - addCriterion("pid <>", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidGreaterThan(String value) { - addCriterion("pid >", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidGreaterThanOrEqualTo(String value) { - addCriterion("pid >=", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidLessThan(String value) { - addCriterion("pid <", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidLessThanOrEqualTo(String value) { - addCriterion("pid <=", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidLike(String value) { - addCriterion("pid like", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidNotLike(String value) { - addCriterion("pid not like", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidIn(List values) { - addCriterion("pid in", values, "pid"); - return (Criteria) this; - } - - public Criteria andPidNotIn(List values) { - addCriterion("pid not in", values, "pid"); - return (Criteria) this; - } - - public Criteria andPidBetween(String value1, String value2) { - addCriterion("pid between", value1, value2, "pid"); - return (Criteria) this; - } - - public Criteria andPidNotBetween(String value1, String value2) { - addCriterion("pid not between", value1, value2, "pid"); - return (Criteria) this; - } - - public Criteria andLevelIsNull() { - addCriterion("`level` is null"); - return (Criteria) this; - } - - public Criteria andLevelIsNotNull() { - addCriterion("`level` is not null"); - return (Criteria) this; - } - - public Criteria andLevelEqualTo(Integer value) { - addCriterion("`level` =", value, "level"); - return (Criteria) this; - } - - public Criteria andLevelNotEqualTo(Integer value) { - addCriterion("`level` <>", value, "level"); - return (Criteria) this; - } - - public Criteria andLevelGreaterThan(Integer value) { - addCriterion("`level` >", value, "level"); - return (Criteria) this; - } - - public Criteria andLevelGreaterThanOrEqualTo(Integer value) { - addCriterion("`level` >=", value, "level"); - return (Criteria) this; - } - - public Criteria andLevelLessThan(Integer value) { - addCriterion("`level` <", value, "level"); - return (Criteria) this; - } - - public Criteria andLevelLessThanOrEqualTo(Integer value) { - addCriterion("`level` <=", value, "level"); - return (Criteria) this; - } - - public Criteria andLevelIn(List values) { - addCriterion("`level` in", values, "level"); - return (Criteria) this; - } - - public Criteria andLevelNotIn(List values) { - addCriterion("`level` not in", values, "level"); - return (Criteria) this; - } - - public Criteria andLevelBetween(Integer value1, Integer value2) { - addCriterion("`level` between", value1, value2, "level"); - return (Criteria) this; - } - - public Criteria andLevelNotBetween(Integer value1, Integer value2) { - addCriterion("`level` not between", value1, value2, "level"); - return (Criteria) this; - } - - public Criteria andTypeIsNull() { - addCriterion("`type` is null"); - return (Criteria) this; - } - - public Criteria andTypeIsNotNull() { - addCriterion("`type` is not null"); - return (Criteria) this; - } - - public Criteria andTypeEqualTo(String value) { - addCriterion("`type` =", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotEqualTo(String value) { - addCriterion("`type` <>", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeGreaterThan(String value) { - addCriterion("`type` >", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeGreaterThanOrEqualTo(String value) { - addCriterion("`type` >=", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLessThan(String value) { - addCriterion("`type` <", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLessThanOrEqualTo(String value) { - addCriterion("`type` <=", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeLike(String value) { - addCriterion("`type` like", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotLike(String value) { - addCriterion("`type` not like", value, "type"); - return (Criteria) this; - } - - public Criteria andTypeIn(List values) { - addCriterion("`type` in", values, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotIn(List values) { - addCriterion("`type` not in", values, "type"); - return (Criteria) this; - } - - public Criteria andTypeBetween(String value1, String value2) { - addCriterion("`type` between", value1, value2, "type"); - return (Criteria) this; - } - - public Criteria andTypeNotBetween(String value1, String value2) { - addCriterion("`type` not between", value1, value2, "type"); - 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 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 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/mapper/ChartGroupMapper.java b/backend/src/main/java/io/dataease/base/mapper/ChartGroupMapper.java deleted file mode 100644 index 92e6264833..0000000000 --- a/backend/src/main/java/io/dataease/base/mapper/ChartGroupMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -package io.dataease.base.mapper; - -import io.dataease.base.domain.ChartGroup; -import io.dataease.base.domain.ChartGroupExample; -import java.util.List; -import org.apache.ibatis.annotations.Param; - -public interface ChartGroupMapper { - long countByExample(ChartGroupExample example); - - int deleteByExample(ChartGroupExample example); - - int deleteByPrimaryKey(String id); - - int insert(ChartGroup record); - - int insertSelective(ChartGroup record); - - List selectByExample(ChartGroupExample example); - - ChartGroup selectByPrimaryKey(String id); - - int updateByExampleSelective(@Param("record") ChartGroup record, @Param("example") ChartGroupExample example); - - int updateByExample(@Param("record") ChartGroup record, @Param("example") ChartGroupExample example); - - int updateByPrimaryKeySelective(ChartGroup record); - - int updateByPrimaryKey(ChartGroup record); -} \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/mapper/ChartGroupMapper.xml b/backend/src/main/java/io/dataease/base/mapper/ChartGroupMapper.xml deleted file mode 100644 index 58f37d6da4..0000000000 --- a/backend/src/main/java/io/dataease/base/mapper/ChartGroupMapper.xml +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - 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} - - - - - - - - - - - id, `name`, pid, `level`, `type`, create_by, create_time - - - - - delete from chart_group - where id = #{id,jdbcType=VARCHAR} - - - delete from chart_group - - - - - - insert into chart_group (id, `name`, pid, - `level`, `type`, create_by, - create_time) - values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, - #{level,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, - #{createTime,jdbcType=BIGINT}) - - - insert into chart_group - - - id, - - - `name`, - - - pid, - - - `level`, - - - `type`, - - - create_by, - - - create_time, - - - - - #{id,jdbcType=VARCHAR}, - - - #{name,jdbcType=VARCHAR}, - - - #{pid,jdbcType=VARCHAR}, - - - #{level,jdbcType=INTEGER}, - - - #{type,jdbcType=VARCHAR}, - - - #{createBy,jdbcType=VARCHAR}, - - - #{createTime,jdbcType=BIGINT}, - - - - - - update chart_group - - - id = #{record.id,jdbcType=VARCHAR}, - - - `name` = #{record.name,jdbcType=VARCHAR}, - - - pid = #{record.pid,jdbcType=VARCHAR}, - - - `level` = #{record.level,jdbcType=INTEGER}, - - - `type` = #{record.type,jdbcType=VARCHAR}, - - - create_by = #{record.createBy,jdbcType=VARCHAR}, - - - create_time = #{record.createTime,jdbcType=BIGINT}, - - - - - - - - update chart_group - set id = #{record.id,jdbcType=VARCHAR}, - `name` = #{record.name,jdbcType=VARCHAR}, - pid = #{record.pid,jdbcType=VARCHAR}, - `level` = #{record.level,jdbcType=INTEGER}, - `type` = #{record.type,jdbcType=VARCHAR}, - create_by = #{record.createBy,jdbcType=VARCHAR}, - create_time = #{record.createTime,jdbcType=BIGINT} - - - - - - update chart_group - - - `name` = #{name,jdbcType=VARCHAR}, - - - pid = #{pid,jdbcType=VARCHAR}, - - - `level` = #{level,jdbcType=INTEGER}, - - - `type` = #{type,jdbcType=VARCHAR}, - - - create_by = #{createBy,jdbcType=VARCHAR}, - - - create_time = #{createTime,jdbcType=BIGINT}, - - - where id = #{id,jdbcType=VARCHAR} - - - update chart_group - set `name` = #{name,jdbcType=VARCHAR}, - pid = #{pid,jdbcType=VARCHAR}, - `level` = #{level,jdbcType=INTEGER}, - `type` = #{type,jdbcType=VARCHAR}, - create_by = #{createBy,jdbcType=VARCHAR}, - create_time = #{createTime,jdbcType=BIGINT} - where id = #{id,jdbcType=VARCHAR} - - \ No newline at end of file diff --git a/backend/src/main/java/io/dataease/base/mapper/ext/AuthMapper.java b/backend/src/main/java/io/dataease/base/mapper/ext/AuthMapper.java new file mode 100644 index 0000000000..59bab3da68 --- /dev/null +++ b/backend/src/main/java/io/dataease/base/mapper/ext/AuthMapper.java @@ -0,0 +1,26 @@ +package io.dataease.base.mapper.ext; + + + +import io.dataease.auth.api.dto.CurrentRoleDto; +import io.dataease.auth.entity.SysUserEntity; +import org.apache.ibatis.annotations.Param; +import java.util.List; +import java.util.Map; + +public interface AuthMapper { + + + + List roleCodes(@Param("userId") Long userId); + + + + List permissions(@Param("userId") Long userId); + + + SysUserEntity findUser(@Param("username") String username); + + + List roles(@Param("userId") Long userId); +} diff --git a/backend/src/main/java/io/dataease/base/mapper/ext/AuthMapper.xml b/backend/src/main/java/io/dataease/base/mapper/ext/AuthMapper.xml new file mode 100644 index 0000000000..6a2b567c0f --- /dev/null +++ b/backend/src/main/java/io/dataease/base/mapper/ext/AuthMapper.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/backend/src/main/java/io/dataease/base/mapper/ext/ExtUserMapper.java b/backend/src/main/java/io/dataease/base/mapper/ext/ExtUserMapper.java index c3dd55176b..65b40968fd 100644 --- a/backend/src/main/java/io/dataease/base/mapper/ext/ExtUserMapper.java +++ b/backend/src/main/java/io/dataease/base/mapper/ext/ExtUserMapper.java @@ -2,7 +2,6 @@ package io.dataease.base.mapper.ext; import io.dataease.base.domain.User; import io.dataease.controller.request.UserRequest; -import io.dataease.notice.domain.UserDetail; import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.Param; @@ -19,8 +18,6 @@ public interface ExtUserMapper { List searchUser(String condition); - List queryTypeByIds(List userIds); - @MapKey("id") Map queryNameByIds(List userIds); } diff --git a/backend/src/main/java/io/dataease/base/mapper/ext/ExtUserMapper.xml b/backend/src/main/java/io/dataease/base/mapper/ext/ExtUserMapper.xml index 8bc896e0dd..a2672df779 100644 --- a/backend/src/main/java/io/dataease/base/mapper/ext/ExtUserMapper.xml +++ b/backend/src/main/java/io/dataease/base/mapper/ext/ExtUserMapper.xml @@ -16,18 +16,6 @@ - -