拉黑用户时 记录用户行为
This commit is contained in:
@@ -52,7 +52,7 @@ public class AppUserPrizeExchangeController {
|
|||||||
@PostMapping("/receive")
|
@PostMapping("/receive")
|
||||||
@ApiOperation("领取满签奖励")
|
@ApiOperation("领取满签奖励")
|
||||||
public Result receive(@RequestAttribute("userId") Long userId) {
|
public Result receive(@RequestAttribute("userId") Long userId) {
|
||||||
userService.addBlackUser(userId);
|
userService.addBlackUser(userId,"领取满签奖励");
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,189 +17,189 @@ import java.math.BigDecimal;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户
|
* 用户
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@ApiModel("用户")
|
@ApiModel("用户")
|
||||||
@TableName("tb_user")
|
@TableName("tb_user")
|
||||||
public class UserEntity implements Serializable {
|
public class UserEntity implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户ID
|
* 用户ID
|
||||||
*/
|
*/
|
||||||
@Excel(name = "用户id", orderNum = "1")
|
@Excel(name = "用户id", orderNum = "1")
|
||||||
@ApiModelProperty("用户id")
|
@ApiModelProperty("用户id")
|
||||||
@TableId(type = IdType.ID_WORKER)
|
@TableId(type = IdType.ID_WORKER)
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long userId;
|
private Long userId;
|
||||||
/**
|
/**
|
||||||
* 用户名
|
* 用户名
|
||||||
*/
|
*/
|
||||||
@Excel(name = "用户昵称", orderNum = "2")
|
@Excel(name = "用户昵称", orderNum = "2")
|
||||||
@ApiModelProperty("用户名")
|
@ApiModelProperty("用户名")
|
||||||
@TableField("user_name")
|
@TableField("user_name")
|
||||||
private String userName;
|
private String userName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手机号
|
* 手机号
|
||||||
*/
|
*/
|
||||||
@Excel(name = "手机号", orderNum = "4")
|
@Excel(name = "手机号", orderNum = "4")
|
||||||
@ApiModelProperty("手机号")
|
@ApiModelProperty("手机号")
|
||||||
private String phone;
|
private String phone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 头像
|
* 头像
|
||||||
*/
|
*/
|
||||||
@Excel(name = "头像", orderNum = "3")
|
@Excel(name = "头像", orderNum = "3")
|
||||||
@ApiModelProperty("头像")
|
@ApiModelProperty("头像")
|
||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 性别 1男 2女
|
* 性别 1男 2女
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("性别 1男 2女")
|
@ApiModelProperty("性别 1男 2女")
|
||||||
private Integer sex;
|
private Integer sex;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信小程序openid
|
* 微信小程序openid
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("微信小程序openid")
|
@ApiModelProperty("微信小程序openid")
|
||||||
@TableField("open_id")
|
@TableField("open_id")
|
||||||
private String openId;
|
private String openId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信小程序openid
|
* 微信小程序openid
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("微信公众号openid")
|
@ApiModelProperty("微信公众号openid")
|
||||||
@TableField("wx_id")
|
@TableField("wx_id")
|
||||||
private String wxId;
|
private String wxId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信app openid
|
* 微信app openid
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty("微信app openid")
|
@ApiModelProperty("微信app openid")
|
||||||
@TableField("wx_open_id")
|
@TableField("wx_open_id")
|
||||||
private String wxOpenId;
|
private String wxOpenId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 抖音小程序openId
|
* 抖音小程序openId
|
||||||
*/
|
*/
|
||||||
private String dyOpenId;
|
private String dyOpenId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 快手小程序openId
|
* 快手小程序openId
|
||||||
*/
|
*/
|
||||||
private String ksOpenId;
|
private String ksOpenId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 密码
|
* 密码
|
||||||
*/
|
*/
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
@Excel(name = "创建时间", orderNum = "13", width = 18)
|
@Excel(name = "创建时间", orderNum = "13", width = 18)
|
||||||
@TableField("create_time")
|
@TableField("create_time")
|
||||||
private String createTime;
|
private String createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*/
|
*/
|
||||||
@TableField("update_time")
|
@TableField("update_time")
|
||||||
private String updateTime;
|
private String updateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 苹果id
|
* 苹果id
|
||||||
*/
|
*/
|
||||||
@TableField("apple_id")
|
@TableField("apple_id")
|
||||||
private String appleId;
|
private String appleId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手机类型 1安卓 2ios
|
* 手机类型 1安卓 2ios
|
||||||
*/
|
*/
|
||||||
@TableField("sys_phone")
|
@TableField("sys_phone")
|
||||||
private Integer sysPhone;
|
private Integer sysPhone;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态 1正常 2禁用
|
* 状态 1正常 2禁用
|
||||||
*/
|
*/
|
||||||
@Excel(name = "状态", orderNum = "13", replace = {"正常_1", "禁用_1"})
|
@Excel(name = "状态", orderNum = "13", replace = {"正常_1", "禁用_1"})
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 来源 app 小程序 公众号
|
* 来源 app 小程序 公众号
|
||||||
*/
|
*/
|
||||||
@Excel(name = "渠道来源", orderNum = "9")
|
@Excel(name = "渠道来源", orderNum = "9")
|
||||||
private String platform;
|
@TableField(select = false)
|
||||||
|
private String platform;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 积分
|
* 积分
|
||||||
*/
|
*/
|
||||||
private Integer jifen;
|
private Integer jifen;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邀请码
|
* 邀请码
|
||||||
*/
|
*/
|
||||||
@Excel(name = "邀请码", orderNum = "5")
|
@Excel(name = "邀请码", orderNum = "5")
|
||||||
@TableField("invitation_code")
|
@TableField("invitation_code")
|
||||||
private String invitationCode;
|
private String invitationCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邀请人邀请码
|
* 邀请人邀请码
|
||||||
*/
|
*/
|
||||||
@Excel(name = "邀请人邀请码", orderNum = "6",width = 15)
|
@Excel(name = "邀请人邀请码", orderNum = "6", width = 15)
|
||||||
@TableField("inviter_code")
|
@TableField("inviter_code")
|
||||||
private String inviterCode;
|
private String inviterCode;
|
||||||
|
|
||||||
private String clientid;
|
private String clientid;
|
||||||
|
|
||||||
@Excel(name = "支付宝账号", orderNum = "8", width = 18)
|
@Excel(name = "支付宝账号", orderNum = "8", width = 18)
|
||||||
private String zhiFuBao;
|
private String zhiFuBao;
|
||||||
|
|
||||||
@Excel(name = "支付宝名称", orderNum = "8", width = 18)
|
@Excel(name = "支付宝名称", orderNum = "8", width = 18)
|
||||||
@TableField("zhi_fu_bao_name")
|
@TableField("zhi_fu_bao_name")
|
||||||
private String zhiFuBaoName;
|
private String zhiFuBaoName;
|
||||||
|
|
||||||
@Excel(name = "一级推广收益比例", orderNum = "8", width = 18)
|
@Excel(name = "一级推广收益比例", orderNum = "8", width = 18)
|
||||||
private BigDecimal rate;
|
private BigDecimal rate;
|
||||||
|
|
||||||
@Excel(name = "二级推广收益比例", orderNum = "8", width = 18)
|
@Excel(name = "二级推广收益比例", orderNum = "8", width = 18)
|
||||||
private BigDecimal twoRate;
|
private BigDecimal twoRate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最后一次在线时间
|
* 最后一次在线时间
|
||||||
*/
|
*/
|
||||||
private String onLineTime;
|
private String onLineTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 渠道码
|
* 渠道码
|
||||||
*/
|
*/
|
||||||
private String qdCode;
|
private String qdCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否是新用户 1否
|
* 是否是新用户 1否
|
||||||
*/
|
*/
|
||||||
private Integer isNewUser;
|
private Integer isNewUser;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String sysUserName;
|
private String sysUserName;
|
||||||
|
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer member;
|
private Integer member;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer counts;
|
private Integer counts;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private BigDecimal money;
|
private BigDecimal money;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String endTime;
|
private String endTime;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer vipType;
|
private Integer vipType;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
@Override
|
||||||
public void addBlackUser(Long userId) {
|
public void addBlackUser(Long userId,String behavior) {
|
||||||
log.info("异常用户id, 异常操作: {}", userId);
|
log.info("异常用户id, 异常操作: {},{}", userId,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();
|
||||||
@@ -1716,6 +1716,8 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
update(null, new LambdaUpdateWrapper<UserEntity>().eq(UserEntity::getUserId, userId)
|
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")
|
@RequestMapping("/app/discSpinning/receive")
|
||||||
@Login
|
@Login
|
||||||
public Result receive(@RequestAttribute("userId") Long userId) {
|
public Result receive(@RequestAttribute("userId") Long userId) {
|
||||||
userService.addBlackUser(userId);
|
userService.addBlackUser(userId,"转盘奖项领取");
|
||||||
return Result.success().put("data", 1);
|
return Result.success().put("data", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class TaskCenterController {
|
|||||||
@Debounce(value = "#userId,#id")
|
@Debounce(value = "#userId,#id")
|
||||||
public Result taskReceive(@ApiIgnore @RequestAttribute("userId") Long userId, Long id) {
|
public Result taskReceive(@ApiIgnore @RequestAttribute("userId") Long userId, Long id) {
|
||||||
if (id != null && id == 19) {
|
if (id != null && id == 19) {
|
||||||
userService.addBlackUser(userId);
|
userService.addBlackUser(userId,"任务中心领取");
|
||||||
}
|
}
|
||||||
return taskCenterService.taskReceive(userId, id);
|
return taskCenterService.taskReceive(userId, id);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user