Merge remote-tracking branch 'refs/remotes/yudao/develop' into develop

This commit is contained in:
puhui999
2024-07-22 15:41:54 +08:00
276 changed files with 25094 additions and 1886 deletions

View File

@ -38,7 +38,7 @@ public class MemberUserBaseVO {
private String name;
@Schema(description = "用户性别", example = "1")
private Byte sex;
private Integer sex;
@Schema(description = "所在地编号", example = "4371")
private Long areaId;

View File

@ -88,6 +88,12 @@ public class MemberAuthServiceImpl implements MemberAuthService {
MemberUserDO user = userService.createUserIfAbsent(reqVO.getMobile(), userIp, getTerminal());
Assert.notNull(user, "获取用户失败,结果为空");
// 校验是否禁用
if (CommonStatusEnum.isDisable(user.getStatus())) {
createLoginLog(user.getId(), reqVO.getMobile(), LoginLogTypeEnum.LOGIN_SMS, LoginResultEnum.USER_DISABLED);
throw exception(AUTH_LOGIN_USER_DISABLED);
}
// 如果 socialType 非空,说明需要绑定社交用户
String openid = null;
if (reqVO.getSocialType() != null) {
@ -177,7 +183,7 @@ public class MemberAuthServiceImpl implements MemberAuthService {
throw exception(AUTH_LOGIN_BAD_CREDENTIALS);
}
// 校验是否禁用
if (ObjectUtil.notEqual(user.getStatus(), CommonStatusEnum.ENABLE.getStatus())) {
if (CommonStatusEnum.isDisable(user.getStatus())) {
createLoginLog(user.getId(), mobile, logTypeEnum, LoginResultEnum.USER_DISABLED);
throw exception(AUTH_LOGIN_USER_DISABLED);
}

View File

@ -75,11 +75,12 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService
}
summary.setTodaySignIn(DateUtils.isToday(lastRecord.getCreateTime()));
// 4.1 校验今天是否签到,没有签到则直接返回
if (!summary.getTodaySignIn()) {
// 4.1 检查今天是否签到且记录不是昨天创建的,如果是则直接返回
if (!summary.getTodaySignIn() && !DateUtils.isYesterday(lastRecord.getCreateTime())) {
return summary;
}
// 4.2 连续签到天数
// 4.2 要么是今天签到了,要么是昨天的记录,设置连续签到天数
summary.setContinuousDay(lastRecord.getDay());
return summary;
}