|
|
|
@ -129,36 +129,36 @@ public class InvitationService {
|
|
|
|
|
Integer score = 0;
|
|
|
|
|
List<UserPointLog> list = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
|
|
|
|
|
userId, TaskPointIdConstants.NEW_USER_INVITE);
|
|
|
|
|
if (list.size() >= 3 - 1) {
|
|
|
|
|
if (list.size() >= 3) {
|
|
|
|
|
String inviteUserId3 = TaskPointIdConstants.INVITE_USER_3;
|
|
|
|
|
TaskPoint inviteUser3TaskPoint = taskPointDao.findById(inviteUserId3).get();
|
|
|
|
|
// 邀请人数 >= 3人,并且没有获得对应的积分
|
|
|
|
|
List<UserPointLog> userPointLogsByUserIdAndTaskPointId3 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
|
|
|
|
|
TaskPointIdConstants.INVITE_USER_3, userId);
|
|
|
|
|
userId, TaskPointIdConstants.INVITE_USER_3);
|
|
|
|
|
score += doMulInvitation(userId, inviteUser3TaskPoint, userPointLogsByUserIdAndTaskPointId3);
|
|
|
|
|
}
|
|
|
|
|
if (list.size() >= 6 - 1) {
|
|
|
|
|
if (list.size() >= 6) {
|
|
|
|
|
String inviteUserId6 = TaskPointIdConstants.INVITE_USER_6;
|
|
|
|
|
TaskPoint inviteUser6TaskPoint = taskPointDao.findById(inviteUserId6).get();
|
|
|
|
|
// 邀请人数 >= 6人,并且没有获得对应的积分
|
|
|
|
|
List<UserPointLog> userPointLogsByUserIdAndTaskPointId6 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
|
|
|
|
|
TaskPointIdConstants.INVITE_USER_6, userId);
|
|
|
|
|
userId, TaskPointIdConstants.INVITE_USER_6);
|
|
|
|
|
score += doMulInvitation(userId, inviteUser6TaskPoint, userPointLogsByUserIdAndTaskPointId6);
|
|
|
|
|
}
|
|
|
|
|
if (list.size() >= 10 - 1) {
|
|
|
|
|
if (list.size() >= 10) {
|
|
|
|
|
String inviteUserId10 = TaskPointIdConstants.INVITE_USER_10;
|
|
|
|
|
TaskPoint inviteUser10TaskPoint = taskPointDao.findById(inviteUserId10).get();
|
|
|
|
|
// 邀请人数 >= 10人,并且没有获得对应的积分
|
|
|
|
|
List<UserPointLog> userPointLogsByUserIdAndTaskPointId10 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
|
|
|
|
|
TaskPointIdConstants.INVITE_USER_10, userId);
|
|
|
|
|
userId, TaskPointIdConstants.INVITE_USER_10);
|
|
|
|
|
score += doMulInvitation(userId, inviteUser10TaskPoint, userPointLogsByUserIdAndTaskPointId10);
|
|
|
|
|
}
|
|
|
|
|
if (list.size() >= 20 - 1) {
|
|
|
|
|
if (list.size() >= 20) {
|
|
|
|
|
String inviteUserId20 = TaskPointIdConstants.INVITE_USER_20;
|
|
|
|
|
TaskPoint inviteUser20TaskPoint = taskPointDao.findById(inviteUserId20).get();
|
|
|
|
|
// 邀请人数 >= 20人,并且没有获得对应的积分
|
|
|
|
|
List<UserPointLog> userPointLogsByUserIdAndTaskPointId20 = userPointLogDao.findUserPointLogsByUserIdAndTaskPointId(
|
|
|
|
|
TaskPointIdConstants.INVITE_USER_20, userId);
|
|
|
|
|
userId, TaskPointIdConstants.INVITE_USER_20);
|
|
|
|
|
score += doMulInvitation(userId, inviteUser20TaskPoint, userPointLogsByUserIdAndTaskPointId20);
|
|
|
|
|
}
|
|
|
|
|
return score;
|
|
|
|
|