diff --git a/pom.xml b/pom.xml index 1621f99a..9392c069 100644 --- a/pom.xml +++ b/pom.xml @@ -62,6 +62,7 @@ hub.zlt.com:8080/microservices-platform -Djava.security.egd=file:/dev/./urandom -Xms128m -Xmx128m + 20.0 @@ -430,6 +431,11 @@ pom import + + com.google.guava + guava + ${guava.version} + diff --git a/zlt-business/user-center/src/main/java/com/central/user/controller/SysUserController.java b/zlt-business/user-center/src/main/java/com/central/user/controller/SysUserController.java index 01d84597..0a621f5c 100644 --- a/zlt-business/user-center/src/main/java/com/central/user/controller/SysUserController.java +++ b/zlt-business/user-center/src/main/java/com/central/user/controller/SysUserController.java @@ -7,6 +7,7 @@ import java.util.Map; import java.util.Set; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.ObjectUtil; import com.central.common.annotation.LoginUser; import com.central.common.constant.CommonConstant; import com.central.common.model.*; @@ -286,6 +287,23 @@ public class SysUserController { return queryService.strQuery("sys_user", searchDto, SEARCH_LOGIC_DEL_DTO); } + /** + * 获取用户并返回角色列表 + * @param username + * @return + */ + @GetMapping(value = "/users/roleUser/{username}") + @ApiOperation(value = "查询用户-带角色信息") + @Cacheable(value = "userRoles", key = "#username") + public SysUser selectRoleUser(@PathVariable("username") String username){ + SysUser sysUser = selectByUsername(username); + if(ObjectUtil.isNotNull(sysUser)){ + List roleList = findRolesByUserId(sysUser.getId()); + sysUser.setRoles(roleList); + } + return sysUser; + } + /** * 是否超级管理员 */ diff --git a/zlt-commons/zlt-common-core/pom.xml b/zlt-commons/zlt-common-core/pom.xml index e2ffbc11..badd637a 100644 --- a/zlt-commons/zlt-common-core/pom.xml +++ b/zlt-commons/zlt-common-core/pom.xml @@ -89,5 +89,9 @@ com.fasterxml.jackson.core jackson-databind + + com.google.guava + guava + \ No newline at end of file diff --git a/zlt-commons/zlt-common-core/src/main/java/com/central/common/datascope/mp/interceptor/DataScopeInnerInterceptor.java b/zlt-commons/zlt-common-core/src/main/java/com/central/common/datascope/mp/interceptor/DataScopeInnerInterceptor.java new file mode 100644 index 00000000..7ebaf824 --- /dev/null +++ b/zlt-commons/zlt-common-core/src/main/java/com/central/common/datascope/mp/interceptor/DataScopeInnerInterceptor.java @@ -0,0 +1,268 @@ +package com.central.common.datascope.mp.interceptor; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.toolkit.PluginUtils; +import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor; +import com.central.common.datascope.mp.sql.handler.SqlHandler; +import com.central.common.properties.DataScopeProperties; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import net.sf.jsqlparser.JSQLParserException; +import net.sf.jsqlparser.expression.Alias; +import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.operators.conditional.AndExpression; +import net.sf.jsqlparser.parser.CCJSqlParserManager; +import net.sf.jsqlparser.parser.CCJSqlParserUtil; +import net.sf.jsqlparser.schema.Table; +import net.sf.jsqlparser.statement.select.*; +import org.apache.ibatis.executor.Executor; +import org.apache.ibatis.mapping.BoundSql; +import org.apache.ibatis.mapping.MappedStatement; +import org.apache.ibatis.session.ResultHandler; +import org.apache.ibatis.session.RowBounds; +import org.springframework.http.server.PathContainer; +import org.springframework.web.util.pattern.PathPatternParser; + +import java.io.StringReader; +import java.sql.SQLException; +import java.util.*; +import java.util.stream.Collectors; + +import static com.central.common.datascope.mp.sql.handler.SqlHandler.ALIAS_SYNBOL; + +/** + * 数据权限拦截器 + * + * @author jarvis create by 2023/1/7 + */ +@Slf4j +@Data +@NoArgsConstructor +public class DataScopeInnerInterceptor implements InnerInterceptor { + + private DataScopeProperties dataScopeProperties; + + /** + * 权限的where条件 + */ + private SqlHandler sqlHandler; + + /** + * 对表配置进行缓存,优先读取缓存,在进行匹配 + */ + private Map tableInfoMap = new HashMap<>(); + + /** + * 通配符 + */ + private PathPatternParser pathPatternParser = new PathPatternParser(); + + public DataScopeInnerInterceptor(DataScopeProperties dataScopeProperties, SqlHandler sqlHandler) { + this.dataScopeProperties = dataScopeProperties; + this.sqlHandler = sqlHandler; + } + + @Override + public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) throws SQLException { + if(CollUtil.isEmpty(dataScopeProperties.getIgnoreSqls())|| !dataScopeProperties.getIgnoreSqls().contains(ms.getId())){ + PluginUtils.MPBoundSql mpBs = PluginUtils.mpBoundSql(boundSql); + String sql = boundSql.getSql(); + try { + Select select = explainQuerySql(sql); + reform(select.getSelectBody()); + mpBs.sql(select.toString()); + } catch (JSQLParserException e) { + throw new RuntimeException(e); + } + } + } + + public Select explainQuerySql(String sql) throws JSQLParserException { + CCJSqlParserManager parserManager = new CCJSqlParserManager(); + Select select = (Select) parserManager.parse(new StringReader(sql)); + return select; + } + + /** + * 递归对查询和解析后的子查询进行改造 + * @param selectBody + * @param + * @throws JSQLParserException + */ + public void reform(SelectBody selectBody) throws JSQLParserException { + // 如果是plainSelect的话进行改造 + if(selectBody instanceof PlainSelect&& ObjectUtil.isNotNull(sqlHandler)){ + PlainSelect select = (PlainSelect) selectBody; + // 获取权限的where条件 + String scopeWhereSql = sqlHandler.handleScopeSql(); + // 如果条件不是空的话才对select进行改造 + if(StrUtil.isNotBlank(scopeWhereSql)){ + // 需要改造的别名列表,自动增加到where条件中 + List tableAliasList = new ArrayList<>(); + FromItem fromItem = select.getFromItem(); + String tableAlias = explainFromItem(fromItem); + // 获取from的表字段,如果from是子查询则进行递归 + if(fromItem instanceof Table){ + + String upperTableName = ((Table) fromItem).getName().toUpperCase(); + if(tableInfoMap.containsKey(upperTableName)){ + if (!tableInfoMap.get(upperTableName).getIgnore()) { + tableAliasList.add(StrUtil.isNotBlank(tableAlias)? tableAlias: ""); + } + }else{ + boolean ignore = true; + if(isReformTable(upperTableName)){ + tableAliasList.add(StrUtil.isNotBlank(tableAlias)? tableAlias: ""); + ignore = false; + } + // 写入缓存 + tableInfoMap.put(upperTableName, new TableConfig(upperTableName, ignore)); + } + }else if(fromItem instanceof SubSelect){ + reform(((SubSelect) fromItem).getSelectBody()); + } + // 获取join列表,然后获取对应的表或者递归子查询 + List joinList = select.getJoins(); + if (CollUtil.isNotEmpty(joinList)) { + for (Join join : joinList) { + if(join.getRightItem() instanceof Table){ + String joinTable = ((Table) join.getRightItem()).getName().toUpperCase(); + String joinAlias = ((Table) join.getRightItem()).getAlias().getName(); + if(tableInfoMap.containsKey(joinTable)){ + if (!tableInfoMap.get(joinTable).getIgnore()) { + tableAliasList.add(StrUtil.isNotBlank(joinAlias)? joinAlias: ""); + } + }else{ + boolean ignore = true; + if(isReformTable(joinTable)){ + tableAliasList.add(StrUtil.isNotBlank(joinAlias)? joinAlias: ""); + ignore = false; + } + // 写入缓存 + tableInfoMap.put(joinTable, new TableConfig(joinTable, ignore)); + } + } + if(join.getRightItem() instanceof SubSelect){ + reform(((SubSelect) join.getRightItem()).getSelectBody()); + } + } + } + // 如果改造的表是空的话则不改造对应的select + if(CollUtil.isNotEmpty(tableAliasList)){ + reformWhere(select, scopeWhereSql, tableAliasList); + } + } + // 如果select不是plainSelect的话则进行递归改造 + }else if(selectBody instanceof WithItem&& Objects.nonNull(((WithItem)selectBody).getSubSelect())){ + reform(((WithItem)selectBody).getSubSelect().getSelectBody()); + } + } + + + /** + * 判断表是否需要改造 + * @param table + * @return + * 1. 判断表是否在需要改造的范围 + * 1.1 如果表在inclde的set中(是否存在没用通配符的情况写入配置) + * 1.2 进行通配符匹配判断范围 + * 2. 在改造的范围中进行提出 + * 2.1 判断是不是完全匹配上ignore列表中 + * 2.2 判断是否在通配符过滤 + */ + private boolean isReformTable(String table){ + return + // 1. 判断表是否在需要改造的范围 + (dataScopeProperties.getIncludeTables().contains(table) + ||dataScopeProperties.getIncludeTables().stream().anyMatch(item-> + pathPatternParser.parse(item.toUpperCase()).matches(PathContainer.parsePath(table)) + ))&& ( + // 如果没有忽略列表的话在范围中直接返回 + CollUtil.isEmpty(dataScopeProperties.getIgnoreTables()) + // 在改造的范围中进行忽略表 + ||!(dataScopeProperties.getIgnoreTables().contains(table)|| + dataScopeProperties.getIgnoreTables().stream().anyMatch(item-> + pathPatternParser.parse(item.toUpperCase()).matches(PathContainer.parsePath(table)) + ))); + } + + /** + * 解析from中的东西 + * @param fromItem + * @return + * @throws JSQLParserException + */ + private String explainFromItem(FromItem fromItem) throws JSQLParserException { + // 别名 + String alias = ""; + if(Objects.nonNull(fromItem)){ + // 如果from的东西是表的话 + if (fromItem instanceof Table) { + Alias tablealias = ((Table) fromItem).getAlias(); + if(Objects.nonNull(tablealias)&& StrUtil.isNotBlank(tablealias.getName())){ + alias = tablealias.getName(); + }else{ + alias = ALIAS_SYNBOL; + ((Table) fromItem).setAlias(new Alias(ALIAS_SYNBOL, false)); + } + } + // 如果from的子查询 + if(fromItem instanceof SubSelect){ + SelectBody subSelectBody = ((SubSelect) fromItem).getSelectBody(); + reform(subSelectBody); + } + } + return alias; + } + + /** + * 改造where条件 + * @param select + * @param whereSql where 条件 + * @param aliasName 需要添加权限的表别名 + * @return + * @throws JSQLParserException + */ + private SelectBody reformWhere(PlainSelect select, String whereSql, List aliasName) throws JSQLParserException { + Expression where = select.getWhere(); + // todo 处理exists + if(StrUtil.isNotBlank(whereSql)&& CollUtil.isNotEmpty(aliasName)){ + String andWhereSql = aliasName.stream() + .map(item -> whereSql.replaceAll(ALIAS_SYNBOL, StrUtil.isNotBlank(item) ? item : "")) + .collect(Collectors.joining(" and ")); + if(StrUtil.isNotBlank(andWhereSql)){ + Expression expression = CCJSqlParserUtil + .parseCondExpression(andWhereSql); + if(ObjectUtil.isNull(where)){ + select.setWhere(expression); + }else { + AndExpression andExpression = new AndExpression(where, expression); + select.setWhere(andExpression); + } + } + } + return select; + } + + + public class TableConfig{ + private String tableName; + private Boolean isIgnore; + + public TableConfig(String tableName, Boolean isIgnore) { + this.tableName = tableName; + this.isIgnore = isIgnore; + } + + public String getTableName() { + return tableName; + } + + public Boolean getIgnore() { + return isIgnore; + } + } +} diff --git a/zlt-commons/zlt-common-core/src/main/java/com/central/common/datascope/mp/sql/handler/CreatorDataScopeSqlHandler.java b/zlt-commons/zlt-common-core/src/main/java/com/central/common/datascope/mp/sql/handler/CreatorDataScopeSqlHandler.java new file mode 100644 index 00000000..b837a064 --- /dev/null +++ b/zlt-commons/zlt-common-core/src/main/java/com/central/common/datascope/mp/sql/handler/CreatorDataScopeSqlHandler.java @@ -0,0 +1,50 @@ +package com.central.common.datascope.mp.sql.handler; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.lang.Assert; +import cn.hutool.core.util.StrUtil; +import com.central.common.context.LoginUserContextHolder; +import com.central.common.enums.DataScope; +import com.central.common.feign.UserService; +import com.central.common.model.SysRole; +import com.central.common.model.SysUser; +import com.central.common.properties.DataScopeProperties; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.List; +import java.util.Objects; + +/** + * 个人权限的处理器 + * + * @author jarvis create by 2023/1/10 + */ +public class CreatorDataScopeSqlHandler implements SqlHandler{ + + @Autowired + UserService userService; + + @Autowired + private DataScopeProperties dataScopeProperties; + + /** + * 返回需要增加的where条件,返回空字符的话则代表不需要权限控制 + * + * @return where条件 + * 如果角色是全部权限的话则不进行控制,如果是个人权限的话则自动加入create_id = user_id + */ + @Override + public String handleScopeSql() { + SysUser user = LoginUserContextHolder.getUser(); + Assert.notNull(user, "登陆人不能为空"); + List roleList = userService.findRolesByUserId(user.getId()); + return StrUtil.isBlank(dataScopeProperties.getCreatorIdColumnName()) + ||CollUtil.isEmpty(roleList) + || roleList.stream().anyMatch(item-> Objects.nonNull(item.getDataScope()) || DataScope.ALL.equals(item.getDataScope())) + ? DO_NOTHING: + // 这里确保有配置权限范围控制的字段 + // 1. 如果没有配置角色的情况默认采用只读全部的记录 + // 2. 如果有配置角色的话判断是否存在有ALL获取null的情况,如果没有ALL的话读取个人创建记录 + String.format("%s.%s = '%s'", ALIAS_SYNBOL, dataScopeProperties.getCreatorIdColumnName(), user.getId()); + } +} diff --git a/zlt-commons/zlt-common-core/src/main/java/com/central/common/datascope/mp/sql/handler/DefaultSqlHandler.java b/zlt-commons/zlt-common-core/src/main/java/com/central/common/datascope/mp/sql/handler/DefaultSqlHandler.java new file mode 100644 index 00000000..198d4d4b --- /dev/null +++ b/zlt-commons/zlt-common-core/src/main/java/com/central/common/datascope/mp/sql/handler/DefaultSqlHandler.java @@ -0,0 +1,15 @@ +package com.central.common.datascope.mp.sql.handler; + +/** + * 示例 + * + * @author jarvis create by 2023/1/8 + */ +public class DefaultSqlHandler implements SqlHandler{ + + + @Override + public String handleScopeSql() { + return DO_NOTHING; + } +} diff --git a/zlt-commons/zlt-common-core/src/main/java/com/central/common/datascope/mp/sql/handler/SqlHandler.java b/zlt-commons/zlt-common-core/src/main/java/com/central/common/datascope/mp/sql/handler/SqlHandler.java new file mode 100644 index 00000000..d9db76d7 --- /dev/null +++ b/zlt-commons/zlt-common-core/src/main/java/com/central/common/datascope/mp/sql/handler/SqlHandler.java @@ -0,0 +1,25 @@ +package com.central.common.datascope.mp.sql.handler; + +/** + * 数据权限的sql获取接口 + * + * @author jarvis create by 2023/1/8 + */ +public interface SqlHandler { + + /** + * 通过这个字符替换成别名,自动的 + */ + String ALIAS_SYNBOL = "alias_"; + + /** + * 空字符串 + */ + String DO_NOTHING = ""; + + /** + * 返回需要增加的where条件,返回空字符的话则代表不需要权限控制 + * @return where条件 + */ + String handleScopeSql(); +} diff --git a/zlt-commons/zlt-common-core/src/main/java/com/central/common/enums/DataScope.java b/zlt-commons/zlt-common-core/src/main/java/com/central/common/enums/DataScope.java new file mode 100644 index 00000000..75a3e124 --- /dev/null +++ b/zlt-commons/zlt-common-core/src/main/java/com/central/common/enums/DataScope.java @@ -0,0 +1,21 @@ +package com.central.common.enums; + +import lombok.Getter; + +/** + * 枚举类型 + * + * @author jarvis create by 2023/1/10 + */ +@Getter +public enum DataScope implements ZltEnum{ + ALL(0, "全部权限"), CREATOR(1, "创建者权限"); + + DataScope(Integer id, String content) { + this.id = id; + this.content = content; + } + + private Integer id; + private String content; +} diff --git a/zlt-commons/zlt-common-core/src/main/java/com/central/common/enums/ZltEnum.java b/zlt-commons/zlt-common-core/src/main/java/com/central/common/enums/ZltEnum.java new file mode 100644 index 00000000..30fa534b --- /dev/null +++ b/zlt-commons/zlt-common-core/src/main/java/com/central/common/enums/ZltEnum.java @@ -0,0 +1,20 @@ +package com.central.common.enums; + +/** + * 接口 + * + * @author jarvis create by 2023/1/20 + */ +public interface ZltEnum { + /** + * 获取id + * @return + */ + Integer getId(); + + /** + * 获取内容 + * @return + */ + String getContent(); +} diff --git a/zlt-commons/zlt-common-core/src/main/java/com/central/common/feign/UserService.java b/zlt-commons/zlt-common-core/src/main/java/com/central/common/feign/UserService.java index 427387ad..0d0ed3c6 100644 --- a/zlt-commons/zlt-common-core/src/main/java/com/central/common/feign/UserService.java +++ b/zlt-commons/zlt-common-core/src/main/java/com/central/common/feign/UserService.java @@ -3,12 +3,15 @@ package com.central.common.feign; import com.central.common.constant.ServiceNameConstants; import com.central.common.feign.fallback.UserServiceFallbackFactory; import com.central.common.model.LoginAppUser; +import com.central.common.model.SysRole; import com.central.common.model.SysUser; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestParam; +import java.util.List; + /** * @author zlt */ @@ -48,4 +51,22 @@ public interface UserService { */ @GetMapping(value = "/users-anon/openId", params = "openId") LoginAppUser findByOpenId(@RequestParam("openId") String openId); + + + /** + * 获取带角色的用户信息 + * @param username + * @return + */ + @GetMapping(value = "/users/roleUser/{username}") + public SysUser selectRoleUser(@PathVariable("username") String username); + + /** + * 获取用户的角色 + * + * @param + * @return + */ + @GetMapping("/users/{id}/roles") + public List findRolesByUserId(@PathVariable("id") Long id); } diff --git a/zlt-commons/zlt-common-core/src/main/java/com/central/common/feign/fallback/UserServiceFallbackFactory.java b/zlt-commons/zlt-common-core/src/main/java/com/central/common/feign/fallback/UserServiceFallbackFactory.java index 1b7bbec8..4a249494 100644 --- a/zlt-commons/zlt-common-core/src/main/java/com/central/common/feign/fallback/UserServiceFallbackFactory.java +++ b/zlt-commons/zlt-common-core/src/main/java/com/central/common/feign/fallback/UserServiceFallbackFactory.java @@ -2,10 +2,14 @@ package com.central.common.feign.fallback; import com.central.common.feign.UserService; import com.central.common.model.LoginAppUser; +import com.central.common.model.SysRole; import com.central.common.model.SysUser; import org.springframework.cloud.openfeign.FallbackFactory; import lombok.extern.slf4j.Slf4j; +import java.util.Collections; +import java.util.List; + /** * userService降级工场 * @@ -40,6 +44,29 @@ public class UserServiceFallbackFactory implements FallbackFactory log.error("通过openId查询用户异常:{}", openId, throwable); return new LoginAppUser(); } + + /** + * 获取带角色的用户信息 + * + * @param username + * @return + */ + @Override + public SysUser selectRoleUser(String username) { + log.error("通过用户名查询用户异常:{}", username, throwable); + return new SysUser(); + } + + /** + * 获取用户的角色 + * + * @param id@return + */ + @Override + public List findRolesByUserId(Long id) { + log.error("通过用户id查询角色列表异常:{}", id, throwable); + return Collections.emptyList(); + } }; } } diff --git a/zlt-commons/zlt-common-core/src/main/java/com/central/common/model/SysRole.java b/zlt-commons/zlt-common-core/src/main/java/com/central/common/model/SysRole.java index 45f050bb..fe63af18 100644 --- a/zlt-commons/zlt-common-core/src/main/java/com/central/common/model/SysRole.java +++ b/zlt-commons/zlt-common-core/src/main/java/com/central/common/model/SysRole.java @@ -2,6 +2,7 @@ package com.central.common.model; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; +import com.central.common.enums.DataScope; import lombok.Data; import lombok.EqualsAndHashCode; @@ -18,4 +19,8 @@ public class SysRole extends SuperEntity { private String name; @TableField(exist = false) private Long userId; + /** + * 数据权限字段 + */ + private DataScope dataScope; } diff --git a/zlt-commons/zlt-common-core/src/main/java/com/central/common/properties/DataScopeProperties.java b/zlt-commons/zlt-common-core/src/main/java/com/central/common/properties/DataScopeProperties.java new file mode 100644 index 00000000..e7692557 --- /dev/null +++ b/zlt-commons/zlt-common-core/src/main/java/com/central/common/properties/DataScopeProperties.java @@ -0,0 +1,64 @@ +package com.central.common.properties; + +import cn.hutool.core.collection.CollUtil; +import lombok.Data; +import lombok.Getter; +import org.springframework.boot.context.properties.ConfigurationProperties; + +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +/** + * 示例 + * + * @author jarvis create by 2023/1/8 + */ +@ConfigurationProperties(prefix = "zlt.datascope") +@Getter +public class DataScopeProperties { + /** + * 是否开启权限控制 + */ + private Boolean enabled = Boolean.FALSE; + /** + * 在includeTables的匹配符中过滤某几个表不需要权限的,仅enabled=true + */ + private Set ignoreTables = Collections.singleton("SYS*"); + /** + * 指定某几条sql不执行权限控制, 仅enabled=true生效 + */ + private Set ignoreSqls = Collections.emptySet(); + /** + * 指定某几个表接受权限控制,仅enabled=true,默认当开启时全部表 + */ + private Set includeTables = Collections.singleton("*"); + + /** + * 指定需要的字段名 + */ + private String creatorIdColumnName; + + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + + public void setIgnoreTables(Set ignoreTables) { + HashSet ignoreSet = new HashSet<>(); + CollUtil.addAll(ignoreSet, ignoreTables); + CollUtil.addAll(ignoreSet, this.ignoreTables); + this.ignoreTables = ignoreSet; + } + + public void setIgnoreSqls(Set ignoreSqls) { + this.ignoreSqls = ignoreSqls; + } + + public void setIncludeTables(Set includeTables) { + this.includeTables = includeTables; + } + + public void setCreatorIdColumnName(String creatorIdColumnName) { + this.creatorIdColumnName = creatorIdColumnName; + } +} diff --git a/zlt-commons/zlt-db-spring-boot-starter/src/main/java/com/central/db/config/MybatisPlusAutoConfigure.java b/zlt-commons/zlt-db-spring-boot-starter/src/main/java/com/central/db/config/MybatisPlusAutoConfigure.java index f5f44853..090a5c2a 100644 --- a/zlt-commons/zlt-db-spring-boot-starter/src/main/java/com/central/db/config/MybatisPlusAutoConfigure.java +++ b/zlt-commons/zlt-db-spring-boot-starter/src/main/java/com/central/db/config/MybatisPlusAutoConfigure.java @@ -5,6 +5,10 @@ import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler; import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; +import com.central.common.datascope.mp.interceptor.DataScopeInnerInterceptor; +import com.central.common.datascope.mp.sql.handler.CreatorDataScopeSqlHandler; +import com.central.common.datascope.mp.sql.handler.SqlHandler; +import com.central.common.properties.DataScopeProperties; import com.central.common.properties.TenantProperties; import com.central.db.interceptor.CustomTenantInterceptor; import com.central.db.properties.MybatisPlusAutoFillProperties; @@ -23,7 +27,7 @@ import org.springframework.context.annotation.Bean; * Blog: https://zlt2000.gitee.io * Github: https://github.com/zlt2000 */ -@EnableConfigurationProperties(MybatisPlusAutoFillProperties.class) +@EnableConfigurationProperties({MybatisPlusAutoFillProperties.class, DataScopeProperties.class}) public class MybatisPlusAutoConfigure { @Autowired private TenantLineHandler tenantLineHandler; @@ -34,11 +38,20 @@ public class MybatisPlusAutoConfigure { @Autowired private MybatisPlusAutoFillProperties autoFillProperties; + @Autowired + private DataScopeProperties dataScopeProperties; + + @Bean + @ConditionalOnMissingBean + public SqlHandler sqlHandler(){ + return new CreatorDataScopeSqlHandler(); + } + /** * 分页插件,自动识别数据库类型 */ @Bean - public MybatisPlusInterceptor paginationInterceptor() { + public MybatisPlusInterceptor paginationInterceptor(SqlHandler sqlHandler) { MybatisPlusInterceptor mpInterceptor = new MybatisPlusInterceptor(); boolean enableTenant = tenantProperties.getEnable(); //是否开启多租户隔离 @@ -47,6 +60,9 @@ public class MybatisPlusAutoConfigure { tenantLineHandler, tenantProperties.getIgnoreSqls()); mpInterceptor.addInnerInterceptor(tenantInterceptor); } + if(dataScopeProperties.getEnabled()){ + mpInterceptor.addInnerInterceptor(new DataScopeInnerInterceptor(dataScopeProperties, sqlHandler)); + } mpInterceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); return mpInterceptor; } diff --git a/zlt-demo/txlcn-demo/txlcn-demo-spring-service-a/src/main/java/org/txlcn/demo/ServiceAApplication.java b/zlt-demo/txlcn-demo/txlcn-demo-spring-service-a/src/main/java/org/txlcn/demo/ServiceAApplication.java index ea86fbf6..cdbd24a5 100644 --- a/zlt-demo/txlcn-demo/txlcn-demo-spring-service-a/src/main/java/org/txlcn/demo/ServiceAApplication.java +++ b/zlt-demo/txlcn-demo/txlcn-demo-spring-service-a/src/main/java/org/txlcn/demo/ServiceAApplication.java @@ -1,5 +1,6 @@ package org.txlcn.demo; +import com.central.common.lb.annotation.EnableFeignInterceptor; import com.codingapi.txlcn.tc.config.EnableDistributedTransaction; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -14,6 +15,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient; @SpringBootApplication @EnableDiscoveryClient @EnableDistributedTransaction +@EnableFeignInterceptor public class ServiceAApplication { public static void main(String[] args) { SpringApplication.run(ServiceAApplication.class, args); diff --git a/zlt-web/layui-web/Dockerfile b/zlt-web/layui-web/Dockerfile deleted file mode 100644 index fc40b43a..00000000 --- a/zlt-web/layui-web/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM nginx:1.21.0 - -LABEL MAINTAINER=Andy -RUN rm -rf /usr/share/nginx/html/* -COPY src/main/resources/static/ /usr/share/nginx/html/ - -# docker run --name zlt-web \ -# -v /host/path/apiUrl.js:/usr/share/nginx/html/module/apiUrl.js:ro -# -d zlt-web:4.5 \ No newline at end of file diff --git a/zlt-web/layui-web/src/main/resources/static/index.html b/zlt-web/layui-web/src/main/resources/static/index.html index 75b6aa82..b8ba735d 100644 --- a/zlt-web/layui-web/src/main/resources/static/index.html +++ b/zlt-web/layui-web/src/main/resources/static/index.html @@ -1,95 +1,95 @@ - - - - - - - zlt-mp - - - - - - - - - - -
- -
- - -
- - -
-
-
    -
-
-
-
-
-
- -
- - - - - -
-
- - - - - - - - - - + + + + + + + zlt-mp + + + + + + + + + + +
+ +
+ + +
+ + +
+
+
    +
+
+
+
+
+
+ +
+ + + + + +
+
+ + + + + + + + + + \ No newline at end of file diff --git a/zlt-web/layui-web/src/main/resources/static/login.html b/zlt-web/layui-web/src/main/resources/static/login.html index 643b16f1..59807664 100644 --- a/zlt-web/layui-web/src/main/resources/static/login.html +++ b/zlt-web/layui-web/src/main/resources/static/login.html @@ -1,129 +1,129 @@ - - - - - - - - 用户登录 - - - - - - - - - - - - - + + + + + + + + 用户登录 + + + + + + + + + + + + + \ No newline at end of file diff --git a/zlt-web/layui-web/src/main/resources/static/module/index.js b/zlt-web/layui-web/src/main/resources/static/module/index.js index 7bb9e6fa..183a5f3c 100644 --- a/zlt-web/layui-web/src/main/resources/static/module/index.js +++ b/zlt-web/layui-web/src/main/resources/static/module/index.js @@ -1,291 +1,291 @@ -//add by owen 修复 path 无法引用http://页面的问题 begin -String.prototype.startWith = function(str) { - if (str == null || str == "" || this.length == 0 - || str.length > this.length) - return false; - if (this.substr(0, str.length) == str) - return true; - else - return false; - return true; -} - - -function initIFrame() { - var $parent = $(".admin-iframe").parent(); - if ($parent.hasClass('layui-body')) { - $parent.addClass('admin-iframe-body'); - return; - } - if ($parent.hasClass('layui-tab-item')) { - $parent.css({'padding': '0', 'overflow-y': 'hidden'}); - } else { - $parent.css({'width': '100%', 'height': '100%'}); - } -} -//add by owen 修复 path 无法引用http://页面的问题 end - -layui.define(['config', 'admin', 'layer', 'laytpl', 'element', 'form'], function (exports) { - var $ = layui.$; - var config = layui.config; - var admin = layui.admin; - var layer = layui.layer; - var laytpl = layui.laytpl; - var element = layui.element; - var form = layui.form; - - var index = { - // 渲染左侧菜单栏 - initLeftNav: function () { - admin.req('api-user/menus/current', {}, function (data) { - //data = data[1]; - admin.putTempData("menus",data); - var menus = data; - // 判断权限 - for (var i = menus.length - 1; i >= 0; i--) { - var tempMenu = menus[i]; - if (tempMenu.auth && !admin.hasPerm(tempMenu.auth)) { - menus.splice(i, 1); - continue; - } - if (!tempMenu.subMenus) { - continue; - } - for (var j = tempMenu.subMenus.length - 1; j >= 0; j--) { - var jMenus = tempMenu.subMenus[j]; - if (jMenus.auth && !admin.hasPerm(jMenus.auth)) { - tempMenu.subMenus.splice(j, 1); - continue; - } - if (!jMenus.subMenus) { - continue; - } - for (var k = jMenus.subMenus.length - 1; k >= 0; k--) { - if (jMenus.subMenus[k].auth && !admin.hasPerm(jMenus.subMenus[k].auth)) { - jMenus.subMenus.splice(k, 1); - continue; - } - } - } - } - // 去除空的目录 - for (var i = menus.length - 1; i >= 0; i--) { - var tempMenu = menus[i]; - if (tempMenu.subMenus && tempMenu.subMenus.length <= 0) { - menus.splice(i, 1); - continue; - } - if (!tempMenu.subMenus) { - continue; - } - for (var j = tempMenu.subMenus.length - 1; j >= 0; j--) { - var jMenus = tempMenu.subMenus[j]; - if (jMenus.subMenus && jMenus.subMenus.length <= 0) { - tempMenu.splice(j, 1); - continue; - } - } - } - // 渲染 - $('.layui-layout-admin .layui-side').load('pages/side.html', function () { - laytpl(sideNav.innerHTML).render(menus, function (html) { - $('#sideNav').after(html); - }); - element.render('nav'); - admin.activeNav(Q.lash); - }); - - - }, 'GET'); - }, - // 路由注册 - initRouter: function () { - - index.regRouter(admin.getTempData("menus")); - // index.regRouter(config.menus); - Q.reg('console', function () { - var menuPath = 'pages/console.html' - index.loadView('console', menuPath, '主页'); - }); - - Q.init({ - index: 'console' - }); - }, - // 使用递归循环注册 - regRouter: function (menus) { - $.each(menus, function (i, data) { - if (data.url && data.url.indexOf('#!') == 0) { - Q.reg(data.url.substring(2), function () { - if (data.path.startWith("http://")) { - window.open(data.path); - } else { - //临时保存url - data.path.startWith("http://") ? admin.putTempData("params",data.path) : null ; - - var menuId = data.url.substring(2); - //add by owen 修复 path 无法引用http://页面的问题 - var menuPath = data.path.startWith("http://") ? 'pages/tpl/iframe.html' : 'pages/' + data.path - index.loadView(menuId, menuPath, data.name); - } - }); - } - if (data.subMenus) { - index.regRouter(data.subMenus); - } - }); - }, - // 路由加载组件 - loadView: function (menuId, menuPath, menuName) { - var contentDom = '.layui-layout-admin .layui-body'; - admin.showLoading('.layui-layout-admin .layui-body'); - var flag; // 选项卡是否添加 - flag = menuPath.startWith("http://") ? false : flag ; - // 判断是否开启了选项卡功能 - if (config.pageTabs) { - $('.layui-layout-admin .layui-body .layui-tab .layui-tab-title>li').each(function (index) { - if ($(this).attr('lay-id') === menuId) { - flag = true; - } - }); - if (!flag) { - element.tabAdd('admin-pagetabs', { - title: menuName, - //add by owen 修复 path 无法引用http://页面的问题 - content: menuPath.startWith("http://") ? '
' : '' , - id: menuId - }); - } - contentDom = '#' + menuId; - element.tabChange('admin-pagetabs', menuId); - admin.rollPage('auto'); - // 切换tab关闭表格内浮窗 - $('.layui-table-tips-c').trigger('click'); - // 解决切换tab滚动条时而消失的问题 - var $iframe = $('.layui-layout-admin .layui-body .layui-tab-content .layui-tab-item.layui-show .admin-iframe')[0]; - if ($iframe) { - $iframe.style.height = "99%"; - $iframe.scrollWidth; - $iframe.style.height = "100%"; - } - } - if (!flag || admin.isRefresh) { - $(contentDom).load(menuPath, function () { - admin.isRefresh = false; - element.render('breadcrumb'); - form.render('select'); - admin.removeLoading('.layui-layout-admin .layui-body'); - }); - } else { - admin.removeLoading('.layui-layout-admin .layui-body'); - } - admin.activeNav(Q.lash); - // 移动设备切换页面隐藏侧导航 - if (document.body.clientWidth <= 750) { - admin.flexible(true); - } - }, - // 从服务器获取登录用户的信息 - getUser: function (success) { - layer.load(2); - admin.req('api-user/users/current', {}, function (data) { - layer.closeAll('loading'); - if (data && data.resp_code === 0) { - let user = data.datas; - config.putUser(user); - admin.putTempData("permissions",user.permissions); - success(user); - } else { - layer.msg('获取用户失败', {icon: 2}); - config.removeToken(); - location.replace('login.html'); - } - }, 'GET'); - }, - //获取菜单 - getMenus: function () { - admin.req('api-user/menus/current', {}, function (data) { - admin.putTempData("menus",data); - }, 'GET'); - }, - // 页面元素绑定事件监听 - bindEvent: function () { - // 退出登录 - $('#btnLogout').click(function () { - layer.confirm('确定退出登录?', function () { - let token = config.getToken(); - let isExistsToken = false; - if (token) { - let accessToken = token.access_token; - config.removeToken(); - - if (accessToken) { - isExistsToken = true; - admin.req('api-uaa/oauth/check_token?token='+accessToken, {}, function (data) { - if (data.active) { - let loginPageUrl = window.location.protocol + '//' + window.location.host + '/login.html'; - window.location = config.base_server + 'api-uaa/oauth/remove/token?redirect_uri='+loginPageUrl+'&access_token='+accessToken; - } else { - location.replace('login.html'); - } - }, 'POST'); - } - } - if (!isExistsToken) { - location.replace('login.html'); - } - }); - }); - // 修改密码 - $('#setPsw').click(function () { - admin.popupRight('pages/tpl/password.html'); - }); - // 个人信息 - $('#setInfo').click(function () { - Q.go('myInfo'); - }); - // 消息 - $('#btnMessage').click(function () { - admin.popupRight('pages/tpl/message.html'); - }); - }, - // 检查多标签功能是否开启 - checkPageTabs: function () { - // 加载主页 - if (config.pageTabs) { - $('.layui-layout-admin').addClass('open-tab'); - element.tabAdd('admin-pagetabs', { - title: '', - content: '
', - id: 'console' - }); - $('#console').load('pages/console.html', function () { - }); - } else { - $('.layui-layout-admin').removeClass('open-tab'); - } - }, - // 打开新页面 - openNewTab: function (param) { - var url = param.url; - var title = param.title; - var menuId = param.menuId; - if (!menuId) { - menuId = url.replace(/[?:=&/]/g, '_'); - } - index.loadView(menuId, url, title); - }, - // 关闭选项卡 - closeTab: function (menuId) { - element.tabDelete('admin-pagetabs', menuId); - } - }; - - // tab选项卡切换监听 - element.on('tab(admin-pagetabs)', function (data) { - var layId = $(this).attr('lay-id'); - Q.go(layId); - }); - - exports('index', index); -}); +//add by owen 修复 path 无法引用http://页面的问题 begin +String.prototype.startWith = function(str) { + if (str == null || str == "" || this.length == 0 + || str.length > this.length) + return false; + if (this.substr(0, str.length) == str) + return true; + else + return false; + return true; +} + + +function initIFrame() { + var $parent = $(".admin-iframe").parent(); + if ($parent.hasClass('layui-body')) { + $parent.addClass('admin-iframe-body'); + return; + } + if ($parent.hasClass('layui-tab-item')) { + $parent.css({'padding': '0', 'overflow-y': 'hidden'}); + } else { + $parent.css({'width': '100%', 'height': '100%'}); + } +} +//add by owen 修复 path 无法引用http://页面的问题 end + +layui.define(['config', 'admin', 'layer', 'laytpl', 'element', 'form'], function (exports) { + var $ = layui.$; + var config = layui.config; + var admin = layui.admin; + var layer = layui.layer; + var laytpl = layui.laytpl; + var element = layui.element; + var form = layui.form; + + var index = { + // 渲染左侧菜单栏 + initLeftNav: function () { + admin.req('api-user/menus/current', {}, function (data) { + //data = data[1]; + admin.putTempData("menus",data); + var menus = data; + // 判断权限 + for (var i = menus.length - 1; i >= 0; i--) { + var tempMenu = menus[i]; + if (tempMenu.auth && !admin.hasPerm(tempMenu.auth)) { + menus.splice(i, 1); + continue; + } + if (!tempMenu.subMenus) { + continue; + } + for (var j = tempMenu.subMenus.length - 1; j >= 0; j--) { + var jMenus = tempMenu.subMenus[j]; + if (jMenus.auth && !admin.hasPerm(jMenus.auth)) { + tempMenu.subMenus.splice(j, 1); + continue; + } + if (!jMenus.subMenus) { + continue; + } + for (var k = jMenus.subMenus.length - 1; k >= 0; k--) { + if (jMenus.subMenus[k].auth && !admin.hasPerm(jMenus.subMenus[k].auth)) { + jMenus.subMenus.splice(k, 1); + continue; + } + } + } + } + // 去除空的目录 + for (var i = menus.length - 1; i >= 0; i--) { + var tempMenu = menus[i]; + if (tempMenu.subMenus && tempMenu.subMenus.length <= 0) { + menus.splice(i, 1); + continue; + } + if (!tempMenu.subMenus) { + continue; + } + for (var j = tempMenu.subMenus.length - 1; j >= 0; j--) { + var jMenus = tempMenu.subMenus[j]; + if (jMenus.subMenus && jMenus.subMenus.length <= 0) { + tempMenu.splice(j, 1); + continue; + } + } + } + // 渲染 + $('.layui-layout-admin .layui-side').load('pages/side.html', function () { + laytpl(sideNav.innerHTML).render(menus, function (html) { + $('#sideNav').after(html); + }); + element.render('nav'); + admin.activeNav(Q.lash); + }); + + + }, 'GET'); + }, + // 路由注册 + initRouter: function () { + + index.regRouter(admin.getTempData("menus")); + // index.regRouter(config.menus); + Q.reg('console', function () { + var menuPath = 'pages/console.html' + index.loadView('console', menuPath, '主页'); + }); + + Q.init({ + index: 'console' + }); + }, + // 使用递归循环注册 + regRouter: function (menus) { + $.each(menus, function (i, data) { + if (data.url && data.url.indexOf('#!') == 0) { + Q.reg(data.url.substring(2), function () { + if (data.path.startWith("http://")) { + window.open(data.path); + } else { + //临时保存url + data.path.startWith("http://") ? admin.putTempData("params",data.path) : null ; + + var menuId = data.url.substring(2); + //add by owen 修复 path 无法引用http://页面的问题 + var menuPath = data.path.startWith("http://") ? 'pages/tpl/iframe.html' : 'pages/' + data.path + index.loadView(menuId, menuPath, data.name); + } + }); + } + if (data.subMenus) { + index.regRouter(data.subMenus); + } + }); + }, + // 路由加载组件 + loadView: function (menuId, menuPath, menuName) { + var contentDom = '.layui-layout-admin .layui-body'; + admin.showLoading('.layui-layout-admin .layui-body'); + var flag; // 选项卡是否添加 + flag = menuPath.startWith("http://") ? false : flag ; + // 判断是否开启了选项卡功能 + if (config.pageTabs) { + $('.layui-layout-admin .layui-body .layui-tab .layui-tab-title>li').each(function (index) { + if ($(this).attr('lay-id') === menuId) { + flag = true; + } + }); + if (!flag) { + element.tabAdd('admin-pagetabs', { + title: menuName, + //add by owen 修复 path 无法引用http://页面的问题 + content: menuPath.startWith("http://") ? '
' : '' , + id: menuId + }); + } + contentDom = '#' + menuId; + element.tabChange('admin-pagetabs', menuId); + admin.rollPage('auto'); + // 切换tab关闭表格内浮窗 + $('.layui-table-tips-c').trigger('click'); + // 解决切换tab滚动条时而消失的问题 + var $iframe = $('.layui-layout-admin .layui-body .layui-tab-content .layui-tab-item.layui-show .admin-iframe')[0]; + if ($iframe) { + $iframe.style.height = "99%"; + $iframe.scrollWidth; + $iframe.style.height = "100%"; + } + } + if (!flag || admin.isRefresh) { + $(contentDom).load(menuPath, function () { + admin.isRefresh = false; + element.render('breadcrumb'); + form.render('select'); + admin.removeLoading('.layui-layout-admin .layui-body'); + }); + } else { + admin.removeLoading('.layui-layout-admin .layui-body'); + } + admin.activeNav(Q.lash); + // 移动设备切换页面隐藏侧导航 + if (document.body.clientWidth <= 750) { + admin.flexible(true); + } + }, + // 从服务器获取登录用户的信息 + getUser: function (success) { + layer.load(2); + admin.req('api-user/users/current', {}, function (data) { + layer.closeAll('loading'); + if (data && data.resp_code === 0) { + let user = data.datas; + config.putUser(user); + admin.putTempData("permissions",user.permissions); + success(user); + } else { + layer.msg('获取用户失败', {icon: 2}); + config.removeToken(); + location.replace('login.html'); + } + }, 'GET'); + }, + //获取菜单 + getMenus: function () { + admin.req('api-user/menus/current', {}, function (data) { + admin.putTempData("menus",data); + }, 'GET'); + }, + // 页面元素绑定事件监听 + bindEvent: function () { + // 退出登录 + $('#btnLogout').click(function () { + layer.confirm('确定退出登录?', function () { + let token = config.getToken(); + let isExistsToken = false; + if (token) { + let accessToken = token.access_token; + config.removeToken(); + + if (accessToken) { + isExistsToken = true; + admin.req('api-uaa/oauth/check_token?token='+accessToken, {}, function (data) { + if (data.active) { + let loginPageUrl = window.location.protocol + '//' + window.location.host + '/login.html'; + window.location = config.base_server + 'api-uaa/oauth/remove/token?redirect_uri='+loginPageUrl+'&access_token='+accessToken; + } else { + location.replace('login.html'); + } + }, 'POST'); + } + } + if (!isExistsToken) { + location.replace('login.html'); + } + }); + }); + // 修改密码 + $('#setPsw').click(function () { + admin.popupRight('pages/tpl/password.html'); + }); + // 个人信息 + $('#setInfo').click(function () { + Q.go('myInfo'); + }); + // 消息 + $('#btnMessage').click(function () { + admin.popupRight('pages/tpl/message.html'); + }); + }, + // 检查多标签功能是否开启 + checkPageTabs: function () { + // 加载主页 + if (config.pageTabs) { + $('.layui-layout-admin').addClass('open-tab'); + element.tabAdd('admin-pagetabs', { + title: '', + content: '
', + id: 'console' + }); + $('#console').load('pages/console.html', function () { + }); + } else { + $('.layui-layout-admin').removeClass('open-tab'); + } + }, + // 打开新页面 + openNewTab: function (param) { + var url = param.url; + var title = param.title; + var menuId = param.menuId; + if (!menuId) { + menuId = url.replace(/[?:=&/]/g, '_'); + } + index.loadView(menuId, url, title); + }, + // 关闭选项卡 + closeTab: function (menuId) { + element.tabDelete('admin-pagetabs', menuId); + } + }; + + // tab选项卡切换监听 + element.on('tab(admin-pagetabs)', function (data) { + var layId = $(this).attr('lay-id'); + Q.go(layId); + }); + + exports('index', index); +}); diff --git a/zlt-web/layui-web/src/main/resources/static/pages/attestation/app.html b/zlt-web/layui-web/src/main/resources/static/pages/attestation/app.html index d0a1978b..b87fd0d8 100644 --- a/zlt-web/layui-web/src/main/resources/static/pages/attestation/app.html +++ b/zlt-web/layui-web/src/main/resources/static/pages/attestation/app.html @@ -1,237 +1,237 @@ -
-
-

应用管理

- - 首页 - 应用管理 - -
-
-
- 搜索:  - - -
- - -
-
-
- - - - - - - - - + + + + + + \ No newline at end of file diff --git a/zlt-web/layui-web/src/main/resources/static/pages/log/sysLog.html b/zlt-web/layui-web/src/main/resources/static/pages/log/sysLog.html index bf6f3ddc..204ae7e7 100644 --- a/zlt-web/layui-web/src/main/resources/static/pages/log/sysLog.html +++ b/zlt-web/layui-web/src/main/resources/static/pages/log/sysLog.html @@ -1,106 +1,106 @@ -
-
-

系统日志

- - 首页 - 系统日志 - -
-
-
- 搜索: -   -   - -
- -
-
-
- - \ No newline at end of file diff --git a/zlt-web/layui-web/src/main/resources/static/pages/log/traceLog.html b/zlt-web/layui-web/src/main/resources/static/pages/log/traceLog.html deleted file mode 100644 index 9b62f01a..00000000 --- a/zlt-web/layui-web/src/main/resources/static/pages/log/traceLog.html +++ /dev/null @@ -1,45 +0,0 @@ - -
- - \ No newline at end of file diff --git a/zlt-web/layui-web/src/main/resources/static/pages/system/menus.html b/zlt-web/layui-web/src/main/resources/static/pages/system/menus.html index 2eea260c..23d3861e 100644 --- a/zlt-web/layui-web/src/main/resources/static/pages/system/menus.html +++ b/zlt-web/layui-web/src/main/resources/static/pages/system/menus.html @@ -1,188 +1,188 @@ -
-
-

菜单管理

- - 首页 - 菜单管理 - -
-
-
- 所属应用: -  搜索:  - - - - -
- - - -
-
- - - - - - + + + \ No newline at end of file diff --git a/zlt-web/pom.xml b/zlt-web/pom.xml index edddbdd7..dcc9c117 100644 --- a/zlt-web/pom.xml +++ b/zlt-web/pom.xml @@ -1,56 +1,56 @@ - - - 4.0.0 - com.zlt - zlt-web - 5.4.0 - 前端 - pom - - - 1.8 - 1.8 - UTF-8 - 8 - 2.5.14 - 1.2.2 - - - - - - org.springframework.boot - spring-boot-dependencies - ${spring-boot-dependencies.version} - pom - import - - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring-boot-dependencies.version} - - - com.spotify - docker-maven-plugin - ${docker-maven-plugin.version} - - - - - - - - layui-web - - react-web - - + + + 4.0.0 + com.zlt + zlt-web + 5.4.0 + 前端 + pom + + + 1.8 + 1.8 + UTF-8 + 8 + 2.5.14 + 1.2.2 + + + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot-dependencies.version} + pom + import + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring-boot-dependencies.version} + + + com.spotify + docker-maven-plugin + ${docker-maven-plugin.version} + + + + + + + + layui-web + + react-web + +