code review 编码规范统一

This commit is contained in:
anzhen
2022-04-15 15:56:47 +08:00
parent 47447ded6b
commit 17167c24d1
4 changed files with 10 additions and 11 deletions

View File

@ -14,18 +14,16 @@ public interface UserPostMapper extends BaseMapperX<UserPostDO> {
default List<UserPostDO> selectIdList(Long id) {
return selectList(new LambdaQueryWrapperX<UserPostDO>()
.eq(UserPostDO::getUserId, id)
.select(UserPostDO::getPostId));
.eq(UserPostDO::getUserId, id));
}
default void deleteByUserIdAndPostId(Long userId, Collection<Long> deletePostIds) {
default void deleteByUserIdAndPostId(Long userId, Collection<Long> postIds) {
delete(new LambdaQueryWrapperX<UserPostDO>()
.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>()
.in(UserPostDO::getPostId, postIds));
}

View File

@ -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.permission.PermissionService;
import cn.iocoder.yudao.module.system.service.tenant.TenantService;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.annotations.VisibleForTesting;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
@ -266,7 +265,7 @@ public class AdminUserServiceImpl implements AdminUserService {
if (CollUtil.isEmpty(postIds)) {
return Collections.emptyList();
}
List<Long> userIdList = userPostMapper.selectUserIdByPostIds(postIds)
List<Long> userIdList = userPostMapper.selectListByPostIds(postIds)
.stream()
.map(UserPostDO::getUserId)
.distinct()

View File

@ -156,7 +156,7 @@ CREATE TABLE IF NOT EXISTS `system_user_post`(
"deleted" bit NOT NULL DEFAULT FALSE,
"tenant_id" bigint not null default '0',
PRIMARY KEY (`id`)
) COMMENT ='部门';
) COMMENT ='用户岗位';
CREATE TABLE IF NOT EXISTS "system_notice" (