Commit 49edbc50 by 王力

Merge branch 'dev_mp2jpa0809' into 'develop'

Dev mp2jpa0809

See merge request !325
2 parents cfc5e307 aa4c0747
......@@ -52,6 +52,10 @@ public class TimeUtils {
return localDateTime.format(DateTimeFormatter.ofPattern(DATE_TIME_FORMAT));
}
public static final String localDateTime2String(LocalDateTime localDateTime, String pattern) {
return localDateTime.format(DateTimeFormatter.ofPattern(pattern));
}
public static final String IsoLocalDate2String(LocalDate localDate) {
return localDate.format(DateTimeFormatter.ofPattern(DATE_GAP_FORMAT));
}
......
......@@ -2,12 +2,13 @@ package com.dituhui.pea.order.dao;
import com.dituhui.pea.order.entity.OrderInfoEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import java.time.LocalDate;
import java.util.List;
public interface OrderInfoDao extends JpaRepository<OrderInfoEntity, Long> {
public interface OrderInfoDao extends JpaRepository<OrderInfoEntity, Long>, JpaSpecificationExecutor<OrderInfoEntity> {
OrderInfoEntity getByOrderId(String orderId);
OrderInfoEntity getByOrderIdAndDt(String orderId, LocalDate dt);
List<OrderInfoEntity> findByOrderId(String orderId);
......
......@@ -4,6 +4,7 @@ import com.dituhui.pea.order.entity.OrgTeamEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
......@@ -11,7 +12,7 @@ import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface OrgTeamDao extends JpaRepository<OrgTeamEntity, Integer> {
public interface OrgTeamDao extends JpaRepository<OrgTeamEntity, Integer>, JpaSpecificationExecutor<OrgTeamEntity> {
@Query("select t from OrgTeamEntity t where t.clusterId = :clusterId and t.status=1")
List<OrgTeamEntity> findAllByClusterId(String clusterId);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!