XklCompanyRespository.java 517 Bytes
package com.xkl.repository;

import com.xkl.domain.XklCompanyEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

/**
 * Created by win7 on 2016/11/20.
 */
public interface XklCompanyRespository extends CrudRepository<XklCompanyEntity, Long> {

    @Query(value = "select * from xkl_company where company_code like ?1%", nativeQuery = true)
    public List<XklCompanyEntity> findByCompanyCodeStartingWith(String prefix);

}