Commit 86528141 by 丁伟峰

for test

1 parent c1a41182
......@@ -6,21 +6,19 @@ import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.data.repository.query.Param;
import java.time.LocalDate;
@Repository
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")
Page<OrderEventEntity> findAllByClusterId(String clusterId, @Param("date") LocalDate date, Pageable pageable);
@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, 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")
Page<OrderEventEntity> findAllByBranchId(String branchId, @Param("date") 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")
Page<OrderEventEntity> findAllByGroupId(String groupId, @Param("date") 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")
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")
Page<OrderEventEntity> findAllByGroupId(String groupId, LocalDate date, Pageable pageable);
}
......@@ -54,11 +54,7 @@ public class WorkbenchServiceImpl implements WorkbenchService {
Page<?> changes;
String levelType = reqDTO.getLevelType();
String levelValue = reqDTO.getLevelValue();
log.info("====== {}", reqDTO.getDate());
LocalDate date = LocalDate.parse(reqDTO.getDate(), DateTimeFormatter.ofPattern(PATTERN_DATE));
log.info("====== {}", date);
LocalDate date = LocalDate.parse(reqDTO.getDate());
if ("cluster".equals(levelType)) {
changes = orderEventDao.findAllByClusterId(levelValue, date, pageable);
} 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!