Browse Source

bug 修改

chenweida 7 years ago
parent
commit
bd6f670889

+ 9 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/entity/patient/prescription/PrescriptionInfo.java

@ -26,6 +26,7 @@ public class PrescriptionInfo extends IdEntity{
    private Integer isRefrigerate;         //是否冷藏 1是 0否
    private String direction;               //药品用法
    private Double price;                    //药品价格
    private Integer del;               //1可用 0删除 不填数据库默认是1
    @Column(name = "code",unique = true , nullable=false)
    public String getCode() {
@ -110,4 +111,12 @@ public class PrescriptionInfo extends IdEntity{
    public void setPrice(Double price) {
        this.price = price;
    }
    public Integer getDel() {
        return del;
    }
    public void setDel(Integer del) {
        this.del = del;
    }
}

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/prescription/PrescriptionInfoDao.java

@ -12,6 +12,6 @@ import java.util.List;
 * Created by chenweida on 2017/7/27.
 */
public interface PrescriptionInfoDao extends PagingAndSortingRepository<PrescriptionInfo, Long>, JpaSpecificationExecutor<PrescriptionInfo> {
    @Query("from PrescriptionInfo p where p.prescriptionCode=?1")
    @Query("from PrescriptionInfo p where p.prescriptionCode=?1 and p.del=1")
    List<PrescriptionInfo> findByPrescriptionCode(String prescriptionCode);
}