feat: 更改配置文件
This commit is contained in:
parent
e124bcdadc
commit
e5c71400ad
|
@ -484,14 +484,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, AdminUser> implemen
|
||||||
|
|
||||||
// 根据用户Id列表查询用户角色
|
// 根据用户Id列表查询用户角色
|
||||||
List<Role> list = roleMapper.selectListByUserIds(ids);
|
List<Role> list = roleMapper.selectListByUserIds(ids);
|
||||||
List<Role> roleList = list.stream().filter(role -> !role.getRoleCode().equals("admin") || ids.contains(1L)).toList();
|
List<Role> roleList = list.stream().filter(role -> role.getRoleCode().equals("admin") || ids.contains(1L)).toList();
|
||||||
if (roleList.isEmpty()) throw new BunnyException(ResultCodeEnum.ADMIN_ROLE_CAN_NOT_DELETED);
|
if (!roleList.isEmpty()) throw new BunnyException(ResultCodeEnum.ADMIN_ROLE_CAN_NOT_DELETED);
|
||||||
|
|
||||||
// 如果有管理员不删除
|
|
||||||
ids.remove(1L);
|
|
||||||
|
|
||||||
// 逻辑删除
|
// 逻辑删除
|
||||||
baseMapper.deleteBatchIds(ids);
|
removeBatchByIds(ids);
|
||||||
|
|
||||||
// 物理删除用户
|
// 物理删除用户
|
||||||
// baseMapper.deleteBatchIdsWithPhysics(ids);
|
// baseMapper.deleteBatchIdsWithPhysics(ids);
|
||||||
|
|
|
@ -17,6 +17,11 @@ mybatis-plus:
|
||||||
global-config:
|
global-config:
|
||||||
db-config:
|
db-config:
|
||||||
logic-delete-field: isDeleted
|
logic-delete-field: isDeleted
|
||||||
|
logic-delete-value: 1 # 逻辑已删除值
|
||||||
|
logic-not-delete-value: 0 # 逻辑未删除值
|
||||||
|
configuration:
|
||||||
|
map-underscore-to-camel-case: true
|
||||||
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志
|
||||||
|
|
||||||
bunny:
|
bunny:
|
||||||
master:
|
master:
|
||||||
|
|
|
@ -6,6 +6,9 @@ mybatis-plus:
|
||||||
global-config:
|
global-config:
|
||||||
db-config:
|
db-config:
|
||||||
logic-delete-field: isDeleted
|
logic-delete-field: isDeleted
|
||||||
|
configuration:
|
||||||
|
map-underscore-to-camel-case: true
|
||||||
|
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
|
|
|
@ -6,6 +6,8 @@ mybatis-plus:
|
||||||
global-config:
|
global-config:
|
||||||
db-config:
|
db-config:
|
||||||
logic-delete-field: isDeleted
|
logic-delete-field: isDeleted
|
||||||
|
configuration:
|
||||||
|
map-underscore-to-camel-case: true
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
level:
|
level:
|
||||||
|
@ -23,9 +25,6 @@ knife4j:
|
||||||
enable: true
|
enable: true
|
||||||
production: true
|
production: true
|
||||||
|
|
||||||
# configuration:
|
|
||||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 查看日志
|
|
||||||
|
|
||||||
# rabbitmq:
|
# rabbitmq:
|
||||||
# host: ${bunny.rabbitmq.host}
|
# host: ${bunny.rabbitmq.host}
|
||||||
# port: ${bunny.rabbitmq.port}
|
# port: ${bunny.rabbitmq.port}
|
||||||
|
|
|
@ -70,7 +70,6 @@ spring:
|
||||||
threadPriority: 5
|
threadPriority: 5
|
||||||
threadsInheritContextClassLoaderOfInitializingThread: true
|
threadsInheritContextClassLoaderOfInitializingThread: true
|
||||||
|
|
||||||
|
|
||||||
jackson:
|
jackson:
|
||||||
date-format: yyyy-MM-dd HH:mm:ss
|
date-format: yyyy-MM-dd HH:mm:ss
|
||||||
time-zone: GMT+8
|
time-zone: GMT+8
|
||||||
|
|
|
@ -53,8 +53,10 @@
|
||||||
sys_user_role ur
|
sys_user_role ur
|
||||||
WHERE u.id = ur.user_id
|
WHERE u.id = ur.user_id
|
||||||
AND r.id = ur.role_id
|
AND r.id = ur.role_id
|
||||||
AND r.id = #{userId}
|
AND ur.user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 根据用户Id列表查询用户角色 -->
|
||||||
<select id="selectListByUserIds" resultType="cn.bunny.dao.entity.system.Role">
|
<select id="selectListByUserIds" resultType="cn.bunny.dao.entity.system.Role">
|
||||||
SELECT r.*
|
SELECT r.*
|
||||||
FROM sys_role r,
|
FROM sys_role r,
|
||||||
|
|
Loading…
Reference in New Issue