处理微信小程序查不到预约单问题

This commit is contained in:
andy 2025-04-19 08:51:08 +08:00
parent 3ad1d4f7e9
commit 9b5b0bdb41

View File

@ -40,8 +40,6 @@ import com.evotech.hd.common.core.utils.CommonUtil;
import com.evotech.hd.common.redis.utils.RedisUtil;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
@ -181,10 +179,10 @@ public class OrderSwapBatteryServiceImpl implements OrderSwapBatteryService {
.eq(plsopr.getStatus() != null, OrderSwapBatteryPre::getStatus, plsopr.getStatus())
.eq(StringUtils.hasText(plsopr.getPlateNum()), OrderSwapBatteryPre::getPlateNum, plsopr.getPlateNum())
.eq(StringUtils.hasText(plsopr.getStationCode()), OrderSwapBatteryPre::getStationCode, plsopr.getStationCode())
.apply(StringUtils.hasText(plsopr.getSwapDayBegin()), "DATE_FORMAT(swap_day,'%Y-%m-%d') >={0}", DateFormatUtils.format(DateUtils.parseDate(plsopr.getSwapDayBegin(),"yyyyMMdd","yyyy-MM-dd"), "yyyy-MM-dd"))
.apply(StringUtils.hasText(plsopr.getSwapDayEnd()), "DATE_FORMAT(swap_day,'%Y-%m-%d') <={0}", DateFormatUtils.format(DateUtils.parseDate(plsopr.getSwapDayEnd(),"yyyyMMdd","yyyy-MM-dd"), "yyyy-MM-dd"))
// .ge(StringUtils.hasText(plsopr.getSwapDayBegin()), OrderSwapBatteryPre::getSwapDay, plsopr.getSwapDayBegin())
// .le(StringUtils.hasText(plsopr.getSwapDayEnd()), OrderSwapBatteryPre::getSwapDay, plsopr.getSwapDayEnd())
// .apply(StringUtils.hasText(plsopr.getSwapDayBegin()), "DATE_FORMAT(swap_day,'%Y-%m-%d') >={0}", DateFormatUtils.format(DateUtils.parseDate(plsopr.getSwapDayBegin(),"yyyyMMdd","yyyy-MM-dd"), "yyyy-MM-dd"))
// .apply(StringUtils.hasText(plsopr.getSwapDayEnd()), "DATE_FORMAT(swap_day,'%Y-%m-%d') <={0}", DateFormatUtils.format(DateUtils.parseDate(plsopr.getSwapDayEnd(),"yyyyMMdd","yyyy-MM-dd"), "yyyy-MM-dd"))
.ge(StringUtils.hasText(plsopr.getSwapDayBegin()), OrderSwapBatteryPre::getSwapDay, plsopr.getSwapDayBegin())
.le(StringUtils.hasText(plsopr.getSwapDayEnd()), OrderSwapBatteryPre::getSwapDay, plsopr.getSwapDayEnd())
.orderByDesc(OrderSwapBatteryPre::getPkId));
if (page.getRecords().isEmpty()) {
return new Result<List<OrderSwapBatteryPre>>().error(CodeMsg.DATABASE_RESULT_NULL);