chenweida %!s(int64=8) %!d(string=hai) anos
pai
achega
40d76d8a61

+ 0 - 11
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/entity/agreement/WlyyAgreement.java

@ -21,7 +21,6 @@ public class WlyyAgreement extends IdEntity implements Serializable{
    private static final long serialVersionUID = -4343130835307199266L;
    private String code;//业务code
    private String parentCode;//
    private String saasId;
    private String name;//套餐名称
    private BigDecimal price;//套餐价格
@ -35,7 +34,6 @@ public class WlyyAgreement extends IdEntity implements Serializable{
    public WlyyAgreement(String code, String parentCode, String saasId, String name, BigDecimal price, String posterPic, String remark, String type, Date createTime, Date updateTime, Integer status, String createUser) {
        this.code = code;
        this.parentCode = parentCode;
        this.saasId = saasId;
        this.name = name;
        this.price = price;
@ -61,15 +59,6 @@ public class WlyyAgreement extends IdEntity implements Serializable{
        this.code = code;
    }
    @Column(name = "parent_code")
    public String getParentCode() {
        return parentCode;
    }
    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;

+ 20 - 18
web-gateway/src/main/java/com/yihu/jw/controller/PatientController.java

@ -27,13 +27,30 @@ import javax.servlet.http.HttpServletRequest;
@RequestMapping("/{version}/patient")
@Api(description = "患者")
public class PatientController {
    private Logger logger= LoggerFactory.getLogger(PatientController.class);
    private Logger logger = LoggerFactory.getLogger(PatientController.class);
    @Autowired
    private PatientFegin patientFegin;
    @Autowired
    private Tracer tracer;
    @GetMapping("/hello")
    @ApiVersion(1)
    @ResponseBody
    public String hello1(HttpServletRequest request) {
        System.out.println("haha1..........");
        return "hello1";
    }
    @GetMapping("/hello")
    @ApiVersion(2)
    @ResponseBody
    public String hello2(HttpServletRequest request) {
        System.out.println("haha2.........");
        return "hello2";
    }
    @ApiOperation(value = "根据code查找患者")
    @GetMapping(value = "findByCode")
    //配置HystrixProperty 则调用的方法和fallback是同一个线程 否则就不是
@ -41,11 +58,11 @@ public class PatientController {
//   @HystrixCommand(fallbackMethod = "findByCodeFallback" )
    @HystrixCommand(commandProperties = {
            @HystrixProperty(name = "execution.isolation.thread.timeoutInMilliseconds", value = "-1"),//超时时间
            @HystrixProperty(name = "execution.timeout.enabled", value = "false") })
            @HystrixProperty(name = "execution.timeout.enabled", value = "false")})
    public String findByCode(
            @ApiParam(name = "code", value = "患者code", required = true) @RequestParam(value = "code", required = true) String code) {
        tracer.getCurrentSpan().logEvent("开始调用微服务查询患者");
        String text1 =patientFegin.findByCode(code);
        String text1 = patientFegin.findByCode(code);
        tracer.getCurrentSpan().logEvent("查询调用微服务找患者结束");
        return text1;
    }
@ -60,20 +77,5 @@ public class PatientController {
//        return "启动断路器";
//    }
    @GetMapping("/hello")
    @ApiVersion(1)
    @ResponseBody
    public String hello1(HttpServletRequest request){
        System.out.println("haha1..........");
        return "hello1";
    }
    @GetMapping("/hello")
    @ApiVersion(2)
    @ResponseBody
    public String hello2(HttpServletRequest request){
        System.out.println("haha2.........");
        return "hello2";
    }
}