YYC
2023-09-05 a09c9a9e8d9fe49b2c4bd84e43d3d092175592ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package com.fzzy.api.view.repository;
 
import com.fzzy.api.entity.Api1101;
import org.springframework.data.jpa.repository.JpaRepository;
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 Api1101Rep extends JpaRepository<Api1101, String> {
 
    /**
     * 根据表单主键更新操作标志状态
     *
     * @param id   主键ID
     * @param czbz 操作标志
     * @return
     */
    @Transactional
    @Modifying
    @Query("update Api1101 set czbz=:czbz where dwdm=:id ")
    int updateStatus(@Param("id") String id, @Param("czbz") String czbz);
 
    /**
     * 单位信息
     * @param kqdm
     * @return
     */
    @Query("from Api1101 where kqdm=:kqdm ")
    List<Api1101> findPushData(@Param("kqdm") String kqdm);
 
    /**
     * 单位信息
     * @param kqdm
     * @return
     */
    @Query("from Api1101 where kqdm=:kqdm and zhgxsj >=:start and zhgxsj <:end order by zhgxsj ")
    List<Api1101> getDataByTime(@Param("kqdm") String kqdm, @Param("start") Date start, @Param("end") Date end);
}