拉黑移除
This commit is contained in:
parent
c717c044c5
commit
567de94535
|
|
@ -1746,14 +1746,12 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||
@Override
|
||||
public void addBlackUser(Long userId, String behavior) {
|
||||
log.info("异常用户id, 异常操作: {},{}", userId, behavior);
|
||||
if(!"恶意抽奖".equals(behavior)){
|
||||
UserInfo userInfo = userInfoService.getOne(new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, userId));
|
||||
if (userInfo != null && StrUtil.isNotBlank(userInfo.getCertNo())) {
|
||||
TbUserBlacklist userBlacklist = new TbUserBlacklist();
|
||||
userBlacklist.setRealName(userInfo.getCertName());
|
||||
userBlacklist.setIdCardNo(userInfo.getCertNo());
|
||||
tbUserBlacklistMapper.insert(userBlacklist);
|
||||
}
|
||||
UserInfo userInfo = userInfoService.getOne(new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, userId));
|
||||
if (userInfo != null && StrUtil.isNotBlank(userInfo.getCertNo())) {
|
||||
TbUserBlacklist userBlacklist = new TbUserBlacklist();
|
||||
userBlacklist.setRealName(userInfo.getCertName());
|
||||
userBlacklist.setIdCardNo(userInfo.getCertNo());
|
||||
tbUserBlacklistMapper.insert(userBlacklist);
|
||||
}
|
||||
|
||||
update(null, new LambdaUpdateWrapper<UserEntity>().eq(UserEntity::getUserId, userId)
|
||||
|
|
|
|||
|
|
@ -304,9 +304,6 @@ public class DiscSpinningController {
|
|||
throw e;
|
||||
} catch (SqxException e) {
|
||||
ret.put("msg", e.getMsg());
|
||||
} catch (DuplicateKeyException e){
|
||||
userService.addBlackUser(userId,"恶意抽奖");
|
||||
ret.put("msg", "请求失败,请联系管理员。");
|
||||
} catch (Exception e) {
|
||||
log.error("抽奖异常", e);
|
||||
ret.put("msg", "请求失败,请联系管理员");
|
||||
|
|
|
|||
Loading…
Reference in New Issue