|
|
@ -21,14 +21,6 @@ import constants.ErrorConstants;
|
|
|
|
import constants.TaskPointIdConstants;
|
|
|
|
import constants.TaskPointIdConstants;
|
|
|
|
import dto.UserLoginDto;
|
|
|
|
import dto.UserLoginDto;
|
|
|
|
import enums.PointEnums;
|
|
|
|
import enums.PointEnums;
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Objects;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import exception.BizException;
|
|
|
|
import exception.BizException;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
@ -41,6 +33,13 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import util.IdWorker;
|
|
|
|
import util.IdWorker;
|
|
|
|
import util.JwtUtil;
|
|
|
|
import util.JwtUtil;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import java.util.Objects;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @program: luoo_parent
|
|
|
|
* @program: luoo_parent
|
|
|
|
* @description: 积分明细
|
|
|
|
* @description: 积分明细
|
|
|
@ -208,6 +207,14 @@ public class UserPointLogService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 对于日常任务,每天只允许完成一次,如果用户已经完成过,则直接返回,不重复添加积分
|
|
|
|
|
|
|
|
if (Objects.equals(type, PointEnums.TASK_TYPE_DAILY.getCode())) {
|
|
|
|
|
|
|
|
// 日常任务,每天只触发一次
|
|
|
|
|
|
|
|
if (userPointLogDao.findTodayByUserIdAndTaskPointId(userPointLog.getUserId(), userPointLog.getTaskPointId()) != null) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
userPointLog.setScore(score);
|
|
|
|
userPointLog.setScore(score);
|
|
|
|
userPointLog.setDescription(description);
|
|
|
|
userPointLog.setDescription(description);
|
|
|
|
|
|
|
|
|
|
|
|