package com.dashitech.businessdata.dao;

import com.dashitech.businessdata.entity.JPBagEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * Created by chi on 2019/9/12.
 */
public interface IJPBagDAO extends JpaRepository<JPBagEntity, String> {

    @SuppressWarnings("unchecked")
    JPBagEntity save(JPBagEntity jpBagEntity);

    @Query(value = "select id from JPBagEntity where packid=:packid")
    Long selectIdByPackid(@Param("packid")String packid);
}
