cloudroam
2024-10-12 ef4f769a35eda2e8631b0376f35899e69a13d87f
fix:时间查询优化
已修改3个文件
20 ■■■■ 文件已修改
src/main/java/com/mzl/flower/dto/response/report/SupplierReportCalendarBO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/mzl/flower/service/impl/report/OrderReportServiceImpl.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/report/OrderReportMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/mzl/flower/dto/response/report/SupplierReportCalendarBO.java
@@ -3,16 +3,16 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
public class SupplierReportCalendarBO {
    @ApiModelProperty("下单的开始时间")
    private LocalDate startDate;
    private LocalDateTime startDate;
    @ApiModelProperty("下单的结束时间")
    private LocalDate endDate;
    private LocalDateTime endDate;
    @ApiModelProperty(value = "供应商id")
    private Long supplierId;
src/main/java/com/mzl/flower/service/impl/report/OrderReportServiceImpl.java
@@ -260,8 +260,8 @@
            throw new ValidationException("日期不能为空");
        }
        supplierReportCalendarBO.setSupplierId(dto.getSupplierId());
        supplierReportCalendarBO.setStartDate(dto.getStartDate());
        supplierReportCalendarBO.setEndDate(dto.getEndDate());
        supplierReportCalendarBO.setStartDate(calculateStartTime(dto.getStartDate().atStartOfDay()));
        supplierReportCalendarBO.setEndDate(calculateEndTime(dto.getEndDate().atStartOfDay()));
        List<OrderSupplierReportResultVO> list = orderReportMapper.getOrderSupplierPageReport(supplierReportCalendarBO, page);
        page.setRecords(list);
        return page;
@@ -274,8 +274,8 @@
            throw new ValidationException("日期不能为空");
        }
        supplierReportCalendarBO.setSupplierId(dto.getSupplierId());
        supplierReportCalendarBO.setStartDate(dto.getStartDate());
        supplierReportCalendarBO.setEndDate(dto.getEndDate());
        supplierReportCalendarBO.setStartDate(calculateStartTime(dto.getStartDate().atStartOfDay()));
        supplierReportCalendarBO.setEndDate(calculateEndTime(dto.getEndDate().atStartOfDay()));
        OrderSupplierReportResultVO orderSupplierCountReport = orderReportMapper.getOrderSupplierCountReport(supplierReportCalendarBO);
        return orderSupplierCountReport;
    }
@@ -288,8 +288,8 @@
            throw new ValidationException("日期不能为空");
        }
        supplierReportCalendarBO.setSupplierId(dto.getSupplierId());
        supplierReportCalendarBO.setStartDate(dto.getStartDate());
        supplierReportCalendarBO.setEndDate(dto.getEndDate());
        supplierReportCalendarBO.setStartDate(calculateStartTime(dto.getStartDate().atStartOfDay()));
        supplierReportCalendarBO.setEndDate(calculateEndTime(dto.getEndDate().atStartOfDay()));
        List<OrderSupplierReportResultVO> list = orderReportMapper.getOrderSupplierReport(supplierReportCalendarBO);
        String[] rowsName = new String[]{"序号","日期", "供应商ID", "供应商","花农底价"
src/main/resources/mapper/report/OrderReportMapper.xml
@@ -490,7 +490,7 @@
            and o.payment_time &lt;= #{dto.endDate}
        </if>
        <if test="dto.supplierId != null">
            and oi.supplierId &lt;= #{dto.supplierId}
            and oi.supplierId = #{dto.supplierId}
        </if>
        ) t1
        GROUP BY