拉黑移除

This commit is contained in:
wangw 2025-08-19 16:12:08 +08:00
parent c717c044c5
commit 567de94535
2 changed files with 6 additions and 11 deletions

View File

@ -1746,14 +1746,12 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
@Override @Override
public void addBlackUser(Long userId, String behavior) { public void addBlackUser(Long userId, String behavior) {
log.info("异常用户id, 异常操作: {},{}", userId, behavior); log.info("异常用户id, 异常操作: {},{}", userId, behavior);
if(!"恶意抽奖".equals(behavior)){ UserInfo userInfo = userInfoService.getOne(new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, userId));
UserInfo userInfo = userInfoService.getOne(new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, userId)); if (userInfo != null && StrUtil.isNotBlank(userInfo.getCertNo())) {
if (userInfo != null && StrUtil.isNotBlank(userInfo.getCertNo())) { TbUserBlacklist userBlacklist = new TbUserBlacklist();
TbUserBlacklist userBlacklist = new TbUserBlacklist(); userBlacklist.setRealName(userInfo.getCertName());
userBlacklist.setRealName(userInfo.getCertName()); userBlacklist.setIdCardNo(userInfo.getCertNo());
userBlacklist.setIdCardNo(userInfo.getCertNo()); tbUserBlacklistMapper.insert(userBlacklist);
tbUserBlacklistMapper.insert(userBlacklist);
}
} }
update(null, new LambdaUpdateWrapper<UserEntity>().eq(UserEntity::getUserId, userId) update(null, new LambdaUpdateWrapper<UserEntity>().eq(UserEntity::getUserId, userId)

View File

@ -304,9 +304,6 @@ public class DiscSpinningController {
throw e; throw e;
} catch (SqxException e) { } catch (SqxException e) {
ret.put("msg", e.getMsg()); ret.put("msg", e.getMsg());
} catch (DuplicateKeyException e){
userService.addBlackUser(userId,"恶意抽奖");
ret.put("msg", "请求失败,请联系管理员。");
} catch (Exception e) { } catch (Exception e) {
log.error("抽奖异常", e); log.error("抽奖异常", e);
ret.put("msg", "请求失败,请联系管理员"); ret.put("msg", "请求失败,请联系管理员");