chenweida 7 лет назад
Родитель
Сommit
8382d1099c

+ 4 - 0
patient-co-customization/patient-co-modern-medicine/pom.xml

@ -30,6 +30,10 @@
    <dependencies>
        <dependency>
            <groupId>com.yihu</groupId>
            <artifactId>common-entity</artifactId>
        </dependency>
        <!--Spring boot family-->
        <dependency>
            <groupId>org.springframework.boot</groupId>

+ 1 - 1
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/config/jpa/WlyyJpa.java

@ -48,7 +48,7 @@ public class WlyyJpa {
        LocalContainerEntityManagerFactoryBean emfb = new LocalContainerEntityManagerFactoryBean();
        emfb.setDataSource(dataSource);
        emfb.setPackagesToScan("com.yihu.mm.entity.wlyy");
        emfb.setPackagesToScan("com.yihu.wlyy.entity");
        emfb.setPersistenceUnitName("wlyy");
        JpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
        emfb.setJpaVendorAdapter(vendorAdapter);

+ 0 - 38
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/entity/wlyy/IdEntity.java

@ -1,38 +0,0 @@
/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.mm.entity.wlyy;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;
/**
 * 统一定义id的entity基类.
 * 
 * 基类统一定义id的属性名称、数据类型、列名映射及生成策略.
 * Oracle需要每个Entity独立定义id的SEQUCENCE时,不继承于本类而改为实现一个Idable的接口。
 * 
 * @author calvin
 */
// JPA 基类的标识
@MappedSuperclass
public abstract class IdEntity implements Serializable {
	private static final long serialVersionUID = 3673803562328635206L;
	protected Long id;  // 非业务主键
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
}

+ 1 - 1
patient-co-customization/patient-co-modern-medicine/src/main/java/com/yihu/mm/repository/wlyy/patient/PatientDao.java

@ -1,6 +1,6 @@
package com.yihu.mm.repository.wlyy.patient;
import com.yihu.mm.entity.wlyy.patient.Patient;
import com.yihu.wlyy.entity.patient.Patient;
import org.springframework.data.repository.PagingAndSortingRepository;
/**