BAOLH
2026-11-10 c5dfc09145e4e10f99dbf388a4a1433b5c2973e5
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/treatment/repository/CmnLevelRepository.java
@@ -18,6 +18,9 @@
import me.zhengjie.modules.treatment.domain.CmnLevel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import java.util.List;
/**
* @website https://eladmin.vip
@@ -25,4 +28,11 @@
* @date 2023-05-07
**/
public interface CmnLevelRepository extends JpaRepository<CmnLevel, Long>, JpaSpecificationExecutor<CmnLevel> {
    @Query(value = "SELECT * FROM `new_cmn_level` WHERE job_id = ? ORDER BY basic_wage ASC", nativeQuery = true)
    List<CmnLevel> findByJobId(Long jobId);
    @Query(value = "SELECT * FROM `new_cmn_level` WHERE id in (?1)", nativeQuery = true)
    List<CmnLevel> findByIds(Long[] ids);
}