Browse Source

代码修改

LAPTOP-KB9HII50\70708 2 years ago
parent
commit
37c620948a
78 changed files with 3 additions and 4314 deletions
  1. 0 156
      common/common-fegin/pom.xml
  2. 0 15
      common/common-fegin/src/main/java/com/yihu/jw/common/CommonContants.java
  3. 0 13
      common/common-fegin/src/main/java/com/yihu/jw/common/Contants.java
  4. 0 15
      common/common-fegin/src/main/java/com/yihu/jw/common/archives/ArchivesContants.java
  5. 0 70
      common/common-fegin/src/main/java/com/yihu/jw/common/base/base/BaseContants.java
  6. 0 8
      common/common-fegin/src/main/java/com/yihu/jw/common/base/base/VersionContants.java
  7. 0 62
      common/common-fegin/src/main/java/com/yihu/jw/common/base/user/BaseUserContants.java
  8. 0 61
      common/common-fegin/src/main/java/com/yihu/jw/common/base/wx/WechatContants.java
  9. 0 35
      common/common-fegin/src/main/java/com/yihu/jw/common/iot/DataConstants.java
  10. 0 25
      common/common-fegin/src/main/java/com/yihu/jw/common/iot/IotCommonContants.java
  11. 0 50
      common/common-fegin/src/main/java/com/yihu/jw/common/wlyy/AgreementContants.java
  12. 0 19
      common/common-fegin/src/main/java/com/yihu/jw/common/wlyy/PatientContants.java
  13. 0 24
      common/common-fegin/src/main/java/com/yihu/jw/fegin/DemoFeign.java
  14. 0 39
      common/common-fegin/src/main/java/com/yihu/jw/fegin/archives/ArchivesFeign.java
  15. 0 44
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/login/LoginFeign.java
  16. 0 28
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/sms/RegisterSmsFeign.java
  17. 0 65
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/BaseMenuFeign.java
  18. 0 63
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/BaseRoleFeign.java
  19. 0 63
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/EmployFeign.java
  20. 0 19
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/version/UserVersionFeign.java
  21. 0 25
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/AccessTokenFeign.java
  22. 0 57
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/GraphicMessageFeign.java
  23. 0 40
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatFeign.java
  24. 0 56
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatMenuFeign.java
  25. 0 58
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatTemplateFeign.java
  26. 0 23
      common/common-fegin/src/main/java/com/yihu/jw/fegin/common/security/LoginSmsFeign.java
  27. 0 21
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/DemoFeignFallbackFactory.java
  28. 0 64
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/archives/ArchivesFallbackFactory.java
  29. 0 80
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/FunctionFeignFallbackFactory.java
  30. 0 69
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/LoginFeignFallbackFactory.java
  31. 0 94
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/ModuleFeignFallbackFactory.java
  32. 0 26
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SaasFeignFallbackFactory.java
  33. 0 73
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SystemDictFeignFallbackFactory.java
  34. 0 79
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SystemDictListFeignFallbackFactory.java
  35. 0 83
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/BaseMenuFeignFallbackFactory.java
  36. 0 108
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/BaseRoleFeignFallbackFactory.java
  37. 0 106
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/EmployeeFeignFallbackFactory.java
  38. 0 16
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/version/UserVersionFeignFallbackFactory.java
  39. 0 24
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/AccessTokenFeignFallbackFactory.java
  40. 0 79
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/GraphicMessageFeignFallbackFactory.java
  41. 0 65
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatFeignFallbackFactory.java
  42. 0 95
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatMenuFeignFallbackFactory.java
  43. 0 77
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatTemplateFeignFallbackFactory.java
  44. 0 54
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/common/IotFileUploadFallbackFactory.java
  45. 0 35
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/common/IotSystemDictFallbackFactory.java
  46. 0 123
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/company/IotCompanyFallbackFactory.java
  47. 0 42
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataInputFeignFallbackFactory.java
  48. 0 91
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataSearchFeignFallbackFactory.java
  49. 0 27
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataStandardConvertFeignFallbackFactory.java
  50. 0 134
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceFallbackFactory.java
  51. 0 114
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceOrderFallbackFactory.java
  52. 0 89
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceQualityFallbackFactory.java
  53. 0 124
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotPatientDeviceFallbackFactory.java
  54. 0 96
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/product/IotProductFallbackFactory.java
  55. 0 50
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementFeignFallbackFactory.java
  56. 0 48
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementKpiFeignFallbackFactory.java
  57. 0 38
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementKpiLogFeignFallbackFactory.java
  58. 0 45
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyySignFamilyFeignFallbackFactory.java
  59. 0 63
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/patient/AdvertisementFeignFallbackFactory.java
  60. 0 38
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/common/IotFileUploadFeign.java
  61. 0 27
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/common/IotSystemDictFeign.java
  62. 0 67
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/company/IotCompanyFeign.java
  63. 0 29
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataInputFeign.java
  64. 0 50
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataSearchFeign.java
  65. 0 22
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataStandardConvertFeign.java
  66. 0 67
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceFeign.java
  67. 0 65
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceOrderFeign.java
  68. 0 52
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceQualityFeign.java
  69. 0 70
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotPatientDeviceFeign.java
  70. 0 57
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/product/IotProductFeign.java
  71. 0 44
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementFeign.java
  72. 0 44
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementKpiFeign.java
  73. 0 37
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementKpiLogFeign.java
  74. 0 41
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyySignFamilyFeign.java
  75. 0 53
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/patient/AdvertisementFeign.java
  76. 0 34
      common/common-tracer/pom.xml
  77. 0 50
      common/common-tracer/src/main/java/com/yihu/jw/advice/HttpAdvice.java
  78. 3 2
      wlyy-lib-parent-pom/pom.xml

+ 0 - 156
common/common-fegin/pom.xml

@ -1,156 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.yihu.jw</groupId>
        <artifactId>wlyy-lib-parent-pom</artifactId>
        <version>2.4.0</version>
        <relativePath>../../wlyy-lib-parent-pom/pom.xml</relativePath>
    </parent>
    <groupId>com.yihu.jw</groupId>
    <artifactId>common-fegin</artifactId>
    <version>${project.parent.version}</version>
    <dependencies>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-exception</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-request-mapping</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model-es</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-servlet-api</artifactId>
            <version>8.5.28</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>
        <!--  <dependency>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-starter-tomcat</artifactId>
          </dependency>-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
        <!--<dependency>-->
        <!--<groupId>org.springframework.boot</groupId>-->
        <!--<artifactId>spring-boot-starter-security</artifactId>-->
        <!--</dependency>-->
        <!--   <dependency>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-starter-data-redis</artifactId>
           </dependency>-->
        <!--  <dependency>
              <groupId>org.springframework.cloud</groupId>
              <artifactId>spring-cloud-starter-oauth2</artifactId>
          </dependency>-->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-feign</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-hystrix</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-zuul</artifactId>
        </dependency>
        <!--zipkin支持分布式追踪系统-->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-sleuth</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-sleuth-zipkin</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </dependency>
        <!--    <dependency>
                <groupId>org.springframework.security</groupId>
                <artifactId>spring-security-core</artifactId>
                <version>RELEASE</version>
            </dependency>-->
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.jna</groupId>
            <artifactId>jna</artifactId>
            <version>3.0.9</version>
        </dependency>
    </dependencies>
</project>

+ 0 - 15
common/common-fegin/src/main/java/com/yihu/jw/common/CommonContants.java

@ -1,15 +0,0 @@
package com.yihu.jw.common;
/**
 * Created by chenweida on 2017/10/24.
 */
public class CommonContants {
    //微服务的id start
    public static final String svr_base = "svr-base";
    public static final String svr_iot = "svr-iot";
    public static final String svr_wlyy = "svr-wlyy";
    public static final String svr_gateway = "svr-gateway";
    public static final String svr_archives = "svr-wlyy-archives";
}

+ 0 - 13
common/common-fegin/src/main/java/com/yihu/jw/common/Contants.java

@ -1,13 +0,0 @@
package com.yihu.jw.common;
/**
 * Created by chenweida on 2017/5/15.
 * 静态类,存储一些常量
 */
public class Contants {
    //微服务的id end
    public static final class patient {
        public static final String findByCode = "/patient/findByCode";
    }
}

+ 0 - 15
common/common-fegin/src/main/java/com/yihu/jw/common/archives/ArchivesContants.java

@ -1,15 +0,0 @@
package com.yihu.jw.common.archives;
/**
 * Created by Trick on 2018/2/12.
 */
public class ArchivesContants {
    public static final String api_archives_common = "svr-archives";
    /**
     * 公共模块
     */
    public static class Common{
        public static final String archives = api_archives_common + "/wg/archives";
    }
}

+ 0 - 70
common/common-fegin/src/main/java/com/yihu/jw/common/base/base/BaseContants.java

@ -1,70 +0,0 @@
package com.yihu.jw.common.base.base;
/**
 * Created by chenweida on 2017/5/19.
 * 基础模块的静态变量
 */
public class BaseContants {
    public static final String api_common = "/bases";
    public static final String api_function = api_common+"/function";
    public static final String api_module = api_common+"/module";
    public static final String api_moduleFun = api_common+"/moduleFun";
    public static final String api_saas = api_common+"/saas";
    public static final String api_systemDict = api_common+"/systemDict";
    public static final String api_systemDictList = api_common+"/systemDictList";
    //功能模块常量
    public static class Function{
        public static final String api_create="/";
        public static final String api_update="/";
        public static final String api_delete="/{id}";
        public static final String api_getById="/{id}";
        public static final String api_getListNoPage="/listNoPage";
        public static final String api_getList="/list";
        public static final String api_getChildren="/children/{id}";
    }
    //模块常量
    public static class Module{
        public static final String api_create="/";
        public static final String api_update="/";
        public static final String api_delete="/{id}";
        public static final String api_getById="/{id}";
        public static final String api_getListNoPage="/listNoPage";
        public static final String api_getList="/list";
        public static final String api_getChildren="/children/{id}";
    }
    public static class ModuleFun{
        public static final String api_getExistFun = "/existFunc/{id}";
        public static final String api_changeFun="/changeFun";
    }
    //saas常量
    public static class Saas{
        public static final String api_create="/";
        public static final String api_update="/";
        public static final String api_delete="/{id}";
        public static final String api_getSaassNoPage="/getSaassNoPage";
    }
    //SystemDict常量
    public static class SystemDict{
        public static final String api_create="/";
        public static final String api_update="/";
        public static final String api_delete="/{id}";
        public static final String api_getSystemDictNoPage="/getSaassNoPage";
    }
    //SystemDictList常量
    public static class SystemDictList{
        public static final String api_create="/";
        public static final String api_update="/";
        public static final String api_delete="/{id}";
        public static final String api_getSystemDictListNoPage="/getSaassNoPage";
    }
}

+ 0 - 8
common/common-fegin/src/main/java/com/yihu/jw/common/base/base/VersionContants.java

@ -1,8 +0,0 @@
package com.yihu.jw.common.base.base;
/**
 * Created by chenweida on 2017/11/13.
 * 版本发布相关
 */
public class VersionContants {
}

+ 0 - 62
common/common-fegin/src/main/java/com/yihu/jw/common/base/user/BaseUserContants.java

@ -1,62 +0,0 @@
package com.yihu.jw.common.base.user;
/**
 * Created by LiTaohong on 2017/11/28.
 */
public class BaseUserContants {
    public static final String api_common = "/bases";
    public static final String api_baseRole = api_common+"/baseRole";
    public static final String api_employ = api_common+"/employee";
    public static final String api_baseMenu= api_common+"/baseMenu";
    public static final String api_baseRoleMenu= api_common+"/baseRoleMenu";
    public static final String api_employRole= api_common+"/employeeRole";
    //角色常量
    public static class BaseRole{
        public static final String api_create="/";
        public static final String api_update="/update";
        public static final String api_delete="/delete/{id}";
        public static final String api_getById="/getById/{id}";
        public static final String api_getListNoPage="/listNoPage";
        public static final String api_getList="/list";
    }
    //角色菜单常量
    public static class BaseRoleMenu{
        public static final String api_create=api_baseRoleMenu ;
        public static final String api_update=api_baseRoleMenu + "/update";
        public static final String api_delete=api_baseRoleMenu + "/delete/{id}";
        public static final String api_getListNoPage=api_baseRoleMenu + "/listNoPage";
    }
    //用户常量
    public static class Employee{
        public static final String api_create="/";
        public static final String api_update="/update";
        public static final String api_delete="/delete/{id}";
        public static final String api_getById="/getById/{id}";
        public static final String api_getListNoPage="/listNoPage";
        public static final String api_getList="/list";
    }
    //用户角色常量
    public static class EmployeeRole{
        public static final String api_create= api_employRole;
        public static final String api_update= api_employRole + "/update";
        public static final String api_delete= api_employRole +"/delete/{id}";
        public static final String api_getListNoPage= api_employRole +"/listNoPage";
    }
    //菜单常量
    public static class BaseMenu{
        public static final String api_create="/";
        public static final String api_update="/update";
        public static final String api_delete="/delete/{id}";
        public static final String api_getById="/getById/{id}";
        public static final String api_children="/{saasId}/{parentId}";
        public static final String api_getListNoPage="/listNoPage";
        public static final String api_getList="/list";
    }
}

+ 0 - 61
common/common-fegin/src/main/java/com/yihu/jw/common/base/wx/WechatContants.java

@ -1,61 +0,0 @@
package com.yihu.jw.common.base.wx;
/**
 * Created by Administrator on 2017/5/20 0020.
 */
