This commit is contained in:
dute7liang
2024-01-25 21:21:20 +08:00
parent 13fa059d02
commit 78e381be13
8 changed files with 16 additions and 15 deletions

View File

@@ -8,6 +8,7 @@ import com.ruoyi.cai.dto.app.vo.user.UserListVo;
import com.ruoyi.cai.mapper.UserBlacklistMapper;
import com.ruoyi.cai.service.UserBlacklistService;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.exception.ServiceException;
import org.springframework.stereotype.Service;
/**
@@ -29,7 +30,7 @@ public class UserBlacklistServiceImpl extends ServiceImpl<UserBlacklistMapper, U
@Override
public boolean black(Long userId, Long blackUserId,Integer actionType) {
if(userId.equals(blackUserId)){
throw new SecurityException("不能对自己操作哦");
throw new ServiceException("不能对自己操作哦");
}
if(actionType == 1){ // 拉黑
UserBlacklist userBlacklist = new UserBlacklist();