czt
2025-05-29 753abfcaf090f79a4226693c2829a2d47b422058
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
package com.fzzy.igds.sys.repository;
 
import com.fzzy.igds.dzhwk.domain.Company;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/28 14:59
 */
@Service
public interface CompanyRepository extends JpaRepository<Company, String> {
 
    /**
     * 根据id获取信息
     *
     * @param id
     * @return
     */
    @Query("from Company where id =:id order by id")
    Company getDataById(@Param("id") String id);
 
    /**
     * 根据companyId获取信息
     *
     * @param companyId
     * @return
     */
    @Query("from Company where companyId =:companyId order by id")
    List<Company> getAllData(@Param("companyId") String companyId);
}