Compare commits

..

No commits in common. 'f1bcd8c3cab075e4429b7a7d06885de9e4777b05' and '48bb3bb8415b2e7fb5a195c70e7651c6e57095c5' have entirely different histories.

@ -168,6 +168,21 @@ public class MyController extends BaseController {
}
}
Integer point = 0;
// 信息是否已完善
if (StringUtils.isNotBlank(userInfoUpdateDto.getBirthDay())
&& StringUtils.isNotBlank(userInfoUpdateDto.getNickName())
&& !Objects.isNull(userInfoUpdateDto.getSex())
&& StringUtils.isNotBlank(userInfoUpdateDto.getBirthDay())
) {
point = userPointLogService.addByTaskNew(TaskPointIdConstants.MODIFY_INFORMATION, authorization);
}
if (StringUtils.isNotBlank(userInfoUpdateDto.getInvitationCode()) && StringUtils.isBlank(user.getInvitationUserId())) {
// 只有没有被邀请过的才会触发,再次修改无效
userInfoService.bindInvitationCode(user, userInfoUpdateDto.getInvitationCode());
}
if (!StringTools.isEmpty(nickName)) {
user.setNickName(nickName);
rabbitTemplate.convertAndSend("userInfoCommentCache", userLoginDto.getUserId());
@ -186,25 +201,9 @@ public class MyController extends BaseController {
if (null != userInfoUpdateDto.getSex()) {
user.setSex(userInfoUpdateDto.getSex());
}
user.setModifyTime(new Date());
userInfoService.update(user);
Integer point = 0;
// 信息是否已完善
if (user.getBirthday() != null
&& StringUtils.isNotBlank(user.getNickName())
&& !Objects.isNull(user.getSex())
&& StringUtils.isNotBlank(user.getSignature())
) {
point = userPointLogService.addByTaskNew(TaskPointIdConstants.MODIFY_INFORMATION, authorization);
}
if (StringUtils.isNotBlank(userInfoUpdateDto.getInvitationCode()) && StringUtils.isBlank(user.getInvitationUserId())) {
// 只有没有被邀请过的才会触发,再次修改无效
userInfoService.bindInvitationCode(user, userInfoUpdateDto.getInvitationCode());
}
return Result.success(point > 0 ? "更新成功,获得" + point + "积分" : "更新成功");
}

@ -2,13 +2,22 @@ package com.luoo.user.service;
import api.PageResult;
import client.vo.SimpleUser;
import com.luoo.user.dao.*;
import com.luoo.user.dao.UserBankDao;
import com.luoo.user.dao.UserInfoDao;
import com.luoo.user.dao.UserPointLogDao;
import com.luoo.user.dao.UserRealNameDao;
import com.luoo.user.dao.WithdrawDao;
import com.luoo.user.dto.UserInfoUpdateDto;
import com.luoo.user.dto.UserQueryReq;
import com.luoo.user.dto.UserRealNameCheckDto;
import com.luoo.user.dto.UserRealNameFormDto;
import com.luoo.user.dto.bank.UserBankAddDto;
import com.luoo.user.dto.request.LoginReq;
import com.luoo.user.pojo.*;
import com.luoo.user.pojo.UserBank;
import com.luoo.user.pojo.UserInfo;
import com.luoo.user.pojo.UserPointLog;
import com.luoo.user.pojo.UserRealName;
import com.luoo.user.pojo.Withdraw;
import com.luoo.user.util.NickNameUtil;
import com.luoo.user.util.NickNameUtil2;
import constants.Constants;
@ -22,6 +31,7 @@ import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
@ -293,22 +303,22 @@ public class UserInfoService {
userInfoDaoByInvitationCode.getId());
userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.NEW_USER_INVITE,
userInfo.getId());
}
List<UserPointLog> list = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
userInfoDaoByInvitationCode.getId(), TaskPointIdConstants.NEW_USER_INVITE);
if (list.size() == 3) {
userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.INVITE_USER_3,
userInfoDaoByInvitationCode.getId());
} else if (list.size() == 6) {
userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.INVITE_USER_6,
userInfoDaoByInvitationCode.getId());
} else if (list.size() == 10) {
userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.INVITE_USER_10,
userInfoDaoByInvitationCode.getId());
} else if (list.size() == 20) {
userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.INVITE_USER_20,
userInfoDaoByInvitationCode.getId());
}
List<UserPointLog> list = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
userInfoDaoByInvitationCode.getId(), TaskPointIdConstants.NEW_USER_INVITE);
if (list.size() == 3) {
userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.INVITE_USER_3,
userInfoDaoByInvitationCode.getId());
} else if (list.size() == 6) {
userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.INVITE_USER_6,
userInfoDaoByInvitationCode.getId());
} else if (list.size() == 10) {
userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.INVITE_USER_10,
userInfoDaoByInvitationCode.getId());
} else if (list.size() == 20) {
userPointLogService.addByTaskDailyAndUserId(TaskPointIdConstants.INVITE_USER_20,
userInfoDaoByInvitationCode.getId());
}
}

Loading…
Cancel
Save