Commit fcd0ba79 by 丁伟峰

for test

1 parent c1a41182
...@@ -6,7 +6,6 @@ import org.springframework.data.domain.Pageable; ...@@ -6,7 +6,6 @@ import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query; import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import org.springframework.data.repository.query.Param;
import java.time.LocalDate; import java.time.LocalDate;
...@@ -14,13 +13,11 @@ import java.time.LocalDate; ...@@ -14,13 +13,11 @@ import java.time.LocalDate;
public interface OrderEventDao extends JpaRepository<OrderEventEntity, Integer> { public interface OrderEventDao extends JpaRepository<OrderEventEntity, Integer> {
@Query("SELECT a FROM OrderEventEntity a JOIN OrderRequestEntity b ON a.orderId = b.orderId WHERE b.orgClusterId = :clusterId AND DATE(a.createTime) = :date") @Query("SELECT a FROM OrderEventEntity a JOIN OrderRequestEntity b ON a.orderId = b.orderId WHERE b.orgClusterId = :clusterId AND DATE(a.createTime) = :date")
Page<OrderEventEntity> findAllByClusterId(String clusterId, @Param("date") LocalDate date, Pageable pageable); Page<OrderEventEntity> findAllByClusterId(String clusterId, LocalDate date, Pageable pageable);
@Query("SELECT a FROM OrderEventEntity a JOIN OrderRequestEntity b ON a.orderId = b.orderId WHERE b.orgBranchId = :branchId AND DATE(a.createTime) = :date") @Query("SELECT a FROM OrderEventEntity a JOIN OrderRequestEntity b ON a.orderId = b.orderId WHERE b.orgBranchId = :branchId AND DATE(a.createTime) = :date")
Page<OrderEventEntity> findAllByBranchId(String branchId, @Param("date") LocalDate date, Pageable pageable); Page<OrderEventEntity> findAllByBranchId(String branchId, LocalDate date, Pageable pageable);
@Query("SELECT a FROM OrderEventEntity a JOIN OrderRequestEntity b ON a.orderId = b.orderId WHERE b.orgGroupId = :groupId AND DATE(a.createTime) = :date") @Query("SELECT a FROM OrderEventEntity a JOIN OrderRequestEntity b ON a.orderId = b.orderId WHERE b.orgGroupId = :groupId AND DATE(a.createTime) = :date")
Page<OrderEventEntity> findAllByGroupId(String groupId, @Param("date") LocalDate date, Pageable pageable); Page<OrderEventEntity> findAllByGroupId(String groupId, LocalDate date, Pageable pageable);
} }
...@@ -54,11 +54,8 @@ public class WorkbenchServiceImpl implements WorkbenchService { ...@@ -54,11 +54,8 @@ public class WorkbenchServiceImpl implements WorkbenchService {
Page<?> changes; Page<?> changes;
String levelType = reqDTO.getLevelType(); String levelType = reqDTO.getLevelType();
String levelValue = reqDTO.getLevelValue(); String levelValue = reqDTO.getLevelValue();
log.info("====== {}", reqDTO.getDate());
LocalDate date = LocalDate.parse(reqDTO.getDate(), DateTimeFormatter.ofPattern(PATTERN_DATE)); LocalDate date = LocalDate.parse(reqDTO.getDate(), DateTimeFormatter.ofPattern(PATTERN_DATE));
log.info("====== {}", date);
if ("cluster".equals(levelType)) { if ("cluster".equals(levelType)) {
changes = orderEventDao.findAllByClusterId(levelValue, date, pageable); changes = orderEventDao.findAllByClusterId(levelValue, date, pageable);
} else if ("branch".equals(levelType)) { } else if ("branch".equals(levelType)) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!