package com.yihu.jw.hospital.prescription.dao;

import com.yihu.jw.entity.hospital.prescription.BaseNationalDrugDictDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

public interface BaseNationalDrugDictDao extends PagingAndSortingRepository<BaseNationalDrugDictDO, Integer>, JpaSpecificationExecutor<BaseNationalDrugDictDO> {

    @Query("update BaseNationalDrugDictDO b set b.status = ?2 where b.id = ?1")
    @Modifying
    void updateStatusById(Integer id, Integer status);
}
