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);
|
}
|