LineRepository.java
774 Bytes
package com.bsth.repository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import com.bsth.entity.Line;
/**
*
* @Interface: LineRepository(线路Repository数据持久层接口)
*
* @Extends : BaseRepository
*
* @Description: TODO(线路Repository数据持久层接口)
*
* @Author bsth@lq
*
* @Date 2016年4月28日 上午9:21:17
*
* @Version 公交调度系统BS版 0.1
*
*/
@Repository
public interface LineRepository extends BaseRepository<Line, Integer> {
/**
* 获取线路编码
*
* @return int <lineCode:线路编码>
*/
@Query(value = " SELECT MAX(id)+1 from bsth_c_line ", nativeQuery = true)
public int selectMaxIdToLineCode();
}