package com.yihu.wlyy.repository.patient;

import com.yihu.wlyy.entity.patient.WlyyPatientSick;
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;

/**
 * Created by Administrator on 2016/8/2.
 */
public interface PatientSickDao extends
        PagingAndSortingRepository<WlyyPatientSick, Long>,
        JpaSpecificationExecutor<WlyyPatientSick> {


    @Modifying
    @Query("update WlyyPatientSick a set a.del = '0' where a.patientCode = ?1 and a.signType='2' and a.sickCode=?2 ")
    void updateType1Del(String code,String sickCode);
}
