Browse Source

患者广告接口开发

chenyongxing 7 years ago
parent
commit
3c0cbe01e1

+ 2 - 2
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/wlyy/WlyyContants.java

@ -1,9 +1,9 @@
package com.yihu.jw.restmodel.wlyy;
package com.yihu.jw.restmodel.wlyy.agreement;
/**
 * Created by Administrator on 2017/5/20 0020.
 */
public class WlyyContants {
public class WlyyAgreementContants {
    //协议模块常量
    public static class Agreement{
        public static final String api_common="agreement";

+ 5 - 5
common/common-swagger/src/main/java/com/yihu/jw/config/SwaggerConfig.java

@ -1,7 +1,7 @@
package com.yihu.jw.config;
import com.yihu.jw.restmodel.base.BaseContants;
import com.yihu.jw.restmodel.wlyy.WlyyContants;
import com.yihu.jw.restmodel.wlyy.agreement.WlyyAgreementContants;
import com.yihu.jw.restmodel.wx.WxContants;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@ -66,10 +66,10 @@ public class SwaggerConfig {
                .pathMapping("/")
                .select()
                .paths(or(
                        regex("/" + WlyyContants.Agreement.api_common + "/.*")
                        ,regex("/"+WlyyContants.AgreementKpi.api_common+"/.*")
                        ,regex("/"+WlyyContants.AgreementKpiLog.api_common+"/.*")
                        ,regex("/"+WlyyContants.SignFamily.api_common+"/.*")
                        regex("/" + WlyyAgreementContants.Agreement.api_common + "/.*")
                        ,regex("/"+ WlyyAgreementContants.AgreementKpi.api_common+"/.*")
                        ,regex("/"+ WlyyAgreementContants.AgreementKpiLog.api_common+"/.*")
                        ,regex("/"+ WlyyAgreementContants.SignFamily.api_common+"/.*")
                ))
                .build()
                .apiInfo(wlyyApiInfo());

+ 306 - 0
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/entity/patient/BasePatient.java

@ -0,0 +1,306 @@
package com.yihu.jw.wlyy.entity.patient;
import com.yihu.jw.wlyy.entity.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Date;
/**
 * Created by Administrator on 2017/6/6 0006.
 */
@Entity
@Table(name = "base_patient")
public class BasePatient extends IdEntity implements Serializable {
    private static final long serialVersionUID = -5371957917251091855L;
    private String code;//业务code
    private String accountCode;//关联wlyy_login_account账号code
    private String idcard;//身份证
    private String name;//姓名
    private Date birthday;//生日
    private String sex;//性别
    private String mobile;//手机
    private String phone;//联系电话
    private String ssc;//社保卡
    private String photo;//头像http地址
    private String province;//省编码
    private String provinceName;//省名称
    private String city;//市编码
    private String cityName;//市名称
    private String town;//区县编码
    private String townName;//区县名称
    private String street;//街道
    private String streetName;//街道名称
    private String address;//详细地址
    private Integer status;//用户状态:1正常,0禁用,-1恶意注册,2审核中
    private Date updateTime;//更新时间
    private Date createTime;//创建时间
    private String saasId;//saas配置id
    private String email;//邮箱
    private String nation;//籍贯
    private String spell;//名称拼音首字母
    
    @Column(name = "code")
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    
    @Column(name = "account_code")
    public String getAccountCode() {
        return accountCode;
    }
    public void setAccountCode(String accountCode) {
        this.accountCode = accountCode;
    }
    
    @Column(name = "idcard")
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    
    @Column(name = "birthday")
    public Date getBirthday() {
        return birthday;
    }
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
    
    @Column(name = "sex")
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
    
    @Column(name = "mobile")
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    
    @Column(name = "ssc")
    public String getSsc() {
        return ssc;
    }
    public void setSsc(String ssc) {
        this.ssc = ssc;
    }
    
    @Column(name = "photo")
    public String getPhoto() {
        return photo;
    }
    public void setPhoto(String photo) {
        this.photo = photo;
    }
    
    @Column(name = "province")
    public String getProvince() {
        return province;
    }
    public void setProvince(String province) {
        this.province = province;
    }
    
    @Column(name = "province_name")
    public String getProvinceName() {
        return provinceName;
    }
    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }
    
    @Column(name = "city")
    public String getCity() {
        return city;
    }
    public void setCity(String city) {
        this.city = city;
    }
    
    @Column(name = "city_name")
    public String getCityName() {
        return cityName;
    }
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }
    
    @Column(name = "town")
    public String getTown() {
        return town;
    }
    public void setTown(String town) {
        this.town = town;
    }
    
    @Column(name = "town_name")
    public String getTownName() {
        return townName;
    }
    public void setTownName(String townName) {
        this.townName = townName;
    }
    
    @Column(name = "street")
    public String getStreet() {
        return street;
    }
    public void setStreet(String street) {
        this.street = street;
    }
    
