Merge branch 'dev' into leng_dev

# Conflicts:
#	pigx-common/pigx-common-bom/pom.xml
This commit is contained in:
lbw committed 2021-12-27 10:42:24 +08:00
commit 42c388e186
32 files changed
+84 -439

No files matched your search

+7 -5
View File
@@ -34,7 +34,7 @@
<xxl.job.version>2.3.0</xxl.job.version>
<aliyun.version>3.0.52.ALL</aliyun.version>
<aws.version>1.11.543</aws.version>
<log4j.version>2.17.0</log4j.version>
<log4j2.version>2.17.0</log4j2.version>
<javaformat.plugin.version>0.0.23</javaformat.plugin.version>
<docker.plugin.version>0.33.0</docker.plugin.version>
<cloud.plugin.version>1.0.0</cloud.plugin.version>
@@ -237,13 +237,15 @@
<!-- 指定 log4j 版本-->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
<artifactId>log4j-to-slf4j</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
<artifactId>log4j-bom</artifactId>
<version>${log4j2.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
@@ -2,7 +2,6 @@ package com.pig4cloud.pigx.common.data.datascope;
import com.baomidou.mybatisplus.core.injector.AbstractMethod;
import com.baomidou.mybatisplus.core.injector.DefaultSqlInjector;
import com.baomidou.mybatisplus.extension.injector.methods.InsertBatchSomeColumn;
import java.util.List;
@@ -20,7 +19,6 @@ public class DataScopeSqlInjector extends DefaultSqlInjector {
methodList.add(new SelectListByScope());
methodList.add(new SelectPageByScope());
methodList.add(new SelectCountByScope());
methodList.add(new InsertBatchSomeColumn());
return methodList;
}
@@ -42,11 +42,4 @@ public interface PigxBaseMapper<T> extends BaseMapper<T> {
*/
Integer selectCountByScope(@Param(Constants.WRAPPER) Wrapper<T> queryWrapper, DataScope scope);
/**
* 批量插入 仅适用于 mysql
* @param entityList 实体列表
* @return 影响行数
*/
Integer insertBatchSomeColumn(List<T> entityList);
}
@@ -61,7 +61,7 @@ public class SysDept extends Model<SysDept> {
*/
@NotNull(message = "排序值不能为空")
@ApiModelProperty(value = "排序值")
private Integer sort;
private Integer sortOrder;
/**
* 创建时间
@@ -49,7 +49,7 @@ public class SysDict extends Model<SysDict> {
* 类型
*/
@ApiModelProperty(value = "字典类型")
private String type;
private String dictType;
/**
* 描述
@@ -74,9 +74,8 @@ public class SysDict extends Model<SysDict> {
/**
* 是否是系统内置
*/
@TableField(value = "`system`")
@ApiModelProperty(value = "是否系统内置")
private String system;
private String systemFlag;
/**
* 备注信息
@@ -79,7 +79,7 @@ public class SysDictItem extends Model<SysDictItem> {
* 排序(升序)
*/
@ApiModelProperty(value = "排序值,默认升序")
private Integer sort;
private Integer sortOrder;
/**
* 创建时间
@@ -88,14 +88,14 @@ public class SysMenu extends Model<SysMenu> {
* 排序值
*/
@ApiModelProperty(value = "排序值")
private Integer sort;
private Integer sortOrder;
/**
* 菜单类型 (0菜单 1按钮)
*/
@NotNull(message = "菜单类型不能为空")
@ApiModelProperty(value = "菜单类型,0:菜单 1:按钮")
private String type;
private String menuType;
/**
* 路由缓冲
@@ -45,7 +45,7 @@ public class SysUser implements Serializable {
/**
* 主键ID
*/
@TableId(value = "user_id", type = IdType.AUTO)
@TableId(value = "user_id", type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键id")
private Long userId;
@@ -24,7 +24,7 @@ public class UserExcelVO implements Serializable {
* 主键ID
*/
@ExcelProperty("用户编号")
private Integer userId;
private Long userId;
/**
* 用户名
@@ -63,7 +63,7 @@ public class SysDeptRelationServiceImpl extends ServiceImpl<SysDeptRelationMappe
return relation;
}).collect(Collectors.toList());
if (CollUtil.isNotEmpty(relationList)) {
baseMapper.insertBatchSomeColumn(relationList);
relationList.forEach(ele -> baseMapper.insert(ele));
}
// 自己也要维护到关系表中
@@ -128,12 +128,12 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
// 权限内部门
List<TreeNode<Long>> collect = deptAllList.stream()
.filter(dept -> dept.getDeptId().intValue() != dept.getParentId())
.sorted(Comparator.comparingInt(SysDept::getSort)).map(dept -> {
.sorted(Comparator.comparingInt(SysDept::getSortOrder)).map(dept -> {
TreeNode<Long> treeNode = new TreeNode();
treeNode.setId(dept.getDeptId());
treeNode.setParentId(dept.getParentId());
treeNode.setName(dept.getName());
treeNode.setWeight(dept.getSort());
treeNode.setWeight(dept.getSortOrder());
// 有权限不返回标识
Map<String, Object> extra = new HashMap<>(8);
extra.put("isLock", !deptOwnIdList.contains(dept.getDeptId()));
@@ -53,7 +53,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
SysDictItem dictItem = this.getById(id);
SysDict dict = dictService.getById(dictItem.getDictId());
// 系统内置
if (DictTypeEnum.SYSTEM.getType().equals(dict.getSystem())) {
if (DictTypeEnum.SYSTEM.getType().equals(dict.getSystemFlag())) {
return R.failed("系统内置字典项目不能删除");
}
return R.ok(this.removeById(id));
@@ -70,7 +70,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
// 查询字典
SysDict dict = dictService.getById(item.getDictId());
// 系统内置
if (DictTypeEnum.SYSTEM.getType().equals(dict.getSystem())) {
if (DictTypeEnum.SYSTEM.getType().equals(dict.getSystemFlag())) {
return R.failed("系统内置字典项目不能删除");
}
return R.ok(this.updateById(item));
@@ -54,7 +54,7 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
public R removeDict(Long id) {
SysDict dict = this.getById(id);
// 系统内置
if (DictTypeEnum.SYSTEM.getType().equals(dict.getSystem())) {
if (DictTypeEnum.SYSTEM.getType().equals(dict.getSystemFlag())) {
return R.failed("系统内置字典不能删除");
}
@@ -73,7 +73,7 @@ public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> impl
public R updateDict(SysDict dict) {
SysDict sysDict = this.getById(dict.getId());
// 系统内置
if (DictTypeEnum.SYSTEM.getType().equals(sysDict.getSystem())) {
if (DictTypeEnum.SYSTEM.getType().equals(sysDict.getSystemFlag())) {
return R.failed("系统内置字典不能修改");
}
return R.ok(this.updateById(dict));
@@ -100,7 +100,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
public List<Tree<Long>> treeMenu(boolean lazy, Long parentId) {
if (!lazy) {
List<TreeNode<Long>> collect = baseMapper
.selectList(Wrappers.<SysMenu>lambdaQuery().orderByAsc(SysMenu::getSort)).stream()
.selectList(Wrappers.<SysMenu>lambdaQuery().orderByAsc(SysMenu::getSortOrder)).stream()
.map(getNodeFunction()).collect(Collectors.toList());
return TreeUtil.build(collect, CommonConstants.MENU_TREE_ROOT_ID);
@@ -109,8 +109,8 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
Long parent = parentId == null ? CommonConstants.MENU_TREE_ROOT_ID : parentId;
List<TreeNode<Long>> collect = baseMapper
.selectList(
Wrappers.<SysMenu>lambdaQuery().eq(SysMenu::getParentId, parent).orderByAsc(SysMenu::getSort))
.selectList(Wrappers.<SysMenu>lambdaQuery().eq(SysMenu::getParentId, parent)
.orderByAsc(SysMenu::getSortOrder))
.stream().map(getNodeFunction()).collect(Collectors.toList());
return TreeUtil.build(collect, parent);
@@ -138,15 +138,15 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
node.setId(menu.getMenuId());
node.setName(menu.getName());
node.setParentId(menu.getParentId());
node.setWeight(menu.getSort());
node.setWeight(menu.getSortOrder());
// 扩展属性
Map<String, Object> extra = new HashMap<>();
extra.put("icon", menu.getIcon());
extra.put("path", menu.getPath());
extra.put("type", menu.getType());
extra.put("menuType", menu.getMenuType());
extra.put("permission", menu.getPermission());
extra.put("label", menu.getName());
extra.put("sort", menu.getSort());
extra.put("sortOrder", menu.getSortOrder());
extra.put("keepAlive", menu.getKeepAlive());
node.setExtra(extra);
return node;
@@ -161,10 +161,10 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
private Predicate<SysMenu> menuTypePredicate(String type) {
return vo -> {
if (MenuTypeEnum.TOP_MENU.getDescription().equals(type)) {
return MenuTypeEnum.TOP_MENU.getType().equals(vo.getType());
return MenuTypeEnum.TOP_MENU.getType().equals(vo.getMenuType());
}
// 其他查询 左侧 + 顶部
return !MenuTypeEnum.BUTTON.getType().equals(vo.getType());
return !MenuTypeEnum.BUTTON.getType().equals(vo.getMenuType());
};
}
@@ -74,8 +74,7 @@ public class SysRoleMenuServiceImpl extends ServiceImpl<SysRoleMenuMapper, SysRo
// 清空userinfo
cacheManager.getCache(CacheConstants.USER_DETAILS).clear();
baseMapper.insertBatchSomeColumn(roleMenuList);
roleMenuList.forEach(ele -> baseMapper.insert(ele));
return Boolean.TRUE;
}
@@ -167,12 +167,12 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
roleMenu.setMenuId(menu.getMenuId());
return roleMenu;
}).collect(Collectors.toList());
roleMenuMapper.insertBatchSomeColumn(roleMenuList);
roleMenuList.forEach(ele -> roleMenuMapper.insert(ele));
// 插入系统字典
dictService.saveBatch(dictList.stream().peek(d -> d.setId(null)).collect(Collectors.toList()));
// 处理字典项最新关联的字典ID
List<SysDictItem> itemList = dictList.stream().flatMap(
dict -> dictItemList.stream().filter(item -> item.getType().equals(dict.getType())).peek(item -> {
List<SysDictItem> itemList = dictList.stream().flatMap(dict -> dictItemList.stream()
.filter(item -> item.getType().equals(dict.getDictType())).peek(item -> {
item.setDictId(dict.getId());
item.setId(null);
})).collect(Collectors.toList());
@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pig4cloud.pigx.admin.mapper.SysDeptMapper">
</mapper>
@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pig4cloud.pigx.admin.mapper.SysDictItemMapper">
<resultMap id="sysDictItemMap" type="com.pig4cloud.pigx.admin.api.entity.SysDictItem">
<id property="id" column="id"/>
<result property="dictId" column="dict_id"/>
<result property="value" column="value"/>
<result property="label" column="label"/>
<result property="type" column="type"/>
<result property="description" column="description"/>
<result property="sort" column="sort"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="remarks" column="remarks"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
</mapper>
@@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pig4cloud.pigx.admin.mapper.SysDictMapper">
<resultMap id="sysDictMap" type="com.pig4cloud.pigx.admin.api.entity.SysDict">
<id property="id" column="id"/>
<result property="type" column="type"/>
<result property="description" column="description"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="remarks" column="remarks"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
</mapper>
@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pig4cloud.pigx.admin.mapper.SysFileMapper">
</mapper>
@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pig4cloud.pigx.admin.mapper.SysLogMapper">
</mapper>
@@ -20,7 +20,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pig4cloud.pigx.admin.mapper.SysMenuMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.pig4cloud.pigx.admin.api.entity.SysMenu">
<id column="menu_id" property="menuId"/>
@@ -29,8 +28,8 @@
<result column="path" property="path"/>
<result column="parent_id" property="parentId"/>
<result column="icon" property="icon"/>
<result column="sort" property="sort"/>
<result column="type" property="type"/>
<result column="sort_order" property="sortOrder"/>
<result column="menu_type" property="menuType"/>
<result column="keep_alive" property="keepAlive"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
@@ -39,23 +38,32 @@
<!--通过角色查询菜单信息-->
<select id="listMenusByRoleId" resultMap="BaseResultMap">
SELECT
sys_menu.*
FROM
sys_menu
LEFT JOIN sys_role_menu ON sys_menu.menu_id = sys_role_menu.menu_id
WHERE
sys_menu.del_flag = 0
AND sys_role_menu.role_id = #{roleId}
ORDER BY
sys_menu.sort DESC
</select>
SELECT sys_menu.menu_id,
sys_menu.name,
sys_menu.permission,
sys_menu.path,
sys_menu.parent_id,
sys_menu.icon,
sys_menu.sort_order,
sys_menu.keep_alive,
sys_menu.menu_type,
sys_menu.create_time,
sys_menu.update_time,
sys_menu.del_flag
FROM sys_menu
LEFT JOIN sys_role_menu ON sys_menu.menu_id = sys_role_menu.menu_id
WHERE sys_menu.del_flag = 0
AND sys_role_menu.role_id = #{roleId}
ORDER BY sys_menu.sort_order DESC
</select>
<!--通过角色ID 查询权限-->
<select id="listPermissionsByRoleIds" resultType="java.lang.String">
SELECT
m.permission
FROM
sys_menu m, sys_role_menu rm WHERE m.menu_id = rm.menu_id AND m.del_flag = 0 AND rm.role_id IN (#{roleIds})
</select>
SELECT m.permission
FROM sys_menu m,
sys_role_menu rm
WHERE m.menu_id = rm.menu_id
AND m.del_flag = 0
AND rm.role_id IN (#{roleIds})
</select>
</mapper>
@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pig4cloud.pigx.admin.mapper.SysOauthClientDetailsMapper">
<resultMap id="sysOauthClientDetailsMap" type="com.pig4cloud.pigx.admin.api.entity.SysOauthClientDetails">
<id property="id" column="id"/>
<result property="clientId" column="client_id"/>
<result property="resourceIds" column="resource_ids"/>
<result property="clientSecret" column="client_secret"/>
<result property="scope" column="scope"/>
<result property="authorizedGrantTypes" column="authorized_grant_types"/>
<result property="webServerRedirectUri" column="web_server_redirect_uri"/>
<result property="authorities" column="authorities"/>
<result property="accessTokenValidity" column="access_token_validity"/>
<result property="refreshTokenValidity" column="refresh_token_validity"/>
<result property="additionalInformation" column="additional_information"/>
<result property="autoapprove" column="autoapprove"/>
</resultMap>
</mapper>
@@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pig4cloud.pigx.admin.mapper.SysPublicParamMapper">
<resultMap id="sysPublicParamMap" type="com.pig4cloud.pigx.admin.api.entity.SysPublicParam">
<id property="publicId" column="public_id"/>
<result property="publicName" column="public_name"/>
<result property="publicKey" column="public_key"/>
<result property="publicValue" column="public_value"/>
<result property="status" column="status"/>
<result property="delFlag" column="del_flag"/>
<result property="validateCode" column="validate_code"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="publicType" column="public_type"/>
</resultMap>
</mapper>
@@ -20,7 +20,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pig4cloud.pigx.admin.mapper.SysRoleMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.pig4cloud.pigx.admin.api.entity.SysRole">
<id column="role_id" property="roleId"/>
@@ -36,9 +35,19 @@
<!-- 通过用户ID,查询角色信息-->
<select id="listRolesByUserId" resultMap="BaseResultMap">
SELECT
r.*
FROM
sys_role r, sys_user_role ur WHERE r.role_id = ur.role_id AND r.del_flag = 0 and ur.user_id IN (#{userId})
</select>
SELECT sys_role.role_id,
sys_role.role_name,
sys_role.role_code,
sys_role.role_desc,
sys_role.ds_type,
sys_role.ds_scope,
sys_role.create_time,
sys_role.update_time,
sys_role.del_flag
FROM sys_role,
sys_user_role
WHERE sys_role.role_id = sys_user_role.role_id
AND sys_role.del_flag = 0
and sys_user_role.user_id = #{userId}
</select>
</mapper>
@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pig4cloud.pigx.admin.mapper.SysRoleMenuMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.pig4cloud.pigx.admin.api.entity.SysRoleMenu">
<id column="role_id" property="roleId"/>
<result column="menu_id" property="menuId"/>
</resultMap>
</mapper>
@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of ource code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pig4cloud.pigx.admin.mapper.SysRouteConfMapper">
</mapper>
@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pig4cloud.pigx.admin.mapper.SysSocialDetailsMapper">
<resultMap id="sysSocialDetailsMap" type="com.pig4cloud.pigx.admin.api.entity.SysSocialDetails">
<id property="id" column="id"/>
<result property="type" column="type"/>
<result property="remark" column="remark"/>
<result property="appId" column="app_id"/>
<result property="appSecret" column="app_secret"/>
<result property="redirectUrl" column="redirect_url"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
</mapper>
@@ -1,37 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~
~ Copyright (c) 2018-2025, lengleng All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~
~ Redistributions of source code must retain the above copyright notice,
~ this list of conditions and the following disclaimer.
~ Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ Neither the name of the pig4cloud.com developer nor the names of its
~ contributors may be used to endorse or promote products derived from
~ this software without specific prior written permission.
~ Author: lengleng (wangiegie@gmail.com)
~
-->
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.pig4cloud.pigx.admin.mapper.SysTenantMapper">
<resultMap id="sysTenantMap" type="com.pig4cloud.pigx.admin.api.entity.SysTenant">
<id property="id" column="id"/>
<result property="name" column="name"/>
<result property="code" column="code"/>
<result property="startTime" column="start_time"/>
<result property="endTime" column="end_time"/>
<result property="status" column="status"/>
<result property="delFlag" column="del_flag"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
</mapper>
@@ -58,7 +58,7 @@
<result column="ucreate_time" property="createTime"/>
<result column="uupdate_time" property="updateTime"/>
<result column="lock_flag" property="lockFlag"/>
<result column="udel_flag" property="delFlag"/>
<result column="del_flag" property="delFlag"/>
<result column="dept_id" property="deptId"/>
<result column="tenant_id" property="tenantId"/>
<result column="dept_name" property="deptName"/>
@@ -11,20 +11,20 @@ import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.Char
import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ReportDashboardDto;
import com.anjiplus.template.gaea.business.modules.dashboard.controller.dto.ReportDashboardObjectDto;
import com.anjiplus.template.gaea.business.modules.dashboard.dao.ReportDashboardMapper;
import com.anjiplus.template.gaea.business.modules.dashboard.dao.entity.ReportDashboard;
import com.anjiplus.template.gaea.business.modules.dashboard.service.ChartStrategy;
import com.anjiplus.template.gaea.business.modules.dashboard.service.ReportDashboardService;
import com.anjiplus.template.gaea.business.modules.file.entity.GaeaFile;
import com.anjiplus.template.gaea.business.modules.file.service.GaeaFileService;
import com.anjiplus.template.gaea.business.modules.file.util.FileUtils;
import com.anjiplus.template.gaea.business.util.DateUtil;
import com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.dto.ReportDashboardWidgetDto;
import com.anjiplus.template.gaea.business.modules.dashboardwidget.controller.dto.ReportDashboardWidgetValueDto;
import com.anjiplus.template.gaea.business.modules.dashboard.dao.entity.ReportDashboard;
import com.anjiplus.template.gaea.business.modules.dashboardwidget.dao.entity.ReportDashboardWidget;
import com.anjiplus.template.gaea.business.modules.dashboardwidget.service.ReportDashboardWidgetService;
import com.anjiplus.template.gaea.business.modules.dataset.controller.dto.DataSetDto;
import com.anjiplus.template.gaea.business.modules.dataset.controller.dto.OriginalDataDto;
import com.anjiplus.template.gaea.business.modules.dataset.service.DataSetService;
import com.anjiplus.template.gaea.business.modules.file.entity.GaeaFile;
import com.anjiplus.template.gaea.business.modules.file.service.GaeaFileService;
import com.anjiplus.template.gaea.business.modules.file.util.FileUtils;
import com.anjiplus.template.gaea.business.util.DateUtil;
import com.anjiplus.template.gaea.business.util.FileUtil;
import com.anjiplus.template.gaea.business.util.UuidUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -48,7 +48,6 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.*;
@@ -84,7 +83,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi
private final static String JSON_PATH = "dashboard.json";
private Map<String, ChartStrategy> queryServiceImplMap = new HashMap<>();
private final Map<String, ChartStrategy> queryServiceImplMap = new HashMap<>();
private ApplicationContext applicationContext;
@@ -185,10 +184,7 @@ public class ReportDashboardServiceImpl implements ReportDashboardService, Initi
// 兼容底层,不采用批量插入
reportDashboardWidgetService.insert(reportDashboardWidget);
// reportDashboardWidgetList.add(reportDashboardWidget);
}
// reportDashboardWidgetService.insertBatch(reportDashboardWidgetList);
}
@@ -8,8 +8,8 @@ import com.anji.plus.gaea.curd.mapper.GaeaBaseMapper;
import com.anji.plus.gaea.exception.BusinessExceptionBuilder;
import com.anji.plus.gaea.utils.GaeaBeanUtils;
import com.anjiplus.template.gaea.business.code.ResponseCode;
import com.anjiplus.template.gaea.business.modules.dataset.controller.dto.OriginalDataDto;
import com.anjiplus.template.gaea.business.modules.dataset.controller.dto.DataSetDto;
import com.anjiplus.template.gaea.business.modules.dataset.controller.dto.OriginalDataDto;
import com.anjiplus.template.gaea.business.modules.dataset.dao.DataSetMapper;
import com.anjiplus.template.gaea.business.modules.dataset.dao.entity.DataSet;
import com.anjiplus.template.gaea.business.modules.dataset.service.DataSetService;
@@ -296,9 +296,7 @@ public class DataSetServiceImpl implements DataSetService {
dataSetParam.setSetCode(setCode);
// 不采用批量
dataSetParamService.insert(dataSetParam);
// dataSetParamList.add(dataSetParam);
});
// dataSetParamService.insertBatch(dataSetParamList);
}
@@ -316,9 +314,7 @@ public class DataSetServiceImpl implements DataSetService {
dataSetTransform.setSetCode(setCode);
// 不采用批量
dataSetTransformService.insert(dataSetTransform);
// dataSetTransformList.add(dataSetTransform);
}
// dataSetTransformService.insertBatch(dataSetTransformList);
}
}