|
|
|
@ -343,8 +343,10 @@ public class UserPointLogService {
|
|
|
|
|
UserPointLogSearchDto userPointLogSearchDto, Integer page,
|
|
|
|
|
Integer size) {
|
|
|
|
|
|
|
|
|
|
UserLoginDto userLoginDto = jwtUtil.getUser();
|
|
|
|
|
userPointLogSearchDto.setUserId(userLoginDto.getUserId());
|
|
|
|
|
if (token != null) {
|
|
|
|
|
UserLoginDto userLoginDto = jwtUtil.getUserLoginDto(token);
|
|
|
|
|
userPointLogSearchDto.setUserId(userLoginDto.getUserId());
|
|
|
|
|
}
|
|
|
|
|
BooleanBuilder booleanBuilder = new BooleanBuilder();
|
|
|
|
|
QUserPointLog qUserPointLog = QUserPointLog.userPointLog;
|
|
|
|
|
checkCondition(booleanBuilder, qUserPointLog, userPointLogSearchDto);
|
|
|
|
@ -382,13 +384,13 @@ public class UserPointLogService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void checkCondition(BooleanBuilder booleanBuilder, QUserPointLog qUserPointLog, UserPointLogSearchDto userPointLogSearchDto) {
|
|
|
|
|
if (!StringUtils.isEmpty(userPointLogSearchDto.getUserId())) {
|
|
|
|
|
if (StringUtils.isNotBlank(userPointLogSearchDto.getUserId())) {
|
|
|
|
|
booleanBuilder.and(qUserPointLog.createUser.eq(userPointLogSearchDto.getUserId()));
|
|
|
|
|
}
|
|
|
|
|
if (userPointLogSearchDto.getType() != null) {
|
|
|
|
|
booleanBuilder.and(qUserPointLog.type.eq(userPointLogSearchDto.getType()));
|
|
|
|
|
}
|
|
|
|
|
if (!StringUtils.isEmpty(userPointLogSearchDto.getCreateMonth())) {
|
|
|
|
|
if (StringUtils.isNotBlank(userPointLogSearchDto.getCreateMonth())) {
|
|
|
|
|
// 判断userPointLogSearchDto.getCreateMonth() 是否是当月时间
|
|
|
|
|
LocalDate now = LocalDate.now();
|
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMM");
|
|
|
|
|