public class WechatContants {
    public static final String api_common="wechat";
    //微信token模块常量
    public static class AccessToken{
        public static final String api_common="accessToken";
        public static final String api_create="create";
        public static final String api_get="get";
    }
    //微信按钮模块常量
    public static class Menu{
        public static final String api_create="wxMenu";
        public static final String api_update="wxMenu";
        public static final String api_delete="wxMenu/{ids}/{userId}";
        public static final String api_getWxMenuNoPage="wxMenu/listNoPage";
        public static final String api_getWxMenus="wxMenu/list";
        public static final String api_getById="wxMenu/{id}";
        public static final String api_getParentMenu="parentMenu/{wechatId}";
        public static final String api_createMenu="createMenu";
        public static final String api_getChildMenus="childMenu/list/{parentId}";
    }
    //微信模板消息
    public static class Template {
        public static final String api_create="template";
        public static final String api_update="template";
        public static final String api_delete="template/{ids}";
        public static final String api_getWxTemplatesNoPage="template/listNoPage";
        public static final String api_getWxTemplates="template/list";
        public static final String api_getById="template/{id}";
        public static final String api_sendTemplateMessage="sendTemplateMessage";
    }
    //微信配置表
    public static class Config {
        public static final String api_create="wechatConfig";
        public static final String api_update="wechatConfig";
        public static final String api_delete="wechatConfig/{ids}";
        public static final String api_getWechatNoPage="wechatConfig/listNoPage";
        public static final String api_getWechats="wechatConfig/list";
        public static final String api_getById="wechatConfig/{id}";
    }
    //微信图文消息
    public static class GraphicMessage {
        public static final String api_create="graphicMessage";
        public static final String api_update="graphicMessage";
        public static final String api_delete="graphicMessage/{ids}";
        public static final String api_getWxGraphicMessageNoPage="graphicMessage/listNoPage";
        public static final String api_getWxGraphicMessages="graphicMessage/list";
        public static final String api_getById="graphicMessage/{id}";
        public static final String api_sendGraphicMessages="sendGraphicMessages";
    }
}

+ 0 - 35
common/common-fegin/src/main/java/com/yihu/jw/common/iot/DataConstants.java

@ -1,35 +0,0 @@
package com.yihu.jw.common.iot;
public class DataConstants {
    public static final String api_iot_common = "/svr-iot";
    //数据标准转换
    public static class DataConvert{
        public static final String api_common = api_iot_common + "/dataConvert";
        public static final String api_convert = "/convert";
    }
    //数据上传常量
    public static class DataInput {
        public static final String api_common = api_iot_common + "/dataInput";
        public static final String api_bind_user = "/userBind";
        public static final String api_upload_data = "/input";
        public static final String api_upload_weRunData = "/inputWeRunData";
    }
    /**
     * 数据查询
     */
    public static class DataSearch{
        public static final String api_common = api_iot_common + "/dataSearch";
        public static final String api_data_search_one = "/getById";
        public static final String api_user_search_list = "/searchList";
        public static final String api_user_search_list_page = "/listPage";
        public static final String api_user_search_recent5 = "/recent5";
        public static final String api_user_search_recent1 = "/recent1";
        public static final String api_user_abnormal_times_a_week = "/abnormalTimes";
        public static final String api_user_search_list_code_del = "/searchListByCodeAndDel";
    }
}

+ 0 - 25
common/common-fegin/src/main/java/com/yihu/jw/common/iot/IotCommonContants.java

@ -1,25 +0,0 @@
package com.yihu.jw.common.iot;
/**
 * @author yeshijie on 2018/1/20.
 */
public class IotCommonContants {
    public static final String api_iot_common = "svr-iot";
    public static final Integer api_iot_fail = -1;
    /**
     * 公共模块
     */
    public static class Common{
        public static final String company = api_iot_common + "/wg/company";
        public static final String system_dict = api_iot_common + "/wg/systemDict";
        public static final String file_upload = api_iot_common + "/wg/fileUpload";
        public static final String product = api_iot_common + "/wg/product";
        public static final String order = api_iot_common + "/wg/order";
        public static final String device = api_iot_common + "/wg/device";
        public static final String quality = api_iot_common + "/wg/quality";
        public static final String patientDevice = api_iot_common + "/wg/patientDevice";
    }
}

+ 0 - 50
common/common-fegin/src/main/java/com/yihu/jw/common/wlyy/AgreementContants.java

@ -1,50 +0,0 @@
package com.yihu.jw.common.wlyy;
/**
 * Created by Administrator on 2017/6/2 0002.
 */
public class AgreementContants {
    public static final String wlyy = "wlyy";
    //协议常量
    public static class Agreement {
        public static final String api_common = wlyy + "/agreement";
        public static final String api_create = "create";
        public static final String api_update = "update";
        public static final String api_delete = "delete";
        public static final String api_getByCode = "getByCode";
        public static final String api_queryPage = "queryPage";
        public static final String api_getList = "getList";
    }
    //套餐指标
    public static class AgreementKpi {
        public static final String api_common = wlyy + "/agreementKpi";
        public static final String api_create = "create";
        public static final String api_update = "update";
        public static final String api_delete = "delete";
        public static final String api_getByCode = "getByCode";
        public static final String api_queryPage = "queryPage";
        public static final String api_getList = "getList";
    }
    //套餐指标日志
    public static class AgreementKpiLog {
        public static final String api_common = wlyy + "/agreementKpiLog";
        public static final String api_create = "create";
        public static final String api_getByCode = "getByCode";
        public static final String api_queryPage = "queryPage";
        public static final String api_getList = "getList";
    }
    //签约
    public static class SignFamily {
        public static final String api_common = wlyy + "/signFamily";
        public static final String api_create = "create";
        public static final String api_update = "update";
        public static final String api_delete = "delete";
        public static final String api_getByCode = "getByCode";
        public static final String api_queryPage = "queryPage";
        public static final String api_getList = "getList";
    }
}

+ 0 - 19
common/common-fegin/src/main/java/com/yihu/jw/common/wlyy/PatientContants.java

@ -1,19 +0,0 @@
package com.yihu.jw.common.wlyy;
/**
 * Created by Administrator on 2017/6/6 0006.
 */
public class PatientContants {
    public static class Advertisement{
        public static final String api_common="wlyyAdvertisement";
        public static final String api_create="create";
        public static final String api_delete="delete";
        public static final String api_getByCode="getByCode";
        public static final String api_update="update";
        public static final String api_queryPage="queryPage";
        public static final String api_getList="getList";
        public static final String api_getListByPatientCode="getListByPatientCode";
        public static final String api_getListByHttp="getListByHttp";
        public static final String api_getListByIp="getListByIp";
    }
}

+ 0 - 24
common/common-fegin/src/main/java/com/yihu/jw/fegin/DemoFeign.java

@ -1,24 +0,0 @@
package com.yihu.jw.fegin;
import com.yihu.jw.fegin.fallbackfactory.DemoFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * Created by chenweida on 2017/5/10.
 */
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        // ,fallback = PatientFeginFallback.class// fallback是请求超时或者错误的回调函数
        ,fallbackFactory  = DemoFeignFallbackFactory.class
//        ,configuration =   //可以配置当个fegin的配置 例如禁用单个feign的hystrix
)
public interface DemoFeign {
    @RequestMapping(value = "/demo/findByCode", method = RequestMethod.GET)
    String findByCode(@RequestParam(value = "code", required = true) String code);
}

+ 0 - 39
common/common-fegin/src/main/java/com/yihu/jw/fegin/archives/ArchivesFeign.java

@ -1,39 +0,0 @@
package com.yihu.jw.fegin.archives;
import com.yihu.jw.fegin.fallbackfactory.archives.ArchivesFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.archives.PatientArchivesInfoVO;
import com.yihu.jw.restmodel.archives.PatientArchivesVO;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.archives.PatientArchivesMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;
/**
 * Created by Trick on 2018/2/12.
 */
@FeignClient(
        name = CommonContants.svr_archives // name值是eurika的实例名字
        ,fallbackFactory  = ArchivesFallbackFactory.class
)
@RequestMapping(PatientArchivesMapping.api_archives_common)
public interface ArchivesFeign {
    @GetMapping(value = PatientArchivesMapping.Archives.findPatientArchives)
    public MixEnvelop<PatientArchivesVO, PatientArchivesVO> findPatientArchives(@RequestParam(value = "name", required = false)String name,
                                                             @RequestParam(value = "status", required = false)String status,
                                                             @RequestParam(value = "cancelReseanType", required = false)String cancelReseanType,
                                                             @RequestParam(value = "page", required = false)Integer page,
                                                             @RequestParam(value = "size", required = false )Integer size);
    @GetMapping(value = PatientArchivesMapping.Archives.findPatientArchivesInfos)
    public MixEnvelop<PatientArchivesInfoVO, PatientArchivesInfoVO> queryPatientArchivesInfoPage(@RequestParam(value = "code", required = false)String code);
    @PostMapping(value = PatientArchivesMapping.Archives.createPatientArchives)
    public MixEnvelop<Boolean, Boolean> createPatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                     @RequestParam(value = "list", required = true)String list);
    @PutMapping(value = PatientArchivesMapping.Archives.updatePatientArchives)
    public MixEnvelop<Boolean, Boolean> updatePatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                     @RequestParam(value = "list", required = true)String list);
}

+ 0 - 44
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/login/LoginFeign.java

@ -1,44 +0,0 @@
package com.yihu.jw.fegin.base.login;
import com.yihu.jw.fegin.fallbackfactory.base.base.LoginFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.rm.base.BaseLoginRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * Created by 刘文彬 on 2018/4/20.
 */
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = LoginFeignFallbackFactory.class
)
@RequestMapping(value = BaseLoginRequestMapping.api_common)
public interface LoginFeign {
    @PostMapping(value = BaseLoginRequestMapping.BaseLoginAccount.api_checkoutInfo, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop checkoutInfo(@RequestParam(value = "ssc", required = true) String ssc, @RequestParam(value = "idcard", required = true) String idcard);
    @PostMapping(value = BaseLoginRequestMapping.BaseLoginAccount.api_accountSub, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop register(
            @RequestParam(value = "mobilePhone", required = true) String mobilePhone,
            @RequestParam(value = "saasId", required = true) String saasId,
            @RequestParam(value = "type", required = true) int type,
            @RequestParam(value = "captcha", required = true) String captcha,
            @RequestParam(value = "name", required = true) String name,
            @RequestParam(value = "password", required = true) String password,
            @RequestParam(value = "idcard", required = true) String idcard,
            @RequestParam(value = "ssc", required = true) String ssc);
    @PostMapping(value = BaseLoginRequestMapping.BaseLoginAccount.api_login, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop login(@RequestParam(value = "mobilePhone", required = false) String mobilePhone,
                     @RequestParam(value = "password", required = false) String password,
                     @RequestParam(value = "saasId", required = true) String saasId,
                     @RequestParam(value = "captcha", required = false) String captcha);
}

+ 0 - 28
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/sms/RegisterSmsFeign.java

@ -1,28 +0,0 @@
package com.yihu.jw.fegin.base.sms;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.rm.base.BaseSmsRequestMapping;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.io.IOException;
/**
 * Created by 刘文彬 on 2018/4/23.
 */
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
)
@RequestMapping(value = BaseSmsRequestMapping.api_common)
public interface RegisterSmsFeign {
    @PostMapping(value = BaseSmsRequestMapping.Sms.api_sms_send, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop send(@ApiParam(name = "mobile", value = "手机号码", required = true) @RequestParam(value = "mobile", required = true) String mobile,
                 @ApiParam(name = "type", value = "短信验证码类型", required = true) @RequestParam(value = "type", required = true) int type,
                 @ApiParam(name = "saasId", value = "saasId", required = true) @RequestParam(value = "saasId", required = true) String saasId) throws IOException ;
    }

+ 0 - 65
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/BaseMenuFeign.java

@ -1,65 +0,0 @@
package com.yihu.jw.fegin.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.user.BaseMenuFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.BaseUserRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
/**
 * Created by LiTaohong on 2017/12/05.
 */
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = BaseMenuFeignFallbackFactory.class
)
public interface BaseMenuFeign {
    
    @RequestMapping(value = BaseUserRequestMapping.BaseMenu.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    MixEnvelop create(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseUserRequestMapping.BaseMenu.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseUserRequestMapping.BaseMenu.api_delete,method = RequestMethod.DELETE)
    MixEnvelop delete(@PathVariable(value = "id") String id) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseMenu.api_getOne)
    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseMenu.api_getList, method = RequestMethod.GET)
    MixEnvelop getList(@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) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseMenu.api_getListNoPage)
    MixEnvelop getListNoPage(@RequestParam(value = "fields", required = false) String fields,
                             @RequestParam(value = "filters", required = false) String filters,
                             @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseMenu.api_getchildren)
    MixEnvelop getChildren(@RequestParam(value = "saasId", required = true) String saasId, @RequestParam(value = "parentId", required = true) String parentId) throws JiWeiException;
}

+ 0 - 63
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/BaseRoleFeign.java

@ -1,63 +0,0 @@
package com.yihu.jw.fegin.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.user.BaseRoleFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.BaseUserRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
/**
 * Created by LiTaohong on 2017/11/28.
 */
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = BaseRoleFeignFallbackFactory.class
)
@RequestMapping(BaseUserRequestMapping.api_user_common)
public interface BaseRoleFeign {
    @RequestMapping(value = BaseUserRequestMapping.BaseRole.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    MixEnvelop create(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRole.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.PUT)
    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRole.api_delete, method = RequestMethod.DELETE)
    MixEnvelop delete(@PathVariable(value = "id") String id) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseRole.api_getById)
    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRole.api_getListPage, method = RequestMethod.GET)
    MixEnvelop getList(
            @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) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseRole.api_getlistNoPage)
    MixEnvelop getListNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRoleMenu.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    MixEnvelop createRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRoleMenu.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    MixEnvelop updateRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRoleMenu.api_delete, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    MixEnvelop deleteRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRoleMenu.api_getListNoPage, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    MixEnvelop getMenuList(@RequestBody String jsonData) throws JiWeiException;
    @PostMapping(value = BaseUserRequestMapping.BaseRole.api_getRoleByPhoneAndSaasId, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop getPhoneAndSaasId(@RequestParam(value = "phone", required = true) String phone, @RequestParam(value = "saasId", required = true) String saasId);
}

+ 0 - 63
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/EmployFeign.java

