完善了用户登录

This commit is contained in:
chen-xin-zhi 2024-11-04 19:21:17 +08:00
parent 111a482cbd
commit d7f499378d

View File

@ -37,13 +37,12 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
Date endTime = orderQueryRequest.getEndTime();
String sortOrder = orderQueryRequest.getSortOrder();
String sortField = orderQueryRequest.getSortField();
QueryWrapper<Order> queryWrapper = new QueryWrapper<>();
queryWrapper.eq(ObjectUtils.isNotEmpty(userId), "userId", userId);
queryWrapper.ge(ObjectUtils.isNotEmpty(minTotalAmount), "totalAmount", minTotalAmount);
queryWrapper.le(ObjectUtils.isNotEmpty(maxTotalAmount), "totalAmount", maxTotalAmount);
queryWrapper.eq(StringUtils.isNotBlank(orderStatus), "orderStatus", orderStatus);
queryWrapper.between("createTime", startTime, endTime);
queryWrapper.between(startTime != null && endTime != null, "createTime", startTime, endTime);
queryWrapper.eq(StringUtils.isNotBlank(orderNumber), "orderNumber", orderNumber);
queryWrapper.orderBy(SqlUtils.validSortField(sortField), sortOrder.equals(CommonConstant.SORT_ORDER_ASC),
sortField);