    @Column(name = "street_name")
    public String getStreetName() {
        return streetName;
    }
    public void setStreetName(String streetName) {
        this.streetName = streetName;
    }
    
    @Column(name = "address")
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    
    @Column(name = "email")
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    
    @Column(name = "nation")
    public String getNation() {
        return nation;
    }
    public void setNation(String nation) {
        this.nation = nation;
    }
    
    @Column(name = "spell")
    public String getSpell() {
        return spell;
    }
    public void setSpell(String spell) {
        this.spell = spell;
    }
}

+ 54 - 0
web-gateway/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/patient/AdvertisementFeginFallbackFactory.java

@ -0,0 +1,54 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.patient;
import com.yihu.jw.fegin.wlyy.patient.AdvertisementFegin;
import com.yihu.jw.restmodel.common.Envelop;
import feign.hystrix.FallbackFactory;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * Created by Administrator on 2017/6/6 0006.
 */
public class AdvertisementFeginFallbackFactory implements FallbackFactory<AdvertisementFegin> {
    @Override
    public AdvertisementFegin create(Throwable throwable) {
        return new AdvertisementFegin() {
            @Override
            public Envelop create(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop update(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop delete(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public Envelop findByCode(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public Envelop queryPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts, @RequestParam(value = "size", required = false) int size, @RequestParam(value = "page", required = false) int page) {
                return null;
            }
            @Override
            public Envelop getList(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) {
                return null;
            }
            @Override
            public Envelop getListByPatientCode(String patientCode) {
                return null;
            }
        };
    }
}

+ 8 - 8
web-gateway/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementFegin.java

@ -3,7 +3,7 @@ package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyyAgreementFeginFallbackFactory;
import com.yihu.jw.restmodel.common.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.wlyy.WlyyContants;
import com.yihu.jw.restmodel.wlyy.agreement.WlyyAgreementContants;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@ -13,22 +13,22 @@ import org.springframework.web.bind.annotation.*;
        name = CommonContants.svr_wlyy // name值是eurika的实例名字
        ,fallbackFactory  = WlyyAgreementFeginFallbackFactory.class
)
@RequestMapping(WlyyContants.Agreement.api_common)
@RequestMapping(WlyyAgreementContants.Agreement.api_common)
public interface WlyyAgreementFegin {
    @PostMapping(value = WlyyContants.Agreement.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @PostMapping(value = WlyyAgreementContants.Agreement.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop create(@RequestBody String jsonData);
    @PutMapping(value = WlyyContants.Agreement.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @PutMapping(value = WlyyAgreementContants.Agreement.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop update(@RequestBody String jsonData);
    @DeleteMapping(value =WlyyContants.Agreement.api_delete)
    @DeleteMapping(value = WlyyAgreementContants.Agreement.api_delete)
    Envelop delete( @RequestParam(value = "code") String code);
    @RequestMapping(value=WlyyContants.Agreement.api_getByCode,method = RequestMethod.GET)
    @RequestMapping(value= WlyyAgreementContants.Agreement.api_getByCode,method = RequestMethod.GET)
    Envelop findByCode( @RequestParam(value = "code" ) String code);
    @RequestMapping(value =WlyyContants.Agreement.api_queryPage, method = RequestMethod.GET)
    @RequestMapping(value = WlyyAgreementContants.Agreement.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
@ -36,7 +36,7 @@ public interface WlyyAgreementFegin {
            @RequestParam(value = "size", required = false) int size,
            @RequestParam(value = "page", required = false) int page);
    @GetMapping(value =WlyyContants.Agreement.api_getList)
    @GetMapping(value = WlyyAgreementContants.Agreement.api_getList)
    Envelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,

+ 8 - 8
web-gateway/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementKpiFegin.java

@ -3,7 +3,7 @@ package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyyAgreementKpiFeginFallbackFactory;
import com.yihu.jw.restmodel.common.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.wlyy.WlyyContants;
import com.yihu.jw.restmodel.wlyy.agreement.WlyyAgreementContants;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@ -13,22 +13,22 @@ import org.springframework.web.bind.annotation.*;
        name = CommonContants.svr_wlyy // name值是eurika的实例名字
        ,fallbackFactory  = WlyyAgreementKpiFeginFallbackFactory.class
)
@RequestMapping(WlyyContants.AgreementKpi.api_common)
@RequestMapping(WlyyAgreementContants.AgreementKpi.api_common)
public interface WlyyAgreementKpiFegin {
    @PostMapping(value = WlyyContants.AgreementKpi.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @PostMapping(value = WlyyAgreementContants.AgreementKpi.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop create(@RequestBody String jsonData);
    @PutMapping(value = WlyyContants.AgreementKpi.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @PutMapping(value = WlyyAgreementContants.AgreementKpi.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop update(@RequestBody String jsonData);
    @DeleteMapping(value =WlyyContants.AgreementKpi.api_delete)
    @DeleteMapping(value = WlyyAgreementContants.AgreementKpi.api_delete)
    Envelop delete(@RequestParam(value = "code" ) String code);
    @GetMapping(value =WlyyContants.AgreementKpi.api_getByCode)
    @GetMapping(value = WlyyAgreementContants.AgreementKpi.api_getByCode)
    Envelop findByCode(@RequestParam(value = "code" ) String code);
    @RequestMapping(value =WlyyContants.AgreementKpi.api_queryPage, method = RequestMethod.GET)
    @RequestMapping(value = WlyyAgreementContants.AgreementKpi.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
@ -36,7 +36,7 @@ public interface WlyyAgreementKpiFegin {
            @RequestParam(value = "size", required = false) int size,
            @RequestParam(value = "page", required = false) int page);
    @GetMapping(value =WlyyContants.AgreementKpi.api_getList)
    @GetMapping(value = WlyyAgreementContants.AgreementKpi.api_getList)
    Envelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,

+ 6 - 6
web-gateway/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementKpiLogFegin.java

@ -3,7 +3,7 @@ package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyyAgreementKpiLogFeginFallbackFactory;
import com.yihu.jw.restmodel.common.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.wlyy.WlyyContants;
import com.yihu.jw.restmodel.wlyy.agreement.WlyyAgreementContants;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;
@ -12,16 +12,16 @@ import org.springframework.web.bind.annotation.*;
        name = CommonContants.svr_wlyy // name值是eurika的实例名字
        ,fallbackFactory  = WlyyAgreementKpiLogFeginFallbackFactory.class
)
@RequestMapping(WlyyContants.AgreementKpiLog.api_common)
@RequestMapping(WlyyAgreementContants.AgreementKpiLog.api_common)
public interface WlyyAgreementKpiLogFegin {
    @PostMapping(value = WlyyContants.AgreementKpiLog.api_create)
    @PostMapping(value = WlyyAgreementContants.AgreementKpiLog.api_create)
    Envelop create(@RequestBody String jsonData);
    @GetMapping(value =WlyyContants.AgreementKpiLog.api_getByCode)
    @GetMapping(value = WlyyAgreementContants.AgreementKpiLog.api_getByCode)
    Envelop findByCode(@RequestParam(value = "code")String code);
    @RequestMapping(value =WlyyContants.AgreementKpiLog.api_queryPage, method = RequestMethod.GET)
    @RequestMapping(value = WlyyAgreementContants.AgreementKpiLog.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
@ -29,7 +29,7 @@ public interface WlyyAgreementKpiLogFegin {
            @RequestParam(value = "size", required = false) int size,
            @RequestParam(value = "page", required = false) int page);
    @GetMapping(value =WlyyContants.AgreementKpiLog.api_getList)
    @GetMapping(value = WlyyAgreementContants.AgreementKpiLog.api_getList)
    Envelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,

+ 7 - 7
web-gateway/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyySignFamilyFegin.java

@ -3,7 +3,7 @@ package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyySignFamilyFeginFallbackFactory;
import com.yihu.jw.restmodel.common.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.wlyy.WlyyContants;
import com.yihu.jw.restmodel.wlyy.agreement.WlyyAgreementContants;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@ -13,19 +13,19 @@ import org.springframework.web.bind.annotation.*;
        name = CommonContants.svr_wlyy // name值是eurika的实例名字
        ,fallbackFactory  = WlyySignFamilyFeginFallbackFactory.class
)
@RequestMapping(WlyyContants.SignFamily.api_common)
@RequestMapping(WlyyAgreementContants.SignFamily.api_common)
public interface WlyySignFamilyFegin {
    @PostMapping(value = WlyyContants.SignFamily.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @PostMapping(value = WlyyAgreementContants.SignFamily.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop create(@RequestBody String jsonData);
    @PutMapping(value = WlyyContants.SignFamily.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @PutMapping(value = WlyyAgreementContants.SignFamily.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop update(@RequestBody String jsonData);
    @RequestMapping(value=WlyyContants.SignFamily.api_getByCode,method = RequestMethod.GET)
    @RequestMapping(value= WlyyAgreementContants.SignFamily.api_getByCode,method = RequestMethod.GET)
    Envelop findByCode(@RequestParam(value = "code") String code);
    @RequestMapping(value =WlyyContants.SignFamily.api_queryPage, method = RequestMethod.GET)
    @RequestMapping(value = WlyyAgreementContants.SignFamily.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
@ -33,7 +33,7 @@ public interface WlyySignFamilyFegin {
            @RequestParam(value = "size", required = false) int size,
            @RequestParam(value = "page", required = false) int page);
    @GetMapping(value =WlyyContants.SignFamily.api_getList)
    @GetMapping(value = WlyyAgreementContants.SignFamily.api_getList)
    Envelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,