@ -1,63 +0,0 @@
package com.yihu.jw.fegin.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.user.EmployeeFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.BaseUserRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
/**
 * Created by LiTaohong on 2017/11/30.
 */
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = EmployeeFeignFallbackFactory.class
)
@RequestMapping(value = BaseUserRequestMapping.api_user_common)
public interface EmployFeign {
    @RequestMapping(value = BaseUserRequestMapping.BaseEmploy.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    MixEnvelop create(@RequestBody String jsonData);
    @RequestMapping(value =  BaseUserRequestMapping.BaseEmploy.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseUserRequestMapping.BaseEmploy.api_delete,method = RequestMethod.DELETE)
    MixEnvelop delete(@PathVariable (value = "id") String id) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseEmploy.api_getById)
    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmploy.api_getListBySaasId, method = RequestMethod.GET)
    MixEnvelop getList(
            @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) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseEmploy.api_getListNoPage)
    MixEnvelop getListNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmployRole.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    MixEnvelop createEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmployRole.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    MixEnvelop updateEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmployRole.api_delete,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    MixEnvelop deleteEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmployRole.api_getListNoPage,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    MixEnvelop getRoleList(@RequestBody String jsonData) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseEmploy.api_getByPhone)
    MixEnvelop getEmployeeByPhoneAndSaasId(@RequestParam(value = "phone", required = true) String phone, @RequestParam(value = "saasId", required = true) String saasId);
}

+ 0 - 19
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/version/UserVersionFeign.java

@ -1,19 +0,0 @@
package com.yihu.jw.fegin.base.version;
import com.yihu.jw.fegin.fallbackfactory.base.version.UserVersionFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
/**
 * Created by chenweida on 2017/11/13.
 */
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = UserVersionFeignFallbackFactory.class
)
@RequestMapping(value = BaseRequestMapping.api_base_common)
public interface UserVersionFeign {
}

+ 0 - 25
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/AccessTokenFeign.java

@ -1,25 +0,0 @@
package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.fegin.fallbackfactory.base.wx.AccessTokenFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * Created by Administrator on 2017/5/31 0031.
 */
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = AccessTokenFeignFallbackFactory.class
)
@RequestMapping(value =  WechatRequestMapping.api_common)
public interface AccessTokenFeign {
    @RequestMapping(value = WechatRequestMapping.WxAccessToken.api_get, method = RequestMethod.GET)
    MixEnvelop getWxAccessToken(@RequestParam(value = "wechatId") String wechatId) ;
}

+ 0 - 57
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/GraphicMessageFeign.java

@ -1,57 +0,0 @@
package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.wx.GraphicMessageFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * Created by Administrator on 2017/5/31 0031.
 */
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = GraphicMessageFeignFallbackFactory.class
)
@RequestMapping(value = WechatRequestMapping.api_common)
public interface GraphicMessageFeign {
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_create, method = RequestMethod.POST,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop createWxGraphicMessage(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_update,method = RequestMethod.PUT,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop updateWxGraphicMessage(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_delete,method = RequestMethod.DELETE)
    MixEnvelop deleteWxGraphicMessage(@RequestParam(value = "ids") String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_getById,method = RequestMethod.GET)
    MixEnvelop findById(@RequestParam(value = "id") String id) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_getWxGraphicMessages,method = RequestMethod.GET)
    MixEnvelop getWxGraphicMessages(
            @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) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_getWxGraphicMessageNoPage,method = RequestMethod.GET)
    MixEnvelop getWxGraphicMessageNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_sendGraphicMessages,method = RequestMethod.GET)
    String sendGraphicMessages(
            @RequestParam(value = "ids", required = true) String ids,
            @RequestParam(value = "fromUserName", required = true) String fromUserName,
            @RequestParam(value = "toUserName", required = true) String toUserName
    );
}

+ 0 - 40
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatFeign.java

@ -1,40 +0,0 @@
package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.wx.WechatFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = WechatFeignFallbackFactory.class
)
@RequestMapping(value = WechatRequestMapping.api_common)
public interface WechatFeign {
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_create, method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop createWechat(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_update, method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop updateWechat(String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_delete,method = RequestMethod.DELETE)
    MixEnvelop deleteWechat(@RequestParam(value = "ids") String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_getById,method = RequestMethod.GET)
    MixEnvelop findById(@RequestParam(value = "id") String id) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_getWechats ,method = RequestMethod.GET)
    MixEnvelop getWechats(@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) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_getWechatNoPage,method = RequestMethod.GET )
    MixEnvelop getWechatNoPage(@RequestParam(value = "fields")String fields, @RequestParam(value = "filters") String filters, @RequestParam(value = "sorts") String sorts) throws JiWeiException;
}

+ 0 - 56
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatMenuFeign.java

@ -1,56 +0,0 @@
package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.wx.WechatMenuFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
/**
 * Created by Administrator on 2017/5/31 0031.
 */
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = WechatMenuFeignFallbackFactory.class
)
@RequestMapping(value = WechatRequestMapping.api_common)
public interface WechatMenuFeign {
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_create,method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop createWxMenu(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_update,method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop updateWxMenu(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_delete,method = RequestMethod.DELETE)
    MixEnvelop deleteWxMenu(@RequestParam(value="ids")String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_getById,method = RequestMethod.GET)
    MixEnvelop findById(@RequestParam(value="id")String id) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_getWxMenuNoPage,method = RequestMethod.GET)
    MixEnvelop getWxMenuNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_getWxMenus,method = RequestMethod.GET)
    MixEnvelop getWxMenus(
            @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) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_createMenu ,method = RequestMethod.GET)
    MixEnvelop createWechatMenu(@RequestParam(value = "wechatId", required = true)String wechatId);
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_getParentMenu,method = RequestMethod.GET)
    MixEnvelop getParentMenu(@PathVariable(value = "wechatId", required = true) String wechatId) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_getChildMenus,method = RequestMethod.GET)
    MixEnvelop getChildMenus(@PathVariable(value = "parentId", required = true) String parentId) throws JiWeiException;
}

+ 0 - 58
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatTemplateFeign.java

@ -1,58 +0,0 @@
package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.wx.WechatTemplateFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
/**
 * Created by Administrator on 2017/5/31 0031.
 */
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = WechatTemplateFeignFallbackFactory.class
)
@RequestMapping(value = WechatRequestMapping.api_common)
public interface WechatTemplateFeign {
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_create ,method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop createWxTemplate(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_update ,method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop updateWxTemplate(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_delete ,method = RequestMethod.DELETE)
    MixEnvelop deleteWxTemplate(@RequestParam(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_getById ,method = RequestMethod.GET)
    MixEnvelop findById(@RequestParam(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_getWxTemplatesNoPage ,method = RequestMethod.GET)
    MixEnvelop getWechatNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_getWxTemplates, method = RequestMethod.GET)
    MixEnvelop getWechats(
            @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) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_sendTemplateMessage ,method = RequestMethod.GET)
    @ResponseBody
    MixEnvelop sendTemplateMessage(
            @RequestParam(value="openid") String openid,
            @RequestParam(value="templateId") String templateId,
            @RequestParam(value="url",required = false) String url,
            @RequestParam(value="appid",required = false) String appid,
            @RequestParam(value="pagepath",required = false) String pagepath,
            @RequestParam(value="data") String data
    );
}

+ 0 - 23
common/common-fegin/src/main/java/com/yihu/jw/fegin/common/security/LoginSmsFeign.java

@ -1,23 +0,0 @@
package com.yihu.jw.fegin.common.security;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.rm.base.BaseLoginRequestMapping;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * Created by 刘文彬 on 2018/4/23.
 */
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
)
@RequestMapping(value = BaseRequestMapping.api_base_common)
public interface LoginSmsFeign {
    @GetMapping(BaseLoginRequestMapping.BaseLoginAccount.mobileSendSms)
    void createCode(HttpServletRequest request,HttpServletResponse response)throws Exception;
}

+ 0 - 21
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/DemoFeignFallbackFactory.java

@ -1,21 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory;
import com.yihu.jw.fegin.DemoFeign;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
/**
 * Created by chenweida on 2017/5/15.
 */
@Component
public class DemoFeignFallbackFactory implements FallbackFactory<DemoFeign> {
    @Override
    public DemoFeign create(Throwable e) {
        return new DemoFeign() {
            public String findByCode(String code) {
                return "启动断路器"+e.getMessage() ;
            }
        };
    }
}

+ 0 - 64
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/archives/ArchivesFallbackFactory.java

@ -1,64 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.archives;
import com.yihu.jw.fegin.archives.ArchivesFeign;
import com.yihu.jw.restmodel.archives.PatientArchivesInfoVO;
import com.yihu.jw.restmodel.archives.PatientArchivesVO;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * Created by Trick on 2018/2/22.
 */
@Component
public class ArchivesFallbackFactory implements FallbackFactory<ArchivesFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public ArchivesFeign create(Throwable e){
        return new ArchivesFeign() {
            @Override
            public MixEnvelop<PatientArchivesVO, PatientArchivesVO> findPatientArchives(@RequestParam(value = "name", required = false)String name,
                                                                     @RequestParam(value = "status", required = false)String status,
                                                                     @RequestParam(value = "cancelReseanType", required = false)String cancelReseanType,
                                                                     @RequestParam(value = "page", required = false)Integer page,
                                                                     @RequestParam(value = "size", required = false )Integer size){
                tracer.getCurrentSpan().logEvent("查找档案列表失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("name:" + name);
                tracer.getCurrentSpan().logEvent("status:" + status);
                tracer.getCurrentSpan().logEvent("cancelReseanType:" + cancelReseanType);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("size:" + size);
                return null;
            }
            @Override
            public MixEnvelop<PatientArchivesInfoVO, PatientArchivesInfoVO> queryPatientArchivesInfoPage(@RequestParam(value = "code", required = false)String code){
                tracer.getCurrentSpan().logEvent("查找档案详情接口失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("code:" + code);
                return null;
            }
            @Override
            public MixEnvelop<Boolean, Boolean> createPatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                             @RequestParam(value = "list", required = true)String list){
                tracer.getCurrentSpan().logEvent("创建失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patientArchives:" + patientArchives);
                tracer.getCurrentSpan().logEvent("list:" + list);
                return null;
            }
            @Override
            public MixEnvelop<Boolean, Boolean> updatePatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                             @RequestParam(value = "list", required = true)String list){
                tracer.getCurrentSpan().logEvent("更新档案失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patientArchives:" + patientArchives);
                tracer.getCurrentSpan().logEvent("list:" + list);
                return null;
            }
        };
    }
}

+ 0 - 80
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/FunctionFeignFallbackFactory.java

@ -1,80 +0,0 @@
//package com.yihu.jw.fegin.fallbackfactory.base.base;
//
//import com.yihu.jw.exception.business.JiWeiException;
//import com.yihu.jw.fegin.base.base.FunctionFeign;
//import com.yihu.jw.restmodel.web.MixEnvelop;
//import feign.hystrix.FallbackFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.cloud.sleuth.Tracer;
//import org.springframework.stereotype.Component;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestParam;
//
//@Component
//public class FunctionFeignFallbackFactory implements FallbackFactory<FunctionFeign> {
//
//
//    @Autowired
//    private Tracer tracer;
//
//    @Override
//    public FunctionFeign create(Throwable e) {
//        return new FunctionFeign() {
//            @Override
//            public MixEnvelop create(@RequestBody String jsonData) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("创建功能失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public MixEnvelop update(@RequestBody String jsonData) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("更新功能失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public MixEnvelop delete(@PathVariable String codes, @RequestParam String userCode, @RequestParam String userName) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("删除功能失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("codes:"+codes);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public MixEnvelop findById(String code) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("查找功能失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("code:"+code);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public MixEnvelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("分页查找功能失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("fields:" + fields);
//                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
//                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
//                tracer.getCurrentSpan().logEvent("size:" + size);
//                tracer.getCurrentSpan().logEvent("page:" + page);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public MixEnvelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("查找功能列表失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("fields:" + fields);
//                tracer.getCurrentSpan().logEvent("filters:" + filters);
//                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public MixEnvelop getChildren(String code) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("查找功能子项失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("code:" + code);
//                throw new JiWeiException(e);
//            }
//        };
//    }
//}

+ 0 - 69
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/LoginFeignFallbackFactory.java

@ -1,69 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.base.base;
import com.yihu.jw.fegin.base.login.LoginFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.status.EnvelopStatus;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
/**
 * Created by 刘文彬 on 2018/5/8.
 */
@Component
public class LoginFeignFallbackFactory implements FallbackFactory<LoginFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public LoginFeign create(Throwable e) {
        return new LoginFeign() {
            /**
             * 注册校验姓名、身份证、医保卡号信息
             * @param ssc
             * @param idcard
             * @return
             */
            @Override
            public Envelop checkoutInfo(String ssc, String idcard) {
                tracer.getCurrentSpan().logEvent("校验医保卡、身份证、手机号接口错误:原因:"+e.getMessage());
                return MixEnvelop.getError(e.getMessage(), EnvelopStatus.system_error.code);
            }
            /**
             *注册账号
             * @param mobilePhone
             * @param saasId
             * @param type
             * @param captcha
             * @param name
             * @param password
             * @param idcard
             * @param ssc
             * @return
             */
            @Override
            public MixEnvelop register(String mobilePhone, String saasId, int type, String captcha, String name, String password, String idcard, String ssc) {
                tracer.getCurrentSpan().logEvent("注册账号接口错误:原因:"+e.getMessage());
                return MixEnvelop.getError(e.getMessage(), EnvelopStatus.system_error.code);
            }
            /**
             * 登录账号
             * @param mobilePhone
             * @param password
             * @param saasId
             * @param captcha
             * @return
             */
            @Override
            public MixEnvelop login(String mobilePhone, String password, String saasId, String captcha) {
                tracer.getCurrentSpan().logEvent("登录账号接口错误:原因:"+e.getMessage());
                return MixEnvelop.getError(e.getMessage(), EnvelopStatus.system_error.code);
            }
        };
    }
}

+ 0 - 94
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/ModuleFeignFallbackFactory.java

