yaozc
2023-01-31 aa102c7ba6977ff40f3e02eba32a00a168fb3564
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/project/repository/ProjectRepository.java
@@ -17,7 +17,6 @@
import org.springframework.data.jpa.repository.Query;
import me.zhengjie.modules.project.domain.Project;
import me.zhengjie.modules.project.domain.ProjectType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
@@ -39,4 +38,16 @@
    @Query(value = "SELECT * FROM project WHERE id = ?1", nativeQuery = true)
    Project findByIdUpdate(Long id);
    List<Project> findByProjectStatus(String projectStatus);
    List<Project> findByProjectStatusAndIdIn(String projectStatus, Long[] ids);
    /**
     * 根据用户ID查询负责项目ID
     * @param liableUserId
     * @return
     */
    @Query(value = "SELECT id FROM project WHERE liable_user_id = ?1", nativeQuery = true)
    List<Long> findIdByLiableUserId(Long liableUserId);
}