|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.iflytop.gd.infrastructure.repository.service; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.iflytop.gd.common.enums.FixedUser; |
|
|
|
import com.iflytop.gd.infrastructure.repository.mapper.UserMapper; |
|
|
|
import com.iflytop.gd.infrastructure.repository.entity.User; |
|
|
|
import lombok.Getter; |
|
|
@ -25,8 +26,14 @@ public class UserService extends ServiceImpl<UserMapper, User> { |
|
|
|
public boolean deleteUser(String idsStr) { |
|
|
|
List<Long> ids = Arrays.stream(idsStr.split(",")) |
|
|
|
.map(Long::parseLong) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
return this.removeByIds(ids); |
|
|
|
.toList(); |
|
|
|
for (Long id : ids) { |
|
|
|
User user = this.getById(id); |
|
|
|
if (user != null && user.getFixedUser() != FixedUser.ENABLE) { |
|
|
|
return this.removeById(id); |
|
|
|
} |
|
|
|
} |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
public void clearCurrentUser() { |
|
|
|