@ -1,94 +0,0 @@
//package com.yihu.jw.fegin.fallbackfactory.base.base;
//
//import com.yihu.jw.exception.business.JiWeiException;
//import com.yihu.jw.fegin.base.base.ModuleFeign;
//import com.yihu.jw.restmodel.common.Envelop;
//import feign.hystrix.FallbackFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.cloud.sleuth.Tracer;
//import org.springframework.stereotype.Component;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestParam;
//
//@Component
//public class ModuleFeignFallbackFactory implements FallbackFactory<ModuleFeign> {
//
//
//    @Autowired
//    private Tracer tracer;
//
//    @Override
//    public ModuleFeign create(Throwable e) {
//        return new ModuleFeign() {
//            @Override
//            public Envelop create(@RequestBody String jsonData) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("创建模块失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public Envelop update(@RequestBody String jsonData) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("更新模块失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public Envelop delete(@PathVariable String codes, @RequestParam String userCode, @RequestParam String userName) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("删除模块失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("codes:"+codes);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public Envelop findById(String id) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("查找模块失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("id:"+id);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public Envelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("分页查找模块失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("fields:" + fields);
//                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
//                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
//                tracer.getCurrentSpan().logEvent("size:" + size);
//                tracer.getCurrentSpan().logEvent("page:" + page);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public Envelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("查找模块列表失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("fields:" + fields);
//                tracer.getCurrentSpan().logEvent("filters:" + filters);
//                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public Envelop getChildren(String code) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("查找模块子项失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("code:" + code);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public Envelop getExistFunc(@PathVariable(value = "code") String code) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("查找模块已关联的功能失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("code:" + code);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public Envelop changeFun(@RequestBody String jsonData) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("更新已有模块功能失败:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
//                throw new JiWeiException(e);
//            }
//        };
//    }
//}

+ 0 - 26
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SaasFeignFallbackFactory.java

@ -1,26 +0,0 @@
//package com.yihu.jw.fegin.fallbackfactory.base.base;
//
//import com.yihu.jw.fegin.base.base.SaasFeign;
//import com.yihu.jw.restmodel.common.Envelop;
//import feign.hystrix.FallbackFactory;
//import org.springframework.stereotype.Component;
//import org.springframework.web.bind.annotation.RequestParam;
//
//@Component
//public class SaasFeignFallbackFactory implements FallbackFactory<SaasFeign> {
//
//    @Override
//    public SaasFeign create(Throwable throwable) {
//        return  new SaasFeign() {
//            @Override
//            public Envelop getList(@RequestParam(value = "fields") String fields, @RequestParam(value = "filters") String filters, @RequestParam(value = "sorts") String sorts) {
//                return null;
//            }
//
//            @Override
//            public Envelop findByCode(@RequestParam(value = "id") String id) {
//                return null;
//            }
//        };
//    }
//}

+ 0 - 73
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SystemDictFeignFallbackFactory.java

@ -1,73 +0,0 @@
//package com.yihu.jw.fegin.fallbackfactory.base.base;
//
//import com.yihu.jw.exception.business.JiWeiException;
//import com.yihu.jw.fegin.base.base.SystemDictFeign;
//import com.yihu.jw.restmodel.common.Envelop;
//import feign.hystrix.FallbackFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.cloud.sleuth.Tracer;
//import org.springframework.stereotype.Component;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestParam;
//
//@Component
//public class SystemDictFeignFallbackFactory implements FallbackFactory<SystemDictFeign> {
//
//    @Autowired
//    private Tracer tracer;
//
//    @Override
//    public SystemDictFeign create(Throwable e) {
//        return new SystemDictFeign() {
//            @Override
//            public Envelop create(@RequestBody String jsonData) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("创建系統字典失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public Envelop update(@RequestBody String jsonData) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("更新系統字典失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public Envelop delete(@PathVariable String codes, @RequestParam String userCode, @RequestParam String userName) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("删除系統字典失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("codes:"+codes);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public Envelop findById(String code) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("查找系統字典失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("code:"+code);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public Envelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("分页查找系統字典失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("fields:" + fields);
//                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
//                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
//                tracer.getCurrentSpan().logEvent("size:" + size);
//                tracer.getCurrentSpan().logEvent("page:" + page);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public Envelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("查找系統字典列表失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("fields:" + fields);
//                tracer.getCurrentSpan().logEvent("filters:" + filters);
//                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
//                throw new JiWeiException(e);
//            }
//
//        };
//    }
//}

+ 0 - 79
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SystemDictListFeignFallbackFactory.java

@ -1,79 +0,0 @@
//package com.yihu.jw.fegin.fallbackfactory.base.base;
//
//import com.yihu.jw.exception.business.JiWeiException;
//import com.yihu.jw.fegin.base.base.SystemDictListFeign;
//import com.yihu.jw.restmodel.web.MixEnvelop;
//import feign.hystrix.FallbackFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.cloud.sleuth.Tracer;
//import org.springframework.stereotype.Component;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestParam;
//
//@Component
//public class SystemDictListFeignFallbackFactory implements FallbackFactory<SystemDictListFeign> {
//
//    @Autowired
//    private Tracer tracer;
//
//    @Override
//    public SystemDictListFeign create(Throwable e) {
//        return new SystemDictListFeign() {
//            @Override
//            public MixEnvelop create(@RequestBody String jsonData) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("创建系統字典集合失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public MixEnvelop update(@RequestBody String jsonData) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("更新系統字典集合失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public MixEnvelop delete(@PathVariable String codes, @RequestParam String userCode, @RequestParam String userName) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("删除系統字典集合失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("codes:"+codes);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public MixEnvelop findById(String code) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("查找系統字典集合失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("code:"+code);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public MixEnvelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("分页查找系統字典集合失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("fields:" + fields);
//                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
//                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
//                tracer.getCurrentSpan().logEvent("size:" + size);
//                tracer.getCurrentSpan().logEvent("page:" + page);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public MixEnvelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("查找系統字典集合列表失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("fields:" + fields);
//                tracer.getCurrentSpan().logEvent("filters:" + filters);
//                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
//                throw new JiWeiException(e);
//            }
//
//            @Override
//            public MixEnvelop getChildren(String code) throws JiWeiException {
//                tracer.getCurrentSpan().logEvent("查找系統字典子项失败:原因:"+e.getMessage());
//                tracer.getCurrentSpan().logEvent("code:" + code);
//                throw new JiWeiException(e);
//            }
//        };
//    }
//}

+ 0 - 83
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/BaseMenuFeignFallbackFactory.java

@ -1,83 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.user.BaseMenuFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
/**
 * Created by LiTaohong on 2017/11/28.
 */
