Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
a8dcde7b52
|
|
@ -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,189 +17,189 @@ import java.math.BigDecimal;
|
|||
|
||||
/**
|
||||
* 用户
|
||||
*
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("用户")
|
||||
@TableName("tb_user")
|
||||
public class UserEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Excel(name = "用户id", orderNum = "1")
|
||||
@ApiModelProperty("用户id")
|
||||
@TableId(type = IdType.ID_WORKER)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@Excel(name = "用户昵称", orderNum = "2")
|
||||
@ApiModelProperty("用户名")
|
||||
@TableField("user_name")
|
||||
private String userName;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Excel(name = "用户id", orderNum = "1")
|
||||
@ApiModelProperty("用户id")
|
||||
@TableId(type = IdType.ID_WORKER)
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@Excel(name = "用户昵称", orderNum = "2")
|
||||
@ApiModelProperty("用户名")
|
||||
@TableField("user_name")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@Excel(name = "手机号", orderNum = "4")
|
||||
@ApiModelProperty("手机号")
|
||||
private String phone;
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@Excel(name = "手机号", orderNum = "4")
|
||||
@ApiModelProperty("手机号")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@Excel(name = "头像", orderNum = "3")
|
||||
@ApiModelProperty("头像")
|
||||
private String avatar;
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@Excel(name = "头像", orderNum = "3")
|
||||
@ApiModelProperty("头像")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 性别 1男 2女
|
||||
*/
|
||||
@ApiModelProperty("性别 1男 2女")
|
||||
private Integer sex;
|
||||
/**
|
||||
* 性别 1男 2女
|
||||
*/
|
||||
@ApiModelProperty("性别 1男 2女")
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 微信小程序openid
|
||||
*/
|
||||
@ApiModelProperty("微信小程序openid")
|
||||
@TableField("open_id")
|
||||
private String openId;
|
||||
/**
|
||||
* 微信小程序openid
|
||||
*/
|
||||
@ApiModelProperty("微信小程序openid")
|
||||
@TableField("open_id")
|
||||
private String openId;
|
||||
|
||||
/**
|
||||
* 微信小程序openid
|
||||
*/
|
||||
@ApiModelProperty("微信公众号openid")
|
||||
@TableField("wx_id")
|
||||
private String wxId;
|
||||
/**
|
||||
* 微信小程序openid
|
||||
*/
|
||||
@ApiModelProperty("微信公众号openid")
|
||||
@TableField("wx_id")
|
||||
private String wxId;
|
||||
|
||||
/**
|
||||
* 微信app openid
|
||||
*/
|
||||
@ApiModelProperty("微信app openid")
|
||||
@TableField("wx_open_id")
|
||||
private String wxOpenId;
|
||||
/**
|
||||
* 微信app openid
|
||||
*/
|
||||
@ApiModelProperty("微信app openid")
|
||||
@TableField("wx_open_id")
|
||||
private String wxOpenId;
|
||||
|
||||
/**
|
||||
* 抖音小程序openId
|
||||
*/
|
||||
private String dyOpenId;
|
||||
/**
|
||||
* 抖音小程序openId
|
||||
*/
|
||||
private String dyOpenId;
|
||||
|
||||
/**
|
||||
* 快手小程序openId
|
||||
*/
|
||||
private String ksOpenId;
|
||||
/**
|
||||
* 快手小程序openId
|
||||
*/
|
||||
private String ksOpenId;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间", orderNum = "13", width = 18)
|
||||
@TableField("create_time")
|
||||
private String createTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间", orderNum = "13", width = 18)
|
||||
@TableField("create_time")
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private String updateTime;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private String updateTime;
|
||||
|
||||
/**
|
||||
* 苹果id
|
||||
*/
|
||||
@TableField("apple_id")
|
||||
private String appleId;
|
||||
/**
|
||||
* 苹果id
|
||||
*/
|
||||
@TableField("apple_id")
|
||||
private String appleId;
|
||||
|
||||
/**
|
||||
* 手机类型 1安卓 2ios
|
||||
*/
|
||||
@TableField("sys_phone")
|
||||
private Integer sysPhone;
|
||||
/**
|
||||
* 手机类型 1安卓 2ios
|
||||
*/
|
||||
@TableField("sys_phone")
|
||||
private Integer sysPhone;
|
||||
|
||||
/**
|
||||
* 状态 1正常 2禁用
|
||||
*/
|
||||
@Excel(name = "状态", orderNum = "13", replace = {"正常_1", "禁用_1"})
|
||||
private Integer status;
|
||||
/**
|
||||
* 状态 1正常 2禁用
|
||||
*/
|
||||
@Excel(name = "状态", orderNum = "13", replace = {"正常_1", "禁用_1"})
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 来源 app 小程序 公众号
|
||||
*/
|
||||
@Excel(name = "渠道来源", orderNum = "9")
|
||||
private String platform;
|
||||
/**
|
||||
* 来源 app 小程序 公众号
|
||||
*/
|
||||
@Excel(name = "渠道来源", orderNum = "9")
|
||||
@TableField(select = false)
|
||||
private String platform;
|
||||
|
||||
/**
|
||||
* 积分
|
||||
*/
|
||||
private Integer jifen;
|
||||
/**
|
||||
* 积分
|
||||
*/
|
||||
private Integer jifen;
|
||||
|
||||
/**
|
||||
* 邀请码
|
||||
*/
|
||||
@Excel(name = "邀请码", orderNum = "5")
|
||||
@TableField("invitation_code")
|
||||
private String invitationCode;
|
||||
/**
|
||||
* 邀请码
|
||||
*/
|
||||
@Excel(name = "邀请码", orderNum = "5")
|
||||
@TableField("invitation_code")
|
||||
private String invitationCode;
|
||||
|
||||
/**
|
||||
* 邀请人邀请码
|
||||
*/
|
||||
@Excel(name = "邀请人邀请码", orderNum = "6",width = 15)
|
||||
@TableField("inviter_code")
|
||||
private String inviterCode;
|
||||
/**
|
||||
* 邀请人邀请码
|
||||
*/
|
||||
@Excel(name = "邀请人邀请码", orderNum = "6", width = 15)
|
||||
@TableField("inviter_code")
|
||||
private String inviterCode;
|
||||
|
||||
private String clientid;
|
||||
private String clientid;
|
||||
|
||||
@Excel(name = "支付宝账号", orderNum = "8", width = 18)
|
||||
private String zhiFuBao;
|
||||
@Excel(name = "支付宝账号", orderNum = "8", width = 18)
|
||||
private String zhiFuBao;
|
||||
|
||||
@Excel(name = "支付宝名称", orderNum = "8", width = 18)
|
||||
@TableField("zhi_fu_bao_name")
|
||||
private String zhiFuBaoName;
|
||||
@Excel(name = "支付宝名称", orderNum = "8", width = 18)
|
||||
@TableField("zhi_fu_bao_name")
|
||||
private String zhiFuBaoName;
|
||||
|
||||
@Excel(name = "一级推广收益比例", orderNum = "8", width = 18)
|
||||
private BigDecimal rate;
|
||||
@Excel(name = "一级推广收益比例", orderNum = "8", width = 18)
|
||||
private BigDecimal rate;
|
||||
|
||||
@Excel(name = "二级推广收益比例", orderNum = "8", width = 18)
|
||||
private BigDecimal twoRate;
|
||||
@Excel(name = "二级推广收益比例", orderNum = "8", width = 18)
|
||||
private BigDecimal twoRate;
|
||||
|
||||
/**
|
||||
* 最后一次在线时间
|
||||
*/
|
||||
private String onLineTime;
|
||||
/**
|
||||
* 最后一次在线时间
|
||||
*/
|
||||
private String onLineTime;
|
||||
|
||||
/**
|
||||
* 渠道码
|
||||
*/
|
||||
private String qdCode;
|
||||
/**
|
||||
* 渠道码
|
||||
*/
|
||||
private String qdCode;
|
||||
|
||||
/**
|
||||
* 是否是新用户 1否
|
||||
*/
|
||||
private Integer isNewUser;
|
||||
/**
|
||||
* 是否是新用户 1否
|
||||
*/
|
||||
private Integer isNewUser;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String sysUserName;
|
||||
@TableField(exist = false)
|
||||
private String sysUserName;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer member;
|
||||
@TableField(exist = false)
|
||||
private Integer member;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer counts;
|
||||
@TableField(exist = false)
|
||||
private Integer counts;
|
||||
|
||||
@TableField(exist = false)
|
||||
private BigDecimal money;
|
||||
@TableField(exist = false)
|
||||
private BigDecimal money;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String endTime;
|
||||
@TableField(exist = false)
|
||||
private String endTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Integer vipType;
|
||||
@TableField(exist = false)
|
||||
private Integer vipType;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.sqx.modules.app.interceptor;
|
||||
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
|
@ -94,9 +95,7 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
|
|||
log.warn("用户地址跳动频繁,封禁: {}", userId);
|
||||
if (!redisService.isSetUserState(userId)) {
|
||||
ThreadUtil.execAsync(() -> {
|
||||
userService.update(null, new LambdaUpdateWrapper<UserEntity>()
|
||||
.eq(UserEntity::getUserId, userId)
|
||||
.set(UserEntity::getStatus, 0));
|
||||
userService.addBlackUser(userId,"IP频繁跳动");
|
||||
});
|
||||
}
|
||||
throw new CzgException("ip跳动过于频繁,请联系管理员解封");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue