CZT
2023-08-10 c0d3be77cb5b6769986b1625644dbf3dc287a586
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package com.fzzy.api.view.repository;
 
import com.fzzy.api.entity.Api1211;
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.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
 
public interface Api1211Rep extends JpaRepository<Api1211, Integer>, JpaSpecificationExecutor<Api1211> {
    @Transactional
    @Modifying
    @Query("update Api1211 set czbz =:czbz where id=:id")
    void updateStatus(@Param("id") Integer id, @Param("czbz") String czbz);
 
    @Query("from Api1211 where kqdm=:kqdm and zhgxsj >=:start and zhgxsj <:end order by zhgxsj ")
    List<Api1211> findPushDataByTime(@Param("kqdm") String kqdm, @Param("start") Date start, @Param("end") Date end);
}