@Component
public class BaseMenuFeignFallbackFactory implements FallbackFactory<BaseMenuFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public BaseMenuFeign create(Throwable e) {
        return new BaseMenuFeign() {
            @Override
            public MixEnvelop create(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop update(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop delete(@PathVariable String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找单个菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                tracer.getCurrentSpan().logEvent("size:" + size);
                tracer.getCurrentSpan().logEvent("page:" + page);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找菜单列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getChildren(String saasId, String parentId) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找子菜单列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("filters:" + saasId);
                tracer.getCurrentSpan().logEvent("sorts:" + parentId);
                throw new JiWeiException(e);
            }
        };
    }
}

+ 0 - 108
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/BaseRoleFeignFallbackFactory.java

@ -1,108 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.user.BaseRoleFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
/**
 * Created by LiTaohong on 2017/11/28.
 */
@Component
public class BaseRoleFeignFallbackFactory implements FallbackFactory<BaseRoleFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public BaseRoleFeign create(Throwable e) {
        return new BaseRoleFeign() {
            @Override
            public MixEnvelop create(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop update(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop delete(@PathVariable String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找单个角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找角色列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                tracer.getCurrentSpan().logEvent("size:" + size);
                tracer.getCurrentSpan().logEvent("page:" + page);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("不分页查找角色列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop createRoleMenus(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建角色菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop updateRoleMenus(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("修改角色菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop deleteRoleMenus(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除角色菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getMenuList(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("获取角色菜单列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getPhoneAndSaasId(String phone, String saasId) {
                return null;
            }
        };
    }
}

+ 0 - 106
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/EmployeeFeignFallbackFactory.java

@ -1,106 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.user.EmployFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
/**
 * Created by chenweida on 2017/11/29.
 */
@Component
public class EmployeeFeignFallbackFactory  implements FallbackFactory<EmployFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public EmployFeign create(Throwable e) {
        return new EmployFeign() {
            @Override
            public MixEnvelop create(@RequestBody String jsonData){
                tracer.getCurrentSpan().logEvent("创建用户失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                return null;
            }
            @Override
            public MixEnvelop update(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新用户失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop delete(@PathVariable String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除用户失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找单个用户失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getList(String fields, String filterStr, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找用户失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filterStr);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                tracer.getCurrentSpan().logEvent("size:" + size);
                tracer.getCurrentSpan().logEvent("page:" + page);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("不分页查找用户列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop createEmployRoles(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("新增用户角色列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop updateEmployRoles(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("修改用户角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop deleteEmployRoles(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除用户角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getRoleList(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("获取用户角色列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getEmployeeByPhoneAndSaasId(String phone, String saasId){
                return null;
            }
        };
    }
}

+ 0 - 16
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/version/UserVersionFeignFallbackFactory.java

@ -1,16 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.base.version;
import com.yihu.jw.fegin.base.version.UserVersionFeign;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
/**
 * Created by chenweida on 2017/11/13.
 */
@Component
public class UserVersionFeignFallbackFactory implements FallbackFactory<UserVersionFeign> {
    @Override
    public UserVersionFeign create(Throwable cause) {
        return null;
    }
}

+ 0 - 24
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/AccessTokenFeignFallbackFactory.java

@ -1,24 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.base.wx;
import com.yihu.jw.fegin.base.wx.AccessTokenFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * Created by Administrator on 2017/5/31 0031.
 */
@Component
public class AccessTokenFeignFallbackFactory implements FallbackFactory<AccessTokenFeign> {
    @Override
    public AccessTokenFeign create(Throwable throwable) {
        return new AccessTokenFeign() {
            @Override
            public MixEnvelop getWxAccessToken(@RequestParam(value = "wechatCode") String wechatCode) {
                return null;
            }
        };
    }
}

+ 0 - 79
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/GraphicMessageFeignFallbackFactory.java

@ -1,79 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.wx.GraphicMessageFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * Created by Administrator on 2017/5/31 0031.
 */
@Component
public class GraphicMessageFeignFallbackFactory implements FallbackFactory<GraphicMessageFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public GraphicMessageFeign create(Throwable e) {
        return new GraphicMessageFeign() {
            @Override
            public MixEnvelop createWxGraphicMessage(@RequestParam(value = "jsonData") String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建微信图文消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop updateWxGraphicMessage(@RequestParam(value = "jsonData") String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新微信图文消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop deleteWxGraphicMessage(String codes, String userCode, String userName) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("codes:"+codes);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("根据code查找微信图文消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getWxGraphicMessages(@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) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找微信图文消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                tracer.getCurrentSpan().logEvent("size:" + size);
                tracer.getCurrentSpan().logEvent("page:" + page);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getWxGraphicMessageNoPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信图文消息列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                throw new JiWeiException(e);
            }
            @Override
            public String sendGraphicMessages(@RequestParam(value = "codes", required = true) String codes, @RequestParam(value = "fromUserName", required = true) String fromUserName, @RequestParam(value = "toUserName", required = true) String toUserName) {
                return null;
            }
        };
    }
}

+ 0 - 65
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatFeignFallbackFactory.java

@ -1,65 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.wx.WechatFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
@Component
public class WechatFeignFallbackFactory implements FallbackFactory<WechatFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public WechatFeign create(Throwable e) {
        return new WechatFeign() {
            public MixEnvelop createWechat(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            public MixEnvelop updateWechat(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            public MixEnvelop deleteWechat(String codes, String userCode, String userName) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("codes:"+codes);
                throw new JiWeiException(e);
            }
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            public MixEnvelop getWechats(String fields, String filters, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                tracer.getCurrentSpan().logEvent("size:" + size);
                tracer.getCurrentSpan().logEvent("page:" + page);
                throw new JiWeiException(e);
            }
            public MixEnvelop getWechatNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信配置列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                throw new JiWeiException(e);
            }
        };
    }
}

+ 0 - 95
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatMenuFeignFallbackFactory.java

@ -1,95 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.wx.WechatMenuFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
/**
 * Created by Administrator on 2017/5/31 0031.
 */
@Component
public class WechatMenuFeignFallbackFactory implements FallbackFactory<WechatMenuFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public WechatMenuFeign create(Throwable e) {
        return new WechatMenuFeign() {
            @Override
            public MixEnvelop createWxMenu(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建微信菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop updateWxMenu(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新微信菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop deleteWxMenu(String codes, String userCode, String userName) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除微信菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("codes:"+codes);
                tracer.getCurrentSpan().logEvent("操作人userCode:"+userCode);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getWxMenuNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信菜单列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop createWechatMenu(String wechatCode) {
                return null;
            }
            @Override
            public MixEnvelop getParentMenu(@PathVariable String wechatCode) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("根据微信code查找父菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("wechatCode:"+wechatCode);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getChildMenus(@PathVariable(value = "parentCode", required = true) String parentCode) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("根据父级菜单code查找子菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("parentCode:"+parentCode);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getWxMenus(String fields, String filters, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找微信菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                tracer.getCurrentSpan().logEvent("size:" + size);
                tracer.getCurrentSpan().logEvent("page:" + page);
                throw new JiWeiException(e);
            }
        };
    }
}

+ 0 - 77
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatTemplateFeignFallbackFactory.java

@ -1,77 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.base.wx.WechatTemplateFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
/**
 * Created by Administrator on 2017/5/31 0031.
 */
@Component
public class WechatTemplateFeignFallbackFactory implements FallbackFactory<WechatTemplateFeign>{
    @Autowired
    private Tracer tracer;
    @Override
    public WechatTemplateFeign create(Throwable e) {
        return new WechatTemplateFeign() {
            @Override
            public MixEnvelop createWxTemplate(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建微信模板消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop updateWxTemplate(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新微信模板消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop deleteWxTemplate(String codes, String userCode, String userName) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除微信模板消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("codes:"+codes);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("根据code查找微信模板消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop sendTemplateMessage(String openid, String templateCode, String url, String appid, String pagepath, String data) {
                return null;
            }
            @Override
            public MixEnvelop getWechatNoPage(String fields, String filters, String sorts) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信模板消息列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                throw new JiWeiException(e);
            }
            @Override
            public MixEnvelop getWechats(String fields, String filters, String sorts, int size, int page) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("分页查找微信模板消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("fields:" + fields);
                tracer.getCurrentSpan().logEvent("filters:" + filters);
                tracer.getCurrentSpan().logEvent("sorts:" + sorts);
                tracer.getCurrentSpan().logEvent("size:" + size);
                tracer.getCurrentSpan().logEvent("page:" + page);
                throw new JiWeiException(e);
            }
        };
    }
}

+ 0 - 54
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/common/IotFileUploadFallbackFactory.java

@ -1,54 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.iot.common;
import com.yihu.jw.fegin.iot.common.IotFileUploadFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
/**
 * @author yeshijie on 2018/01/20.
 */
@Component
public class IotFileUploadFallbackFactory implements FallbackFactory<IotFileUploadFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public IotFileUploadFeign create(Throwable e) {
        return new IotFileUploadFeign() {
            @Override
            public MixEnvelop<UploadVO, UploadVO> uploadImg(@RequestParam(value = "file", required = true) MultipartFile file) {
                tracer.getCurrentSpan().logEvent("文件流上传图片失败:原因:" + e.getMessage());
                return null;
            }
            @Override
            public MixEnvelop<UploadVO, UploadVO> uploadAttachment(@RequestParam(value = "file", required = true) MultipartFile file) {
                tracer.getCurrentSpan().logEvent("文件流上传附件失败:原因:" + e.getMessage());
                return null;
            }
            @Override
            public MixEnvelop<UploadVO, UploadVO> uploadStream(@RequestParam(value = "file", required = true) MultipartFile file) {
                tracer.getCurrentSpan().logEvent("文件流上传文件失败:原因:" + e.getMessage());
                return null;
            }
            @Override
            public MixEnvelop<UploadVO, UploadVO> uploadImages(@RequestBody String jsonData) {
                tracer.getCurrentSpan().logEvent("base64上传图片失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
        };
    }
}

+ 0 - 35
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/common/IotSystemDictFallbackFactory.java

@ -1,35 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.iot.common;
import com.yihu.jw.fegin.iot.common.IotSystemDictFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.dict.IotSystemDictVO;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @author yeshijie on 2018/1/20.
 */
@Component
public class IotSystemDictFallbackFactory implements FallbackFactory<IotSystemDictFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public IotSystemDictFeign create(Throwable e) {
        return new IotSystemDictFeign() {
            @Override
            public MixEnvelop<IotSystemDictVO, IotSystemDictVO> getList(@RequestParam(value = "dictName", required = true) String dictName) throws Exception {
                tracer.getCurrentSpan().logEvent("获取字典失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("dictName:" + dictName);
                return null;
            }
        };
    }
}

+ 0 - 123
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/company/IotCompanyFallbackFactory.java

@ -1,123 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.iot.company;
import com.yihu.jw.fegin.iot.company.IotCompanyFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.company.IotCompanyCertificateVO;
import com.yihu.jw.restmodel.iot.company.IotCompanyVO;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @author yeshijie on 2018/1/20.
 */
@Component
public class IotCompanyFallbackFactory implements FallbackFactory<IotCompanyFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public IotCompanyFeign create(Throwable e) {
        return new IotCompanyFeign() {
            @Override
            public MixEnvelop<IotCompanyVO, IotCompanyVO> findCompanyPage(@RequestParam(value = "name", required = false) String name,
                                                            @RequestParam(value = "status", required = false) String status,
                                                            @RequestParam(value = "type", required = false) String type,
                                                            @RequestParam(value = "page", required = false) Integer page,
                                                            @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页查找企业失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("name:" + name);
                tracer.getCurrentSpan().logEvent("status:" + status);
                tracer.getCurrentSpan().logEvent("type:" + type);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("size:" + size);
                return null;
            }
            @Override
            public MixEnvelop<IotCompanyVO, IotCompanyVO> addCompany(@RequestParam(value = "jsonData", required = true)String jsonData) {
                tracer.getCurrentSpan().logEvent("创建企业失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop<IotCompanyVO, IotCompanyVO> findByCode(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("根据id查找企业失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotCompanyVO, IotCompanyVO> findByBusinessLicense(@RequestParam(value = "businessLicense", required = true) String businessLicense) {
                tracer.getCurrentSpan().logEvent("根据营业执照号查找企业失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("businessLicense:" + businessLicense);
                return null;
            }
            @Override
            public MixEnvelop<IotCompanyVO, IotCompanyVO> delCompany(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("删除企业失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotCompanyVO, IotCompanyVO> updCompany(@RequestParam(value = "jsonData", required = true)String jsonData) {
                tracer.getCurrentSpan().logEvent("修改企业信息失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertPage
                    (@RequestParam(value = "name", required = false) String name,
                     @RequestParam(value = "companyId", required = false) String companyId,
                     @RequestParam(value = "page", required = false) Integer page,
                     @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页获取企业证书失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("name:" + name);
                tracer.getCurrentSpan().logEvent("companyId:" + companyId);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("size:" + size);
                return null;
            }
            @Override
            public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertById(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("根据id查找企业证书失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertByCompanyId(@RequestParam(value = "companyId", required = true) String companyId) {
                tracer.getCurrentSpan().logEvent("根据企业id查找企业证书失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("companyId:" + companyId);
                return null;
            }
            @Override
            public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> addCompanyCert(@RequestParam(value = "jsonData", required = true)String jsonData) {
                tracer.getCurrentSpan().logEvent("创建企业证书失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> delCompanyCert(@RequestParam(value = "id", required = true)String id) {
                tracer.getCurrentSpan().logEvent("删除企业证书失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
        };
    }
}

+ 0 - 42
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataInputFeignFallbackFactory.java

@ -1,42 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.iot.data_input;
import com.yihu.jw.fegin.iot.data_input.DataInputFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
@Component
public class DataInputFeignFallbackFactory implements FallbackFactory<DataInputFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public DataInputFeign create(Throwable e) {
        return new DataInputFeign() {
            @Override
            public MixEnvelop bindUser(@RequestBody String jsonData) {
                tracer.getCurrentSpan().logEvent("设备注册绑定失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop uploadData(@RequestBody String jsonData) {
                tracer.getCurrentSpan().logEvent("体征数据上传失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop uploadWeRunData(String jsonData) {
                tracer.getCurrentSpan().logEvent("微信运动数据上传失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
        };
    }
}

+ 0 - 91
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataSearchFeignFallbackFactory.java

@ -1,91 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.iot.data_input;
import com.yihu.jw.fegin.iot.data_input.DataSearchFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
@Component
public class DataSearchFeignFallbackFactory implements FallbackFactory<DataSearchFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public DataSearchFeign create(Throwable throwable) {
        return new DataSearchFeign() {
            @Override
            public MixEnvelop getOne(String jsonData) {
                tracer.getCurrentSpan().logEvent("根据id获取单条数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop getList(String jsonData ) {
                tracer.getCurrentSpan().logEvent("获取多条数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop getListPage(String jsonData ) {
                tracer.getCurrentSpan().logEvent("获取数据分页列表失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop getRecent5ByTypeAndTime(String jsonData ) {
                tracer.getCurrentSpan().logEvent("获取最近5条记录数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop getAbnormalTimesAWeek(String jsonData ) {
                tracer.getCurrentSpan().logEvent("获取最近体征数据异常次数失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop getRecent1ByCodeAndDel(String jsonData ) {
                tracer.getCurrentSpan().logEvent("根据居民code和删除标识获取最近一次体征数据:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop getListByCodeAndDel(String jsonData ) {
                tracer.getCurrentSpan().logEvent("根据居民code和删除标识获取所有体征数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop delete(String jsonData) {
                tracer.getCurrentSpan().logEvent("根据居民rid删除用户体征数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop update(String jsonData) {
                tracer.getCurrentSpan().logEvent("根据rid修改用户体征数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop getWeRunDataListById(String jsonData) {
                tracer.getCurrentSpan().logEvent("根据用户code用户微信运动数据列表数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
        };
    }
}

+ 0 - 27
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataStandardConvertFeignFallbackFactory.java

@ -1,27 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.iot.data_input;
import com.yihu.jw.fegin.iot.data_input.DataStandardConvertFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
@Component
public class DataStandardConvertFeignFallbackFactory implements FallbackFactory<DataStandardConvertFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public DataStandardConvertFeign create(Throwable throwable) {
        return new DataStandardConvertFeign() {
            @Override
            public MixEnvelop convert(String jsonData) {
                tracer.getCurrentSpan().logEvent("标准转换失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
        };
    }
}

+ 0 - 134
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceFallbackFactory.java

@ -1,134 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.iot.device;
import com.yihu.jw.fegin.iot.device.IotDeviceFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.iot.common.ExistVO;
import com.yihu.jw.restmodel.iot.device.IotDeviceImportRecordVO;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
import feign.hystrix.FallbackFactory;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @author yeshijie on 2017/12/8.
 */
@Component
public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public IotDeviceFeign create(Throwable e) {
        return new IotDeviceFeign() {
            @Override
            public MixEnvelop<IotDeviceVO, IotDeviceVO> create(@RequestParam(value = "jsonData", required = true) String jsonData) {
                tracer.getCurrentSpan().logEvent("创建设备失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceVO, IotDeviceVO> findByCode(@RequestParam(value = "id", required = true) String id
            ) {
                tracer.getCurrentSpan().logEvent("根据id查找设备失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceVO, IotDeviceVO> delDevice(@RequestParam(value = "id", required = true) String id
            ) {
                tracer.getCurrentSpan().logEvent("删除设备失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public Envelop updDevice(@RequestParam String jsonData) {
                tracer.getCurrentSpan().logEvent("修改设备失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop<ExistVO, ExistVO> isSnExist(@RequestParam(value = "sn", required = true) String sn
            ) {
                tracer.getCurrentSpan().logEvent("sn码是否存在失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("sn:" + sn);
                return null;
            }
            @Override
            public MixEnvelop<ExistVO, ExistVO> isSimExist(@RequestParam(value = "sim", required = true) String sim
            ) {
                tracer.getCurrentSpan().logEvent("sim卡号是否存在失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("sim:" + sim);
                return null;
            }
            @Override
            public Envelop updSim(@RequestParam(value = "sim", required = true) String sim,
                                  @RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("修改sim卡号失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("sim:" + sim);
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceVO, IotDeviceVO> findProductPageByCompanyId(@RequestParam(value = "sn", required = false) String sn,
                                                                      @RequestParam(value = "hospital", required = false) String hospital,
                                                                      @RequestParam(value = "orderId", required = false) String orderId,
                                                                      @RequestParam(value = "purcharseId", required = false) String purcharseId,
                                                                      @RequestParam(value = "isBinding", required = false) Integer isBinding,
                                                                      @RequestParam(value = "page", required = false) Integer page,
                                                                      @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页查找设备失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("sn:" + sn);
                tracer.getCurrentSpan().logEvent("hospital:" + hospital);
                tracer.getCurrentSpan().logEvent("orderId:" + orderId);
                tracer.getCurrentSpan().logEvent("purcharseId:" + purcharseId);
                tracer.getCurrentSpan().logEvent("isBinding:" + isBinding);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("size:" + size);
                return null;
            }
            @Override
            public MixEnvelop<ExistVO, ExistVO> isImportDevice(@ApiParam(name = "purcharseId", value = "purcharseId")
                                                   @RequestParam(value = "purcharseId", required = true) String purcharseId) {
                tracer.getCurrentSpan().logEvent("是否正在导入设备数据失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("purcharseId:" + purcharseId);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> uploadStream(@RequestBody String jsonData) {
                tracer.getCurrentSpan().logEvent("设备导入失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> queryImportRecordPage(@RequestParam(value = "purcharseId", required = true) String purcharseId,
                                                                             @RequestParam(value = "page", required = false) Integer page,
                                                                             @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页查找导入记录失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("purcharseId:" + purcharseId);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("size:" + size);
                return null;
            }
        };
    }
}

+ 0 - 114
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceOrderFallbackFactory.java

@ -1,114 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.iot.device;
import com.yihu.jw.fegin.iot.device.IotDeviceOrderFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceOrderVO;
import com.yihu.jw.restmodel.iot.device.IotOrderPurchaseVO;
import com.yihu.jw.restmodel.iot.device.IotOrderVO;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @author yeshijie on 2017/12/8.
 */
@Component
public class IotDeviceOrderFallbackFactory implements FallbackFactory<IotDeviceOrderFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public IotDeviceOrderFeign create(Throwable e) {
        return new IotDeviceOrderFeign() {
            @Override
            public MixEnvelop<IotOrderVO, IotOrderVO> create(@RequestParam(value = "jsonData", required = true) String jsonData) {
                tracer.getCurrentSpan().logEvent("创建设备订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> findByCode(@RequestParam(value = "id", required = true) String id
            ) {
                tracer.getCurrentSpan().logEvent("根据id查找设备订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> findPage(@RequestParam(value = "name", required = false) String name,
                                                         @RequestParam(value = "type", required = false) String type,
                                                         @RequestParam(value = "page", required = false) Integer page,
                                                         @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页查找设备订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("name:" + name);
                tracer.getCurrentSpan().logEvent("type:" + type);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("size:" + size);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> delOrder(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("删除订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> delPurchase(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("删除采购订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotOrderVO, IotOrderVO> updOrder(@RequestParam(value = "jsonData", required = false)String jsonData) {
                tracer.getCurrentSpan().logEvent("修改订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findPurcharsePage(@RequestParam(value = "orderId", required = true) String orderId,
                                                                    @RequestParam(value = "page", required = false) Integer page,
                                                                    @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页查找采购清单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("orderId:" + orderId);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("size:" + size);
                return null;
            }
            @Override
            public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findPurcharseById(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("根据id查找采购订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findQualityPage(
                    @RequestParam(value = "qualityStatus", required = false) String qualityStatus,
                    @RequestParam(value = "orderNo", required = false) String orderNo,
                    @RequestParam(value = "startTime", required = false) String startTime,
                    @RequestParam(value = "endTime", required = false) String endTime,
                    @RequestParam(value = "page", required = false) Integer page,
                    @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("查找质检管理失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("qualityStatus:" + qualityStatus);
                tracer.getCurrentSpan().logEvent("orderNo:" + orderNo);
                tracer.getCurrentSpan().logEvent("startTime:" + startTime);
                tracer.getCurrentSpan().logEvent("endTime:" + endTime);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("size:" + size);
                return null;
            }
        };
    }
}

+ 0 - 89
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceQualityFallbackFactory.java

@ -1,89 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.iot.device;
import com.yihu.jw.fegin.iot.device.IotDeviceQualityFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceQualityInspectionPlanVO;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @author yeshijie on 2018/01/24.
 */
@Component
public class IotDeviceQualityFallbackFactory implements FallbackFactory<IotDeviceQualityFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public IotDeviceQualityFeign create(Throwable e) {
        return new IotDeviceQualityFeign() {
            @Override
            public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> create(@RequestParam(value = "jsonData", required = true) String jsonData) {
                tracer.getCurrentSpan().logEvent("创建质检计划失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> findByCode(@RequestParam(value = "id", required = true) String id
            ) {
                tracer.getCurrentSpan().logEvent("查找质检计划失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(
                    @RequestParam(value = "purcharseId", required = false) String purcharseId,
                    @RequestParam(value = "orderNo", required = false) String orderNo,
                    @RequestParam(value = "startTime", required = false) String startTime,
                    @RequestParam(value = "endTime", required = false) String endTime,
                    @RequestParam(value = "page", required = false) Integer page,
                    @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页获取设备质检计划失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("purcharseId:" + purcharseId);
                tracer.getCurrentSpan().logEvent("orderNo:" + orderNo);
                tracer.getCurrentSpan().logEvent("startTime:" + startTime);
                tracer.getCurrentSpan().logEvent("endTime:" + endTime);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("size:" + size);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> delQualityPlan(
                    @RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("删除质检计划失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completeQualityPlan(
                        @RequestParam(value = "actualTime", required = true) String actualTime,
                        @RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("完成质检计划失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("actualTime:" + actualTime);
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(
                    @RequestParam(value = "actualTime", required = true) String actualTime,
                    @RequestParam(value = "purchaseId", required = true) String purchaseId) {
                tracer.getCurrentSpan().logEvent("完成质检计划(按采购id)失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("actualTime:" + actualTime);
                tracer.getCurrentSpan().logEvent("purchaseId:" + purchaseId);
                return null;
            }
        };
    }
}

+ 0 - 124
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotPatientDeviceFallbackFactory.java

@ -1,124 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.iot.device;
import com.yihu.jw.fegin.iot.device.IotPatientDeviceFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
import com.yihu.jw.restmodel.iot.device.IotPatientDeviceVO;
import feign.hystrix.FallbackFactory;
import iot.device.LocationDataVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @author yeshijie on 2018/2/8.
 */
@Component
public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatientDeviceFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public IotPatientDeviceFeign create(Throwable e) {
        return new IotPatientDeviceFeign() {
            @Override
            public MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> create(
                    @RequestParam String jsonData) {
                tracer.getCurrentSpan().logEvent("设备绑定失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> findByDeviceSnAndUserType(
                    @RequestParam(value = "deviceSn",required = true) String deviceSn,
                    @RequestParam(value = "userType",required = true) String userType) {
                tracer.getCurrentSpan().logEvent("按sn码和按键号查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("deviceSn:" + deviceSn);
                tracer.getCurrentSpan().logEvent("userType:" + userType);
                return null;
            }
            @Override
            public MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> findByPatient(
                    @RequestParam(value = "patient",required = true) String patient) {
                tracer.getCurrentSpan().logEvent("按居民code查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patient:" + patient);
                return null;
            }
            @Override
            public MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> findByPatientAndDeviceSn(
                    @RequestParam(value = "patient",required = true) String patient,
                    @RequestParam(value = "deviceSn",required = true) String deviceSn) {
                tracer.getCurrentSpan().logEvent("按居民和sn码查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patient:" + patient);
                tracer.getCurrentSpan().logEvent("deviceSn:" + deviceSn);
                return null;
            }
            @Override
            public MixEnvelop<IotDeviceVO, IotDeviceVO> findListByPatient(
                    @RequestParam(value = "patient", required = true) String patient,
                    @RequestParam(value = "page", required = true) Integer page,
                    @RequestParam(value = "pagesize", required = true) Integer pagesize){
                tracer.getCurrentSpan().logEvent("按居民分页查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patient:" + patient);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("pagesize:" + pagesize);
                return null;
            }
            @Override
            public MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> findByDeviceSnAndCategoryCode(
                    @RequestParam(value = "categoryCode",required = true) String categoryCode,
                    @RequestParam(value = "deviceSn",required = true) String deviceSn) {
                tracer.getCurrentSpan().logEvent("按sn码和设备类型查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("categoryCode:" + categoryCode);
                tracer.getCurrentSpan().logEvent("deviceSn:" + deviceSn);
                return null;
            }
            @Override
            public MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> findByDeviceSnAndCategoryCodeAndUserType(
                    @RequestParam(value = "deviceSn",required = true) String deviceSn,
                    @RequestParam(value = "categoryCode",required = true) String categoryCode,
                    @RequestParam(value = "userType",required = true) String userType) {
                tracer.getCurrentSpan().logEvent("按sn码,设备类型及按键号查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("categoryCode:" + categoryCode);
                tracer.getCurrentSpan().logEvent("deviceSn:" + deviceSn);
                tracer.getCurrentSpan().logEvent("userType:" + userType);
                return null;
            }
            @Override
            public MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> updatePatientDevice(
                    @RequestParam(value = "patient",required = true) String patient,
                    @RequestParam(value = "deviceSN",required = true) String deviceSN,
                    @RequestParam(value = "newDeviceSN",required = true) String newDeviceSN,
                    @RequestParam(value = "userType",required = true) String userType,
                    @RequestParam(value = "sim",required = true) String sim) {
                tracer.getCurrentSpan().logEvent("更换患者绑定的血糖仪失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patient:" + patient);
                tracer.getCurrentSpan().logEvent("deviceSN:" + deviceSN);
                tracer.getCurrentSpan().logEvent("newDeviceSN:" + newDeviceSN);
                tracer.getCurrentSpan().logEvent("userType:" + userType);
                tracer.getCurrentSpan().logEvent("sim:" + sim);
                return null;
            }
            @Override
            public MixEnvelop<LocationDataVO, LocationDataVO> findDeviceLocationsByIdCard(
                    @RequestParam(value = "jsonData",required = true) String jsonData) {
                tracer.getCurrentSpan().logEvent("查询设备地址失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
        };
    }
}

+ 0 - 96
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/product/IotProductFallbackFactory.java

@ -1,96 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.iot.product;
import com.yihu.jw.fegin.iot.product.IotProductFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.product.IotMaintenanceUnitVO;
import com.yihu.jw.restmodel.iot.product.IotProductBaseInfoVO;
import com.yihu.jw.restmodel.iot.product.IotProductVO;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @author yeshijie on 2018/1/20.
 */
@Component
public class IotProductFallbackFactory implements FallbackFactory<IotProductFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public IotProductFeign create(Throwable e) {
        return new IotProductFeign() {
            @Override
            public MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> findCompanyPage(
                    @RequestParam(value = "name", required = false) String name,
                    @RequestParam(value = "classify", required = false) String classify,
                    @RequestParam(value = "companyId", required = false) String companyId,
                    @RequestParam(value = "page", required = false) Integer page,
                    @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页查找产品失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("name:" + name);
                tracer.getCurrentSpan().logEvent("classify:" + classify);
                tracer.getCurrentSpan().logEvent("companyId:" + companyId);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("size:" + size);
                return null;
            }
            @Override
            public MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> findProductPageByCompanyId(
                    @RequestParam(value = "name", required = false) String name,
                    @RequestParam(value = "companyId", required = true) String companyId,
                    @RequestParam(value = "page", required = false) Integer page,
                    @RequestParam(value = "size", required = false) Integer size){
                tracer.getCurrentSpan().logEvent("分页查找产品(按企业id)失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("name:" + name);
                tracer.getCurrentSpan().logEvent("companyId:" + companyId);
                tracer.getCurrentSpan().logEvent("page:" + page);
                tracer.getCurrentSpan().logEvent("size:" + size);
                return null;
            }
            @Override
            public MixEnvelop<IotProductVO, IotProductVO> addProduct(@RequestParam(value = "jsonData", required = false)String jsonData) {
                tracer.getCurrentSpan().logEvent("创建产品失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public MixEnvelop<IotProductVO, IotProductVO> findByCode(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("根据id查找产品失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotMaintenanceUnitVO, IotMaintenanceUnitVO> getList(@RequestParam(value = "productId", required = true) String productId){
                tracer.getCurrentSpan().logEvent("获取维护单位失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("productId:" + productId);
                return null;
            }
            @Override
            public MixEnvelop<IotProductVO, IotProductVO> delCompany(@RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("删除产品失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;
            }
            @Override
            public MixEnvelop<IotProductVO, IotProductVO> updCompany(@RequestParam(value = "jsonData", required = false)String jsonData) {
                tracer.getCurrentSpan().logEvent("修改产品信息失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
        };
    }
}

+ 0 - 50
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementFeignFallbackFactory.java

@ -1,50 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.agreement;
import com.yihu.jw.fegin.wlyy.agreement.WlyyAgreementFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * Created by Administrator on 2017/6/2 0002.
 */
@Component
public class WlyyAgreementFeignFallbackFactory implements FallbackFactory<WlyyAgreementFeign> {
    @Override
    public WlyyAgreementFeign create(Throwable throwable) {
        return new WlyyAgreementFeign() {
            @Override
            public MixEnvelop create(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public MixEnvelop update(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public MixEnvelop delete(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public MixEnvelop findByCode(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public MixEnvelop 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 MixEnvelop getList(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) {
                return null;
            }
        };
    }
}

+ 0 - 48
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementKpiFeignFallbackFactory.java

@ -1,48 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.agreement;
import com.yihu.jw.fegin.wlyy.agreement.WlyyAgreementKpiFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
/**
 * Created by Administrator on 2017/6/2 0002.
 */
@Component
public class WlyyAgreementKpiFeignFallbackFactory implements FallbackFactory<WlyyAgreementKpiFeign> {
    @Override
    public WlyyAgreementKpiFeign create(Throwable throwable) {
        return new WlyyAgreementKpiFeign() {
            @Override
            public MixEnvelop create(String jsonData) {
                return null;
            }
            @Override
            public MixEnvelop update(String jsonData) {
                return null;
            }
            @Override
            public MixEnvelop delete(String code) {
                return null;
            }
            @Override
            public MixEnvelop findByCode(String code) {
                return null;
            }
            @Override
            public MixEnvelop queryPage(String fields, String filters, String sorts, int size, int page) {
                return null;
            }
            @Override
            public MixEnvelop getList(String fields, String filters, String sorts) {
                return null;
            }
        };
    }
}

+ 0 - 38
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementKpiLogFeignFallbackFactory.java

@ -1,38 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.agreement;
import com.yihu.jw.fegin.wlyy.agreement.WlyyAgreementKpiLogFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
/**
 * Created by Administrator on 2017/6/2 0002.
 */
@Component
public class WlyyAgreementKpiLogFeignFallbackFactory implements FallbackFactory<WlyyAgreementKpiLogFeign> {
    @Override
    public WlyyAgreementKpiLogFeign create(Throwable throwable) {
        return new WlyyAgreementKpiLogFeign() {
            @Override
            public MixEnvelop create(String jsonData) {
                return null;
            }
            @Override
            public MixEnvelop findByCode(String code) {
                return null;
            }
            @Override
            public MixEnvelop queryPage(String fields, String filters, String sorts, int size, int page) {
                return null;
            }
            @Override
            public MixEnvelop getList(String fields, String filters, String sorts) {
                return null;
            }
        };
    }
}

+ 0 - 45
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyySignFamilyFeignFallbackFactory.java

@ -1,45 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.agreement;
import com.yihu.jw.fegin.wlyy.agreement.WlyySignFamilyFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * Created by Administrator on 2017/6/2 0002.
 */
@Component
public class WlyySignFamilyFeignFallbackFactory implements FallbackFactory<WlyySignFamilyFeign>{
    @Override
    public WlyySignFamilyFeign create(Throwable throwable) {
        return new WlyySignFamilyFeign() {
            @Override
            public MixEnvelop create(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public MixEnvelop update(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public MixEnvelop findByCode(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public MixEnvelop 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 MixEnvelop getList(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) {
                return null;
            }
        };
    }
}

+ 0 - 63
common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/patient/AdvertisementFeignFallbackFactory.java

@ -1,63 +0,0 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.patient;
import com.yihu.jw.fegin.wlyy.patient.AdvertisementFeign;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * Created by Administrator on 2017/6/6 0006.
 */
@Component
public class AdvertisementFeignFallbackFactory implements FallbackFactory<AdvertisementFeign> {
    @Override
    public AdvertisementFeign create(Throwable throwable) {
        return new AdvertisementFeign() {
            @Override
            public MixEnvelop create(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public MixEnvelop update(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public MixEnvelop delete(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public MixEnvelop findByCode(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public MixEnvelop 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 MixEnvelop 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 MixEnvelop getListByPatientCode(@RequestParam(value = "patientCode") String patientCode) {
                return null;
            }
            @Override
            public MixEnvelop getListByIp(@RequestParam(value = "ipAddress") String ipAddress) {
                return null;
            }
        };
    }
}

+ 0 - 38
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/common/IotFileUploadFeign.java

@ -1,38 +0,0 @@
package com.yihu.jw.fegin.iot.common;
import com.yihu.jw.fegin.fallbackfactory.iot.common.IotFileUploadFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
/**
 * @author yeshijie on 2018/01/20.
 */
@FeignClient(
        name = CommonContants.svr_iot // name值是eurika的实例名字
        ,fallbackFactory  = IotFileUploadFallbackFactory.class
)
@RequestMapping(IotRequestMapping.api_iot_common)
public interface IotFileUploadFeign {
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream_img)
    public MixEnvelop<UploadVO, UploadVO> uploadImg(@RequestParam(value = "file", required = true) MultipartFile file);
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream_attachment)
    public MixEnvelop<UploadVO, UploadVO> uploadAttachment(@RequestParam(value = "file", required = true) MultipartFile file);
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream)
    public MixEnvelop<UploadVO, UploadVO> uploadStream(@RequestParam(value = "file", required = true) MultipartFile file);
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_string)
    public MixEnvelop<UploadVO, UploadVO> uploadImages(@RequestBody String jsonData) throws Exception;
}

+ 0 - 27
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/common/IotSystemDictFeign.java

@ -1,27 +0,0 @@
package com.yihu.jw.fegin.iot.common;
import com.yihu.jw.fegin.fallbackfactory.iot.common.IotSystemDictFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.dict.IotSystemDictVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @author yeshijie on 2018/1/20.
 */
@FeignClient(
        name = CommonContants.svr_iot // name值是eurika的实例名字
        ,fallbackFactory  = IotSystemDictFallbackFactory.class
)
@RequestMapping(IotRequestMapping.Common.system_dict)
public interface IotSystemDictFeign {
    @GetMapping(value = IotRequestMapping.System.findDictByCode)
    public MixEnvelop<IotSystemDictVO, IotSystemDictVO> getList(@RequestParam(value = "dictName", required = true) String dictName) throws Exception ;
}

+ 0 - 67
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/company/IotCompanyFeign.java

@ -1,67 +0,0 @@
package com.yihu.jw.fegin.iot.company;
import com.yihu.jw.fegin.fallbackfactory.iot.company.IotCompanyFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.company.IotCompanyCertificateVO;
import com.yihu.jw.restmodel.iot.company.IotCompanyVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @author yeshijie on 2018/1/16.
 */
@FeignClient(
        name = CommonContants.svr_iot // name值是eurika的实例名字
        ,fallbackFactory  = IotCompanyFallbackFactory.class
)
@RequestMapping(IotRequestMapping.Common.company)
public interface IotCompanyFeign {
    @GetMapping(value = IotRequestMapping.Company.findCompanyPage)
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findCompanyPage(
                                       @RequestParam(value = "name", required = false) String name,
                                       @RequestParam(value = "status", required = false) String status,
                                       @RequestParam(value = "type", required = false) String type,
                                       @RequestParam(value = "page", required = false) Integer page,
                                       @RequestParam(value = "size", required = false) Integer size);
    @PostMapping(value = IotRequestMapping.Company.addCompany)
    public MixEnvelop<IotCompanyVO, IotCompanyVO> addCompany(@RequestParam(value = "jsonData", required = true)String jsonData);
    @GetMapping(value = IotRequestMapping.Company.findCompanyById)
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findByCode(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.Company.findByBusinessLicense)
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findByBusinessLicense(@RequestParam(value = "businessLicense", required = true) String businessLicense);
    @PostMapping(value = IotRequestMapping.Company.delCompany)
    public MixEnvelop<IotCompanyVO, IotCompanyVO> delCompany(@RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.Company.updCompany)
    public MixEnvelop<IotCompanyVO, IotCompanyVO> updCompany(@RequestParam(value = "jsonData", required = true)String jsonData);
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertPage)
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertPage
            (@RequestParam(value = "name", required = false) String name,
             @RequestParam(value = "companyId", required = false) String companyId,
             @RequestParam(value = "page", required = false) Integer page,
             @RequestParam(value = "size", required = false) Integer size);
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertById)
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertById(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertByCompanyId)
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertByCompanyId(@RequestParam(value = "companyId", required = true) String companyId);
    @PostMapping(value = IotRequestMapping.Company.addCompanyCert)
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> addCompanyCert(@RequestParam(value = "jsonData", required = true)String jsonData);
    @PostMapping(value = IotRequestMapping.Company.delCompanyCert)
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> delCompanyCert(@RequestParam(value = "id", required = true)String id);
}

+ 0 - 29
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataInputFeign.java

@ -1,29 +0,0 @@
package com.yihu.jw.fegin.iot.data_input;
import com.yihu.jw.fegin.fallbackfactory.iot.data_input.DataInputFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.DataRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@FeignClient(
        name = CommonContants.svr_iot // name值是eurika的实例名字
        ,fallbackFactory  = DataInputFeignFallbackFactory.class
)
@RequestMapping(DataRequestMapping.api_iot_common)
public interface DataInputFeign {
    @PostMapping(value = DataRequestMapping.DataInput.api_user_bind, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop bindUser(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataInput.api_data_input, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop uploadData(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataInput.api_weRunData_input, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop uploadWeRunData(@RequestBody String jsonData);
}

+ 0 - 50
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataSearchFeign.java

@ -1,50 +0,0 @@
package com.yihu.jw.fegin.iot.data_input;
import com.yihu.jw.fegin.fallbackfactory.iot.data_input.DataSearchFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.DataRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@FeignClient(
        name = CommonContants.svr_iot // name值是eurika的实例名字
        ,fallbackFactory  = DataSearchFeignFallbackFactory.class
)
@RequestMapping(DataRequestMapping.api_iot_common)
public interface DataSearchFeign {
    @PostMapping(value = DataRequestMapping.DataSearch.api_data_search_one, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public MixEnvelop getOne(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_search_list, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public MixEnvelop getList(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_search_list_page, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public MixEnvelop getListPage(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_search_recent5, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public MixEnvelop getRecent5ByTypeAndTime(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_abnormal_times_a_week, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public MixEnvelop getAbnormalTimesAWeek(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_search_recent1, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public MixEnvelop getRecent1ByCodeAndDel(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_search_list_code_del, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public MixEnvelop getListByCodeAndDel(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_delete, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public MixEnvelop delete(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public MixEnvelop update(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataSearch.api_user_search_werun_datas, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public MixEnvelop getWeRunDataListById(@RequestBody String jsonData);
}

+ 0 - 22
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataStandardConvertFeign.java

@ -1,22 +0,0 @@
package com.yihu.jw.fegin.iot.data_input;
import com.yihu.jw.fegin.fallbackfactory.iot.data_input.DataStandardConvertFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.DataRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@FeignClient(
        name = CommonContants.svr_iot // name值是eurika的实例名字
        ,fallbackFactory  = DataStandardConvertFeignFallbackFactory.class
)
@RequestMapping(DataRequestMapping.api_iot_common)
public interface DataStandardConvertFeign {
    @PostMapping(value = DataRequestMapping.DataStandardConvert.api_convert, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop convert(@RequestBody String jsonData);
}

+ 0 - 67
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceFeign.java

@ -1,67 +0,0 @@
package com.yihu.jw.fegin.iot.device;
import com.yihu.jw.fegin.fallbackfactory.iot.device.IotDeviceFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.iot.common.ExistVO;
import com.yihu.jw.restmodel.iot.device.IotDeviceImportRecordVO;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;
/**
 * @author yeshijie on 2017/12/8.
 */
@FeignClient(
        name = CommonContants.svr_iot // name值是eurika的实例名字
        ,fallbackFactory  = IotDeviceFallbackFactory.class
)
@RequestMapping(IotRequestMapping.Common.device)
public interface IotDeviceFeign{
    @PostMapping(value = IotRequestMapping.Device.api_create)
    MixEnvelop<IotDeviceVO, IotDeviceVO> create(@RequestParam(value = "jsonData", required = true) String jsonData);
    @GetMapping(value = IotRequestMapping.Device.api_getById)
    MixEnvelop<IotDeviceVO, IotDeviceVO> findByCode(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.Device.isSnExist)
    MixEnvelop<ExistVO, ExistVO> isSnExist(@RequestParam(value = "sn", required = true) String sn);
    @GetMapping(value = IotRequestMapping.Device.isSimExist)
    MixEnvelop<ExistVO, ExistVO> isSimExist(@RequestParam(value = "sim", required = true) String sim);
    @PostMapping(value = IotRequestMapping.Device.updSim)
    Envelop updSim(@RequestParam(value = "sim", required = true) String sim,
                   @RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.Device.api_queryPage)
    MixEnvelop<IotDeviceVO, IotDeviceVO> findProductPageByCompanyId(
            @RequestParam(value = "sn", required = false) String sn,
            @RequestParam(value = "hospital", required = false) String hospital,
            @RequestParam(value = "orderId", required = false) String orderId,
            @RequestParam(value = "purcharseId", required = false) String purcharseId,
            @RequestParam(value = "isBinding", required = false) Integer isBinding,
            @RequestParam(value = "page", required = false) Integer page,
            @RequestParam(value = "size", required = false) Integer size);
    @GetMapping(value = IotRequestMapping.Device.isImportDevice)
    MixEnvelop<ExistVO, ExistVO> isImportDevice(@RequestParam(value = "purcharseId", required = true) String purcharseId);
    @PostMapping(value = IotRequestMapping.Device.importDevice)
    MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> uploadStream(@RequestBody String jsonData);
    @GetMapping(value = IotRequestMapping.Device.queryImportRecordPage)
    MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> queryImportRecordPage(
           @RequestParam(value = "purcharseId", required = true) String purcharseId,
           @RequestParam(value = "page", required = false) Integer page,
           @RequestParam(value = "size", required = false) Integer size);
    @PostMapping(value = IotRequestMapping.Device.api_delete)
    MixEnvelop<IotDeviceVO, IotDeviceVO> delDevice(@RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.Device.api_update)
    Envelop updDevice(@RequestParam(value = "jsonData", required = true) String jsonData);
}

+ 0 - 65
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceOrderFeign.java

@ -1,65 +0,0 @@
package com.yihu.jw.fegin.iot.device;
import com.yihu.jw.fegin.fallbackfactory.iot.device.IotDeviceOrderFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceOrderVO;
import com.yihu.jw.restmodel.iot.device.IotOrderPurchaseVO;
import com.yihu.jw.restmodel.iot.device.IotOrderVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @author yeshijie on 2018/01/20.
 */
@FeignClient(
        name = CommonContants.svr_iot // name值是eurika的实例名字
        ,fallbackFactory  = IotDeviceOrderFallbackFactory.class
)
@RequestMapping(IotRequestMapping.Common.order)
public interface IotDeviceOrderFeign {
    @PostMapping(value = IotRequestMapping.DeviceOrder.createOrder)
    MixEnvelop<IotOrderVO, IotOrderVO> create(@RequestParam(value = "jsonData", required = true) String jsonData);
    @GetMapping(value = IotRequestMapping.DeviceOrder.findById)
    MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> findByCode(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.DeviceOrder.findPage)
    MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> findPage(
            @RequestParam(value = "name", required = false) String name,
            @RequestParam(value = "type", required = false) String type,
            @RequestParam(value = "page", required = false) Integer page,
            @RequestParam(value = "size", required = false) Integer size);
    @PostMapping(value = IotRequestMapping.DeviceOrder.delOrder)
    MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> delOrder(@RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.DeviceOrder.delPurchase)
    MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> delPurchase(@RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.DeviceOrder.updOrder)
    MixEnvelop<IotOrderVO, IotOrderVO> updOrder(@RequestParam(value = "jsonData", required = false)String jsonData);
    @GetMapping(value = IotRequestMapping.DeviceOrder.findPurcharsePage)
    MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findPurcharsePage(
            @RequestParam(value = "orderId", required = true) String orderId,
            @RequestParam(value = "page", required = false) Integer page,
            @RequestParam(value = "size", required = false) Integer size);
    @GetMapping(value = IotRequestMapping.DeviceOrder.findPurcharseById)
    MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findPurcharseById(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.DeviceOrder.findQualityPage)
    MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findQualityPage(
            @RequestParam(value = "qualityStatus", required = false) String qualityStatus,
            @RequestParam(value = "orderNo", required = false) String orderNo,
            @RequestParam(value = "startTime", required = false) String startTime,
            @RequestParam(value = "endTime", required = false) String endTime,
            @RequestParam(value = "page", required = false) Integer page,
            @RequestParam(value = "size", required = false) Integer size);
}

+ 0 - 52
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceQualityFeign.java

@ -1,52 +0,0 @@
package com.yihu.jw.fegin.iot.device;
import com.yihu.jw.fegin.fallbackfactory.iot.device.IotDeviceQualityFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceQualityInspectionPlanVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @author yeshijie on 2018/01/24.
 */
@FeignClient(
        name = CommonContants.svr_iot // name值是eurika的实例名字
        ,fallbackFactory  = IotDeviceQualityFallbackFactory.class
)
@RequestMapping(IotRequestMapping.Common.quality)
public interface IotDeviceQualityFeign{
    @PostMapping(value = IotRequestMapping.DeviceQuality.addQualityPlan)
    MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> create(@RequestParam(value = "jsonData", required = true) String jsonData);
    @GetMapping(value = IotRequestMapping.DeviceQuality.findById)
    MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> findByCode(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.DeviceQuality.queryQualityPlanPage)
    MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(
           @RequestParam(value = "purcharseId", required = false) String purcharseId,
           @RequestParam(value = "orderNo", required = false) String orderNo,
           @RequestParam(value = "startTime", required = false) String startTime,
           @RequestParam(value = "endTime", required = false) String endTime,
           @RequestParam(value = "page", required = false) Integer page,
           @RequestParam(value = "size", required = false) Integer size);
    @PostMapping(value = IotRequestMapping.DeviceQuality.delQualityPlan)
    MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> delQualityPlan(@RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.DeviceQuality.completeQualityPlan)
    MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completeQualityPlan(
        @RequestParam(value = "actualTime", required = true) String actualTime,
        @RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.DeviceQuality.completePlanByPurchaseId)
    MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(
            @RequestParam(value = "actualTime", required = true) String actualTime,
            @RequestParam(value = "purchaseId", required = true) String purchaseId);
}

+ 0 - 70
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotPatientDeviceFeign.java

@ -1,70 +0,0 @@
package com.yihu.jw.fegin.iot.device;
import com.yihu.jw.fegin.fallbackfactory.iot.device.IotPatientDeviceFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
import com.yihu.jw.restmodel.iot.device.IotPatientDeviceVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import iot.device.LocationDataVO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @author yeshijie on 2018/2/8.
 */
@FeignClient(
        name = CommonContants.svr_iot // name值是eurika的实例名字
        ,fallbackFactory  = IotPatientDeviceFallbackFactory.class
)
@RequestMapping(IotRequestMapping.Common.patientDevice)
public interface IotPatientDeviceFeign{
    @PostMapping(value = IotRequestMapping.PatientDevice.addPatientDevice)
    MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> create(@RequestParam(value = "jsonData", required = true) String jsonData);
    @GetMapping(value = IotRequestMapping.PatientDevice.findByDeviceSnAndUserType)
    MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> findByDeviceSnAndUserType(
            @RequestParam(value = "deviceSn",required = true) String deviceSn,
            @RequestParam(value = "userType",required = true) String userType);
    @GetMapping(value = IotRequestMapping.PatientDevice.findByPatient)
    MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> findByPatient(
            @RequestParam(value = "patient",required = true) String patient);
    @GetMapping(value = IotRequestMapping.PatientDevice.findByPatientAndDeviceSn)
    MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> findByPatientAndDeviceSn(
            @RequestParam(value = "patient",required = true) String patient,
            @RequestParam(value = "deviceSn",required = true) String deviceSn);
    @GetMapping(value = IotRequestMapping.PatientDevice.findListByPatient)
    MixEnvelop<IotDeviceVO, IotDeviceVO> findListByPatient(
            @RequestParam(value = "patient", required = true) String patient,
            @RequestParam(value = "page", required = true) Integer page,
            @RequestParam(value = "pagesize", required = true) Integer pagesize);
    @GetMapping(value = IotRequestMapping.PatientDevice.findByDeviceSnAndCategoryCode)
    MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> findByDeviceSnAndCategoryCode(
            @RequestParam(value = "categoryCode",required = true) String categoryCode,
            @RequestParam(value = "deviceSn",required = true) String deviceSn);
    @GetMapping(value = IotRequestMapping.PatientDevice.findByDeviceSnAndCategoryCodeAndUserType)
    MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> findByDeviceSnAndCategoryCodeAndUserType(
            @RequestParam(value = "deviceSn",required = true) String deviceSn,
            @RequestParam(value = "categoryCode",required = true) String categoryCode,
           @RequestParam(value = "userType",required = true) String userType);
    @PostMapping(value = IotRequestMapping.PatientDevice.updatePatientDevice)
    MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> updatePatientDevice(
            @RequestParam(value = "patient",required = true) String patient,
            @RequestParam(value = "deviceSN",required = true) String deviceSN,
            @RequestParam(value = "newDeviceSN",required = true) String newDeviceSN,
            @RequestParam(value = "userType",required = true) String userType,
            @RequestParam(value = "sim",required = true) String sim);
    @GetMapping(value = IotRequestMapping.PatientDevice.findLocationByIdCard)
    public MixEnvelop<LocationDataVO, LocationDataVO> findDeviceLocationsByIdCard(@RequestParam(value = "jsonData",required = true) String jsonData);
}

+ 0 - 57
common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/product/IotProductFeign.java

@ -1,57 +0,0 @@
package com.yihu.jw.fegin.iot.product;
import com.yihu.jw.fegin.fallbackfactory.iot.product.IotProductFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.product.IotMaintenanceUnitVO;
import com.yihu.jw.restmodel.iot.product.IotProductBaseInfoVO;
import com.yihu.jw.restmodel.iot.product.IotProductVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
/**
 * @author yeshijie on 2018/1/17.
 */
@FeignClient(
        name = CommonContants.svr_iot // name值是eurika的实例名字
        ,fallbackFactory  = IotProductFallbackFactory.class
)
@RequestMapping(IotRequestMapping.Common.product)
public interface IotProductFeign{
    @GetMapping(value = IotRequestMapping.Product.findProductPage)
    public MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> findCompanyPage(
            @RequestParam(value = "name", required = false) String name,
            @RequestParam(value = "classify", required = false) String classify,
            @RequestParam(value = "companyId", required = false) String companyId,
            @RequestParam(value = "page", required = false) Integer page,
            @RequestParam(value = "size", required = false) Integer size);
    @GetMapping(value = IotRequestMapping.Product.findProductPageByCompanyId)
    public MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> findProductPageByCompanyId(
            @RequestParam(value = "name", required = false) String name,
            @RequestParam(value = "companyId", required = true) String companyId,
            @RequestParam(value = "page", required = false) Integer page,
            @RequestParam(value = "size", required = false) Integer size);
    @PostMapping(value = IotRequestMapping.Product.addProduct)
    public MixEnvelop<IotProductVO, IotProductVO> addProduct(@RequestParam(value = "jsonData", required = false)String jsonData);
    @GetMapping(value = IotRequestMapping.Product.findProductById)
    public MixEnvelop<IotProductVO, IotProductVO> findByCode(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.Product.maintenanceUnitById)
    public MixEnvelop<IotMaintenanceUnitVO, IotMaintenanceUnitVO> getList(@RequestParam(value = "productId", required = true) String productId);
    @PostMapping(value = IotRequestMapping.Product.delProduct)
    public MixEnvelop<IotProductVO, IotProductVO> delCompany(@RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.Product.updProduct)
    public MixEnvelop<IotProductVO, IotProductVO> updCompany(@RequestParam(value = "jsonData", required = false)String jsonData);
}

+ 0 - 44
common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementFeign.java

@ -1,44 +0,0 @@
package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyyAgreementFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@FeignClient(
        name = CommonContants.svr_wlyy // name值是eurika的实例名字
        ,fallbackFactory  = WlyyAgreementFeignFallbackFactory.class
)
@RequestMapping(WlyyRequestMapping.api_wlyy_common)
public interface WlyyAgreementFeign {
    @PostMapping(value = WlyyRequestMapping.Agreement.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop create(@RequestBody String jsonData);
    @PutMapping(value = WlyyRequestMapping.Agreement.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop update(@RequestBody String jsonData);
    @DeleteMapping(value = WlyyRequestMapping.Agreement.api_delete)
    MixEnvelop delete(@RequestParam(value = "id") String id);
    @RequestMapping(value= WlyyRequestMapping.Agreement.api_getById,method = RequestMethod.GET)
    MixEnvelop findByCode(@RequestParam(value = "id" ) String id);
    @RequestMapping(value = WlyyRequestMapping.Agreement.api_queryPage, method = RequestMethod.GET)
    MixEnvelop 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);
    @GetMapping(value = WlyyRequestMapping.Agreement.api_getList)
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts);
}

+ 0 - 44
common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementKpiFeign.java

@ -1,44 +0,0 @@
package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyyAgreementKpiFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@FeignClient(
        name = CommonContants.svr_wlyy // name值是eurika的实例名字
        ,fallbackFactory  = WlyyAgreementKpiFeignFallbackFactory.class
)
@RequestMapping(WlyyRequestMapping.api_wlyy_common)
public interface WlyyAgreementKpiFeign {
    @PostMapping(value = WlyyRequestMapping.AgreementKpi.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop create(@RequestBody String jsonData);
    @PutMapping(value = WlyyRequestMapping.AgreementKpi.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop update(@RequestBody String jsonData);
    @DeleteMapping(value = WlyyRequestMapping.AgreementKpi.api_delete)
    MixEnvelop delete(@RequestParam(value = "id" ) String id);
    @GetMapping(value = WlyyRequestMapping.AgreementKpi.api_getById)
    MixEnvelop findByCode(@RequestParam(value = "id" ) String id);
    @RequestMapping(value = WlyyRequestMapping.AgreementKpi.api_queryPage, method = RequestMethod.GET)
    MixEnvelop 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);
    @GetMapping(value = WlyyRequestMapping.AgreementKpi.api_getList)
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts);
}

+ 0 - 37
common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementKpiLogFeign.java

@ -1,37 +0,0 @@
package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyyAgreementKpiLogFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;
@FeignClient(
        name = CommonContants.svr_wlyy // name值是eurika的实例名字
        ,fallbackFactory  = WlyyAgreementKpiLogFeignFallbackFactory.class
)
@RequestMapping(WlyyRequestMapping.api_wlyy_common)
public interface WlyyAgreementKpiLogFeign {
    @PostMapping(value = WlyyRequestMapping.AgreementKpiLog.api_create)
    MixEnvelop create(@RequestBody String jsonData);
    @GetMapping(value = WlyyRequestMapping.AgreementKpiLog.api_getById)
    MixEnvelop findByCode(@RequestParam(value = "id")String id);
    @RequestMapping(value = WlyyRequestMapping.AgreementKpiLog.api_queryPage, method = RequestMethod.GET)
    MixEnvelop 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);
    @GetMapping(value = WlyyRequestMapping.AgreementKpiLog.api_getList)
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts);
}

+ 0 - 41
common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyySignFamilyFeign.java

@ -1,41 +0,0 @@
package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyySignFamilyFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@FeignClient(
        name = CommonContants.svr_wlyy // name值是eurika的实例名字
        ,fallbackFactory  = WlyySignFamilyFeignFallbackFactory.class
)
@RequestMapping(WlyyRequestMapping.api_wlyy_common)
public interface WlyySignFamilyFeign {
    @PostMapping(value = WlyyRequestMapping.SignFamily.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop create(@RequestBody String jsonData);
    @PutMapping(value = WlyyRequestMapping.SignFamily.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop update(@RequestBody String jsonData);
    @RequestMapping(value= WlyyRequestMapping.SignFamily.api_getById,method = RequestMethod.GET)
    MixEnvelop findByCode(@RequestParam(value = "id") String id);
    @RequestMapping(value = WlyyRequestMapping.SignFamily.api_queryPage, method = RequestMethod.GET)
    MixEnvelop 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);
    @GetMapping(value = WlyyRequestMapping.SignFamily.api_getList)
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts);
}

+ 0 - 53
common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/patient/AdvertisementFeign.java

@ -1,53 +0,0 @@
package com.yihu.jw.fegin.wlyy.patient;
import com.yihu.jw.fegin.fallbackfactory.wlyy.patient.AdvertisementFeignFallbackFactory;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
/**
 * Created by Administrator on 2017/6/6 0006.
 */
@FeignClient(
        name = CommonContants.svr_wlyy // name值是eurika的实例名字
        ,fallbackFactory  = AdvertisementFeignFallbackFactory.class
)
@RequestMapping(WlyyRequestMapping.api_wlyy_common)
public interface AdvertisementFeign {
    @PostMapping(value = WlyyRequestMapping.Advertisement.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop create(@RequestBody String jsonData);
    @PutMapping(value = WlyyRequestMapping.Advertisement.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    MixEnvelop update(@RequestBody String jsonData);
    @DeleteMapping(value = WlyyRequestMapping.Advertisement.api_delete)
    MixEnvelop delete(@RequestParam(value = "id") String id);
    @RequestMapping(value= WlyyRequestMapping.Advertisement.api_getById,method = RequestMethod.GET)
    MixEnvelop findByCode(@RequestParam(value = "id" ) String id);
    @RequestMapping(value = WlyyRequestMapping.Advertisement.api_queryPage, method = RequestMethod.GET)
    MixEnvelop 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);
    @GetMapping(value = WlyyRequestMapping.Advertisement.api_getList)
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts);
    @GetMapping(value= WlyyRequestMapping.Advertisement.api_getListByPatientId)
    MixEnvelop getListByPatientCode(@RequestParam(value="patientId")String patientId);
    @GetMapping(value= WlyyRequestMapping.Advertisement.api_getListByIp)
    MixEnvelop getListByIp(@RequestParam(value="ipAddress") String ipAddress);
}

+ 0 - 34
common/common-tracer/pom.xml

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>wlyy-parent-pom</artifactId>
        <groupId>com.yihu.jw</groupId>
        <version>2.4.0</version>
        <relativePath>../../wlyy-parent-pom/pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>common-tracer</artifactId>
    <dependencies>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-zipkin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
    </dependencies>
</project>

+ 0 - 50
common/common-tracer/src/main/java/com/yihu/jw/advice/HttpAdvice.java

@ -1,50 +0,0 @@
package com.yihu.jw.advice;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
 * Created by yeshijie on 2018/9/14
 */
@Aspect
@Component
public class HttpAdvice {
    @Autowired
    private Tracer tracer;
    @Autowired
    private ObjectMapper objectMapper;
    private Logger logger = LoggerFactory.getLogger(HttpAdvice.class);
    @Around("within(@org.springframework.web.bind.annotation.RestController *)")
    public Object process(ProceedingJoinPoint point) throws Throwable {
        //保存入参
        HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
        tracer.getCurrentSpan().logEvent(objectMapper.writeValueAsString(request.getParameterMap()));
        //访问目标方法的参数:
        Object[] args = point.getArgs();
        Long strartTime = System.currentTimeMillis();
        Object returnValue = point.proceed(args);
        Long endTime = System.currentTimeMillis();
        //保存响应
        tracer.getCurrentSpan().logEvent(objectMapper.writeValueAsString(returnValue));
        //保存响应时间
        tracer.getCurrentSpan().logEvent("executeTime:"+(endTime - strartTime));
        return returnValue;
    }
}

+ 3 - 2
wlyy-lib-parent-pom/pom.xml

@ -23,9 +23,10 @@
        <module>../common/common-exception</module>
        <module>../common/common-request-mapping</module>
        <module>../common/common-util</module>
     <!--   <module>../common/common-fegin</module>-->
        <module>../common/commons-data-redis</module>
        <module>../common/commons-ehr-constants</module>
        <module>../common/commons-profile-core</module>
        <module>../common/common-web</module>
    <!--    <module>../common/common-tracer</module>-->
        <module>../business/base-service</module>
        <module>../business/sms-service</module>
        <module>../business/im-service</module>