package com.dashitech.businessdata.dao;

import com.dashitech.businessdata.entity.DrugsBagEntity;
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 IDrugsBagDAO  extends JpaRepository<DrugsBagEntity, String> {

    @SuppressWarnings("unchecked")
    DrugsBagEntity save(DrugsBagEntity drugsBagEntity);

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