Commit 62af79db by xioa

同步数据增加线程池

parent 5dc5cf7c
......@@ -21,6 +21,7 @@ public class TkioFlowHistory {
private String yMonth;
private String yMonthNext;
private String nextCode;
private Integer firstRecode;
......@@ -108,4 +109,12 @@ public class TkioFlowHistory {
public void setNextCode(String nextCode) {
this.nextCode = nextCode;
}
public Integer getFirstRecode() {
return firstRecode;
}
public void setFirstRecode(Integer firstRecode) {
this.firstRecode = firstRecode;
}
}
......@@ -2,14 +2,20 @@ package common.repository;
import common.model.CalculationFlow;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Transactional
public interface CalculationFlowRepository extends JpaRepository<CalculationFlow,Long> {
public interface CalculationFlowRepository extends JpaRepository<CalculationFlow, Long> {
@Query(value = "select * from calculation_flow where status = ?1",nativeQuery = true)
@Query(value = "select * from calculation_flow where status = ?1", nativeQuery = true)
List<CalculationFlow> findByStatus(int status);
@Query(value = "update calculation_flow set status = ?2 where id = ?1 ", nativeQuery = true)
@Transactional
@Modifying
void updateStatus(Long id, int status);
}
......@@ -12,7 +12,7 @@ public interface TkioFlowHistoryRepository extends JpaRepository<TkioFlowHistory
@Query(value = "select contract_code from tkio_flow_history where email = ?1 order by ds limit 1", nativeQuery = true)
@Query(value = "select contract_code from tkio_flow_history where email = ?1 order by ds limit 1", nativeQuery = true)
String findLastRecodeContract(String email);
@Query(value = "select sum(flow) from tkio_flow_history where email = ?1 and contract_code = ?2", nativeQuery = true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment