package com.ann.demo.repository;

import com.ann.demo.entity.normalEntity.Department;
import com.ann.demo.entity.normalEntity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @Author: LeiJiaXin
 * @Date: 2019/7/16 9:53
 */
@Repository
public interface DepartmentRepository extends JpaRepository<Department, String> {

    @Query("select o from Department o where o.DEPT_CODE = ?1 and o.isValid = ?2 ")
    public Department findDepartmentByDeptCodeAndIsValid(String deptCode, Integer isValid);
}
