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