mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
code review 编码规范统一
This commit is contained in:
parent
47447ded6b
commit
17167c24d1
@ -2430,8 +2430,10 @@ CREATE TABLE `system_user_post` (
|
|||||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||||
`tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号',
|
`tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号',
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='部门表';
|
) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户岗位表';
|
||||||
|
insert into system_user_post (user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) value (1,1,'admin',current_timestamp,'admin',current_timestamp,false,1);
|
||||||
|
insert into system_user_post (user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) value (100,1,'admin',current_timestamp,'admin',current_timestamp,false,1);
|
||||||
|
insert into system_user_post (user_id, post_id, creator, create_time, updater, update_time, deleted, tenant_id) value (114,3,'admin',current_timestamp,'admin',current_timestamp,false,1);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for system_dept
|
-- Table structure for system_dept
|
||||||
|
@ -14,18 +14,16 @@ public interface UserPostMapper extends BaseMapperX<UserPostDO> {
|
|||||||
|
|
||||||
default List<UserPostDO> selectIdList(Long id) {
|
default List<UserPostDO> selectIdList(Long id) {
|
||||||
return selectList(new LambdaQueryWrapperX<UserPostDO>()
|
return selectList(new LambdaQueryWrapperX<UserPostDO>()
|
||||||
.eq(UserPostDO::getUserId, id)
|
.eq(UserPostDO::getUserId, id));
|
||||||
.select(UserPostDO::getPostId));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default void deleteByUserIdAndPostId(Long userId, Collection<Long> deletePostIds) {
|
default void deleteByUserIdAndPostId(Long userId, Collection<Long> postIds) {
|
||||||
delete(new LambdaQueryWrapperX<UserPostDO>()
|
delete(new LambdaQueryWrapperX<UserPostDO>()
|
||||||
.eq(UserPostDO::getUserId, userId)
|
.eq(UserPostDO::getUserId, userId)
|
||||||
.in(UserPostDO::getPostId, deletePostIds));
|
.in(UserPostDO::getPostId, postIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
default List<UserPostDO> selectUserIdByPostIds(Collection<Long> postIds) {
|
default List<UserPostDO> selectListByPostIds(Collection<Long> postIds) {
|
||||||
return selectList(new LambdaQueryWrapperX<UserPostDO>()
|
return selectList(new LambdaQueryWrapperX<UserPostDO>()
|
||||||
.in(UserPostDO::getPostId, postIds));
|
.in(UserPostDO::getPostId, postIds));
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,6 @@ import cn.iocoder.yudao.module.system.service.dept.DeptService;
|
|||||||
import cn.iocoder.yudao.module.system.service.dept.PostService;
|
import cn.iocoder.yudao.module.system.service.dept.PostService;
|
||||||
import cn.iocoder.yudao.module.system.service.permission.PermissionService;
|
import cn.iocoder.yudao.module.system.service.permission.PermissionService;
|
||||||
import cn.iocoder.yudao.module.system.service.tenant.TenantService;
|
import cn.iocoder.yudao.module.system.service.tenant.TenantService;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
@ -266,7 +265,7 @@ public class AdminUserServiceImpl implements AdminUserService {
|
|||||||
if (CollUtil.isEmpty(postIds)) {
|
if (CollUtil.isEmpty(postIds)) {
|
||||||
return Collections.emptyList();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
List<Long> userIdList = userPostMapper.selectUserIdByPostIds(postIds)
|
List<Long> userIdList = userPostMapper.selectListByPostIds(postIds)
|
||||||
.stream()
|
.stream()
|
||||||
.map(UserPostDO::getUserId)
|
.map(UserPostDO::getUserId)
|
||||||
.distinct()
|
.distinct()
|
||||||
|
@ -156,7 +156,7 @@ CREATE TABLE IF NOT EXISTS `system_user_post`(
|
|||||||
"deleted" bit NOT NULL DEFAULT FALSE,
|
"deleted" bit NOT NULL DEFAULT FALSE,
|
||||||
"tenant_id" bigint not null default '0',
|
"tenant_id" bigint not null default '0',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) COMMENT ='部门表';
|
) COMMENT ='用户岗位表';
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS "system_notice" (
|
CREATE TABLE IF NOT EXISTS "system_notice" (
|
||||||
|
Loading…
Reference in New Issue
Block a user