diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/cons/service/impl/TbConsInfoFlowServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/cons/service/impl/TbConsInfoFlowServiceImpl.java index f92c26ce..2aa8d71a 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/cons/service/impl/TbConsInfoFlowServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/cons/service/impl/TbConsInfoFlowServiceImpl.java @@ -134,8 +134,8 @@ public class TbConsInfoFlowServiceImpl implements TbConsInfoFlowService { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); criteria.setStartTime(sdf.parse("2024-01-01"));//创建2024年1月1日的Date对象 } - return stockRepository.consStockCount(criteria.getShopId().toString(), criteria.getProductName(), - criteria.getCategoryId(), DateUtil.getStrTime(criteria.getStartTime()), DateUtil.getStrTime(criteria.getEndTime())); + return stockRepository.consStockCount(criteria.getShopId(), criteria.getProductName(), + criteria.getCategoryId(), criteria.getStartTime(), criteria.getEndTime()); } @Override diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/ProductStockCountRepository.java b/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/ProductStockCountRepository.java index 18cfac1a..1b46140a 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/ProductStockCountRepository.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/repository/product/ProductStockCountRepository.java @@ -7,6 +7,8 @@ import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; +import java.util.Date; + /** * @author lyf @@ -158,8 +160,8 @@ public interface ProductStockCountRepository extends JpaRepository :startTime " + " AND flow.createTime < :endTime ") - TbProductStockCountVo consStockCount(String shopId, - String conName, - String conTypeId, String startTime, String endTime); + TbProductStockCountVo consStockCount(Integer shopId, + String conName, + String conTypeId, Date startTime, Date endTime); }