package com.sysu.admin.controller.city;

import com.xiesx.fastboot.core.jpa.JpaPlusRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;


public interface ProvinceRepository extends JpaPlusRepository<Province, Integer> {
    Province findByCode(String code);

    @Query(value = "Select new Province(p.name,p.code) from Province p where p.code = ?1 ")
    Province find(String code);
}
