浏览代码

长处方

trick9191 7 年之前
父节点
当前提交
f65b6ec0cd

+ 9 - 0
common/common-entity/src/main/java/com/yihu/wlyy/entity/address/Country.java

@ -17,6 +17,7 @@ public class Country extends IdEntity {
    private String  street ;
    private String  code;
    private String  name;
    private String  jwCode;
    public String getProvince() {
        return province;
@ -65,4 +66,12 @@ public class Country extends IdEntity {
    public void setCode(String code) {
        this.code = code;
    }
    public String getJwCode() {
        return jwCode;
    }
    public void setJwCode(String jwCode) {
        this.jwCode = jwCode;
    }
}

+ 2 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/address/CountryDao.java

@ -1,6 +1,7 @@
package com.yihu.wlyy.repository.address;
import com.yihu.wlyy.entity.address.Country;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
@ -9,7 +10,7 @@ import java.util.List;
 * Created by Trick on 2017/7/20.
 */
public interface CountryDao extends PagingAndSortingRepository<Country, Long> {
    @Query("from Country c where c.street=?1 AND (c.jwCode IS NOT NULL OR c.jwCode <> '')")
    List<Country> findByStreet(String street);
    Country findByCode(String code);