拉黑用户时 记录用户行为
This commit is contained in:
@@ -52,7 +52,7 @@ public class AppUserPrizeExchangeController {
|
||||
@PostMapping("/receive")
|
||||
@ApiOperation("领取满签奖励")
|
||||
public Result receive(@RequestAttribute("userId") Long userId) {
|
||||
userService.addBlackUser(userId);
|
||||
userService.addBlackUser(userId,"领取满签奖励");
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("用户")
|
||||
@@ -132,6 +131,7 @@ public class UserEntity implements Serializable {
|
||||
* 来源 app 小程序 公众号
|
||||
*/
|
||||
@Excel(name = "渠道来源", orderNum = "9")
|
||||
@TableField(select = false)
|
||||
private String platform;
|
||||
|
||||
/**
|
||||
@@ -149,7 +149,7 @@ public class UserEntity implements Serializable {
|
||||
/**
|
||||
* 邀请人邀请码
|
||||
*/
|
||||
@Excel(name = "邀请人邀请码", orderNum = "6",width = 15)
|
||||
@Excel(name = "邀请人邀请码", orderNum = "6", width = 15)
|
||||
@TableField("inviter_code")
|
||||
private String inviterCode;
|
||||
|
||||
|
||||
@@ -241,6 +241,7 @@ public interface UserService extends IService<UserEntity> {
|
||||
|
||||
/**
|
||||
* 封禁拉黑用户
|
||||
* 用户行为
|
||||
*/
|
||||
void addBlackUser(Long userId);
|
||||
void addBlackUser(Long userId,String behavior);
|
||||
}
|
||||
|
||||
@@ -1705,8 +1705,8 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBlackUser(Long userId) {
|
||||
log.info("异常用户id, 异常操作: {}", userId);
|
||||
public void addBlackUser(Long userId,String behavior) {
|
||||
log.info("异常用户id, 异常操作: {},{}", userId,behavior);
|
||||
UserInfo userInfo = userInfoService.getOne(new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getUserId, userId));
|
||||
if (userInfo != null && StrUtil.isNotBlank(userInfo.getCertNo())) {
|
||||
TbUserBlacklist userBlacklist = new TbUserBlacklist();
|
||||
@@ -1716,6 +1716,8 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
||||
}
|
||||
|
||||
update(null, new LambdaUpdateWrapper<UserEntity>().eq(UserEntity::getUserId, userId)
|
||||
.set(UserEntity::getStatus, 0).set(UserEntity::getUpdateTime,DateUtil.now()));
|
||||
.set(UserEntity::getStatus, 0)
|
||||
.set(UserEntity::getPlatform, behavior)
|
||||
.set(UserEntity::getUpdateTime,DateUtil.now()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ public class DiscSpinningController {
|
||||
@RequestMapping("/app/discSpinning/receive")
|
||||
@Login
|
||||
public Result receive(@RequestAttribute("userId") Long userId) {
|
||||
userService.addBlackUser(userId);
|
||||
userService.addBlackUser(userId,"转盘奖项领取");
|
||||
return Result.success().put("data", 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ public class TaskCenterController {
|
||||
@Debounce(value = "#userId,#id")
|
||||
public Result taskReceive(@ApiIgnore @RequestAttribute("userId") Long userId, Long id) {
|
||||
if (id != null && id == 19) {
|
||||
userService.addBlackUser(userId);
|
||||
userService.addBlackUser(userId,"任务中心领取");
|
||||
}
|
||||
return taskCenterService.taskReceive(userId, id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user