Browse Source

Merge branch 'dev' of http://192.168.1.220:10080/jiwei/wlyy2.0 into dev

# Conflicts:
#	svr/svr-wlyy-health-bank/src/main/java/com/yihu/jw/service/CreditsDetailService.java
#	svr/svr-wlyy-specialist/pom.xml
#	svr/svr-wlyy-specialist/src/main/java/com/yihu/jw/service/SpecialistScreenResultService.java
wangzhinan 6 years ago
parent
commit
45588a98ac
100 changed files with 1804 additions and 1418 deletions
  1. 26 26
      app/app-iot-server/src/main/java/com/yihu/iot/controller/common/FileUploadController.java
  2. 2 2
      app/app-iot-server/src/main/java/com/yihu/iot/controller/common/IotSystemDictController.java
  3. 30 30
      app/app-iot-server/src/main/java/com/yihu/iot/controller/company/IotCompanyController.java
  4. 34 34
      app/app-iot-server/src/main/java/com/yihu/iot/controller/device/IotDeviceController.java
  5. 21 21
      app/app-iot-server/src/main/java/com/yihu/iot/controller/device/IotDeviceOrderController.java
  6. 15 15
      app/app-iot-server/src/main/java/com/yihu/iot/controller/device/IotDeviceQualityController.java
  7. 22 22
      app/app-iot-server/src/main/java/com/yihu/iot/controller/product/IotProductController.java
  8. 3 3
      app/app-iot-server/src/main/java/com/yihu/iot/controller/third/wlyy/MonitoringHealthPlatformController.java
  9. 6 6
      app/app-iot-server/src/main/java/com/yihu/iot/service/common/SystemDictService.java
  10. 30 30
      app/app-iot-server/src/main/java/com/yihu/iot/service/company/CompanyService.java
  11. 20 20
      app/app-iot-server/src/main/java/com/yihu/iot/service/device/DeviceOrderService.java
  12. 29 29
      app/app-iot-server/src/main/java/com/yihu/iot/service/device/DeviceService.java
  13. 14 14
      app/app-iot-server/src/main/java/com/yihu/iot/service/device/IotDeviceQualityService.java
  14. 18 18
      app/app-iot-server/src/main/java/com/yihu/iot/service/product/ProductService.java
  15. 6 6
      app/app-iot-server/src/main/java/com/yihu/iot/service/third/wlyy/MonitoringHealthService.java
  16. 5 0
      app/public-health-server/pom.xml
  17. 15 15
      app/public-health-server/src/main/java/com/yihu/health/controller/archives/ArchivesController.java
  18. 9 9
      app/public-health-server/src/main/java/com/yihu/health/service/archives/ArchivesService.java
  19. 2 2
      app/public-health-server/src/main/java/com/yihu/health/service/dictionary/SystemDictService.java
  20. 2 2
      common/common-entity/src/main/java/com/yihu/jw/entity/base/function/FunctionDO.java
  21. 5 2
      common/common-entity/src/main/java/com/yihu/jw/entity/base/message/Message.java
  22. 10 5
      common/common-entity/src/main/java/com/yihu/jw/entity/base/message/MessageSubscriberDO.java
  23. 2 2
      common/common-entity/src/main/java/com/yihu/jw/entity/base/module/ModuleDO.java
  24. 15 18
      common/common-entity/src/main/java/com/yihu/jw/entity/base/module/ModuleFunctionDO.java
  25. 139 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/oauth2/OauthClientDetailsDO.java
  26. 1 1
      common/common-entity/src/main/java/com/yihu/jw/entity/base/org/Organization.java
  27. 33 25
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/RoleDO.java
  28. 47 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/role/RoleModuleFunctionDO.java
  29. 37 2
      common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasDO.java
  30. 5 2
      common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasDefaultModuleDO.java
  31. 7 7
      common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasModuleDO.java
  32. 0 22
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/EmployHideModuleFunctionDO.java
  33. 0 56
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/EmployRoleDO.java
  34. 0 36
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/RoleModuleFunctionDO.java
  35. 170 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserDO.java
  36. 49 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserHideModuleFunctionDO.java
  37. 39 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserRoleDO.java
  38. 1 1
      common/common-entity/src/main/java/com/yihu/jw/wlyy/agreement/WlyyAgreementDO.java
  39. 1 1
      common/common-entity/src/main/java/com/yihu/jw/wlyy/agreement/WlyyAgreementKpiDO.java
  40. 1 1
      common/common-entity/src/main/java/com/yihu/jw/wlyy/agreement/WlyyAgreementKpiLogDO.java
  41. 1 1
      common/common-entity/src/main/java/com/yihu/jw/wlyy/agreement/WlyySignFamilyDO.java
  42. 1 1
      common/common-entity/src/main/java/com/yihu/jw/wlyy/hospital/BaseOrgDO.java
  43. 1 1
      common/common-entity/src/main/java/com/yihu/jw/wlyy/hospital/BaseOrgDeptDO.java
  44. 1 1
      common/common-entity/src/main/java/com/yihu/jw/wlyy/hospital/BaseOrgHospitalDO.java
  45. 1 1
      common/common-entity/src/main/java/com/yihu/jw/wlyy/patient/BasePatientExtendDO.java
  46. 1 1
      common/common-entity/src/main/java/com/yihu/jw/wlyy/patient/BasePatientWechatDO.java
  47. 1 1
      common/common-entity/src/main/java/com/yihu/jw/wlyy/patient/WlyyAdvertisementDO.java
  48. 13 12
      common/common-exception/src/main/java/com/yihu/jw/exception/ApiException.java
  49. 11 11
      common/common-fegin/src/main/java/com/yihu/jw/fegin/archives/ArchivesFeign.java
  50. 48 48
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/FunctionFeign.java
  51. 54 54
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/ModuleFeign.java
  52. 26 26
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SaasFeign.java
  53. 45 45
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SystemDictFeign.java
  54. 48 48
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SystemDictListFeign.java
  55. 8 8
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/login/LoginFeign.java
  56. 4 4
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/sms/RegisterSmsFeign.java
  57. 14 14
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/BaseMenuFeign.java
  58. 12 12
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/BaseRoleFeign.java
  59. 12 12
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/EmployFeign.java
  60. 2 2
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/AccessTokenFeign.java
  61. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/GraphicMessageFeign.java
  62. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatFeign.java
  63. 10 10
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatMenuFeign.java
  64. 8 8
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatTemplateFeign.java
  65. 11 11
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/archives/ArchivesFallbackFactory.java
  66. 80 80
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/FunctionFeignFallbackFactory.java
  67. 9 9
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/LoginFeignFallbackFactory.java
  68. 94 94
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/ModuleFeignFallbackFactory.java
  69. 26 26
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SaasFeignFallbackFactory.java
  70. 73 73
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SystemDictFeignFallbackFactory.java
  71. 79 79
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/base/SystemDictListFeignFallbackFactory.java
  72. 8 8
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/BaseMenuFeignFallbackFactory.java
  73. 12 12
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/BaseRoleFeignFallbackFactory.java
  74. 12 12
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/user/EmployeeFeignFallbackFactory.java
  75. 2 2
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/AccessTokenFeignFallbackFactory.java
  76. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/GraphicMessageFeignFallbackFactory.java
  77. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatFeignFallbackFactory.java
  78. 10 10
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatMenuFeignFallbackFactory.java
  79. 8 8
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/base/wx/WechatTemplateFeignFallbackFactory.java
  80. 5 5
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/common/IotFileUploadFallbackFactory.java
  81. 2 2
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/common/IotSystemDictFallbackFactory.java
  82. 16 16
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/company/IotCompanyFallbackFactory.java
  83. 4 4
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataInputFeignFallbackFactory.java
  84. 11 12
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataSearchFeignFallbackFactory.java
  85. 2 2
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/data_input/DataStandardConvertFeignFallbackFactory.java
  86. 22 22
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceFallbackFactory.java
  87. 15 15
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceOrderFallbackFactory.java
  88. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotDeviceQualityFallbackFactory.java
  89. 10 10
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/device/IotPatientDeviceFallbackFactory.java
  90. 8 8
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/iot/product/IotProductFallbackFactory.java
  91. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementFeignFallbackFactory.java
  92. 7 7
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementKpiFeignFallbackFactory.java
  93. 5 5
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyyAgreementKpiLogFeignFallbackFactory.java
  94. 6 6
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/agreement/WlyySignFamilyFeignFallbackFactory.java
  95. 9 9
      common/common-fegin/src/main/java/com/yihu/jw/fegin/fallbackfactory/wlyy/patient/AdvertisementFeignFallbackFactory.java
  96. 5 5
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/common/IotFileUploadFeign.java
  97. 2 2
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/common/IotSystemDictFeign.java
  98. 12 12
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/company/IotCompanyFeign.java
  99. 4 4
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataInputFeign.java
  100. 0 0
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataSearchFeign.java

+ 26 - 26
app/app-iot-server/src/main/java/com/yihu/iot/controller/common/FileUploadController.java

@ -3,7 +3,7 @@ package com.yihu.iot.controller.common;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.yihu.fastdfs.FastDFSUtil;
import com.yihu.iot.service.common.FileUploadService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import io.swagger.annotations.Api;
@ -41,24 +41,24 @@ public class FileUploadController extends BaseController {
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream_img)
    @ApiOperation(value = "文件流上传图片", notes = "文件流上传图片")
    public Envelop<UploadVO> uploadImg(@ApiParam(value = "文件", required = true)
    public MixEnvelop<UploadVO, UploadVO> uploadImg(@ApiParam(value = "文件", required = true)
                                       @RequestParam(value = "file", required = true) MultipartFile file){
        try {
            // 得到文件的完整名称  xxx.txt
            String fullName = file.getOriginalFilename();
            if(StringUtils.isBlank(fullName)){
                return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
                return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
            }
            //得到文件类型
            String fileType = fullName.substring(fullName.lastIndexOf(".") + 1).toLowerCase();
            if(StringUtils.isBlank(fileType)||!"jpg,jpeg,png".contains(fileType)){
                return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
                return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
            }
            long size = file.getSize();
            long max = 5*1024*1024;
            if(size>max){
                return Envelop.getError("文件大小不超过5M",IotRequestMapping.api_iot_fail);
                return MixEnvelop.getError("文件大小不超过5M",IotRequestMapping.api_iot_fail);
            }
            String fileName = fullName.substring(0, fullName.lastIndexOf("."));
@ -76,37 +76,37 @@ public class FileUploadController extends BaseController {
            }else {
                uploadVO = fileUploadService.request(request,file.getInputStream(),fullName);
                if(uploadVO==null){
                    return Envelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                    return MixEnvelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                }
            }
            return Envelop.getSuccess(IotRequestMapping.Common.message_success_create, uploadVO);
            return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_create, uploadVO);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }
    }
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream_attachment)
    @ApiOperation(value = "文件流上传附件", notes = "文件流上传附件")
    public Envelop<UploadVO> uploadAttachment(@ApiParam(value = "文件", required = true)
    public MixEnvelop<UploadVO, UploadVO> uploadAttachment(@ApiParam(value = "文件", required = true)
                                              @RequestParam(value = "file", required = true) MultipartFile file){
        try {
            // 得到文件的完整名称  xxx.txt
            String fullName = file.getOriginalFilename();
            if(StringUtils.isBlank(fullName)){
                return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
                return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
            }
            //得到文件类型
            String fileType = fullName.substring(fullName.lastIndexOf(".") + 1).toLowerCase();
            if(StringUtils.isBlank(fileType)||!"doc、docx、pdf、xls、xlsx、jpg、jpeg、png".contains(fileType)){
                return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
                return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload_format,IotRequestMapping.api_iot_fail);
            }
            long size = file.getSize();
            long max = 5*1024*1024;
            if(size>max){
                return Envelop.getError("文件大小不超过5M",IotRequestMapping.api_iot_fail);
                return MixEnvelop.getError("文件大小不超过5M",IotRequestMapping.api_iot_fail);
            }
            String fileName = fullName.substring(0, fullName.lastIndexOf("."));
@ -124,20 +124,20 @@ public class FileUploadController extends BaseController {
            }else {
                uploadVO = fileUploadService.request(request,file.getInputStream(),fullName);
                if(uploadVO==null){
                    return Envelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                    return MixEnvelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                }
            }
            return Envelop.getSuccess(IotRequestMapping.Common.message_success_create, uploadVO);
            return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_create, uploadVO);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }
    }
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream)
    @ApiOperation(value = "文件流上传文件", notes = "文件流上传文件")
    public Envelop<UploadVO> uploadStream(@ApiParam(value = "文件", required = true) @RequestParam(value = "file", required = true) MultipartFile file) {
    public MixEnvelop<UploadVO, UploadVO> uploadStream(@ApiParam(value = "文件", required = true) @RequestParam(value = "file", required = true) MultipartFile file) {
        try {
            // 得到文件的完整名称  xxx.txt
            String fullName = file.getOriginalFilename();
@ -158,20 +158,20 @@ public class FileUploadController extends BaseController {
            }else {
                uploadVO = fileUploadService.request(request,file.getInputStream(),fullName);
                if(uploadVO==null){
                    return Envelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                    return MixEnvelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                }
            }
            return Envelop.getSuccess(IotRequestMapping.Common.message_success_create, uploadVO);
            return MixEnvelop.getSuccess(IotRequestMapping.Common.message_success_create, uploadVO);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }
    }
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_string)
    @ApiOperation(value = "base64上传图片",notes = "base64上传图片")
    public Envelop<UploadVO> uploadImages(@ApiParam(name = "jsonData", value = "头像转化后的输入流") @RequestBody String jsonData) throws Exception {
    public MixEnvelop<UploadVO, UploadVO> uploadImages(@ApiParam(name = "jsonData", value = "头像转化后的输入流") @RequestBody String jsonData) throws Exception {
        try {
            String date = URLDecoder.decode(jsonData,"UTF-8");
@ -197,22 +197,22 @@ public class FileUploadController extends BaseController {
            }else {
                uploadVO = fileUploadService.request(request,inputStream,"");
                if(uploadVO ==null){
                    return Envelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                    return MixEnvelop.getError("文件上传失败",IotRequestMapping.api_iot_fail);
                }
            }
            //返回文件路径
            return Envelop.getSuccess(IotRequestMapping.FileUpload.message_success_upload, uploadVO);
            return MixEnvelop.getSuccess(IotRequestMapping.FileUpload.message_success_upload, uploadVO);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }
    }
    @RequestMapping(value = "commonUpload", method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation("公共的文件上传")
    public Envelop<UploadVO> commonUpload(HttpServletRequest request) {
    public MixEnvelop<UploadVO, UploadVO> commonUpload(HttpServletRequest request) {
        InputStream in = null;
        try {
            String paths = request.getParameter("filePaths");
@ -247,10 +247,10 @@ public class FileUploadController extends BaseController {
            UploadVO uploadVO = new UploadVO();
            uploadVO.setFullUri(result.get("fileId").toString().replaceAll("\"", ""));
            uploadVO.setFullUrl(fastdfs_file_url + result.get("fileId").toString().replaceAll("\"", ""));
            return Envelop.getSuccess(IotRequestMapping.FileUpload.message_success_upload, result);
            return MixEnvelop.getSuccess(IotRequestMapping.FileUpload.message_success_upload, result);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }finally {
            if(in!=null){
                try {

+ 2 - 2
app/app-iot-server/src/main/java/com/yihu/iot/controller/common/IotSystemDictController.java

@ -1,7 +1,7 @@
package com.yihu.iot.controller.common;
import com.yihu.iot.service.common.SystemDictService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.dict.IotSystemDictVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import io.swagger.annotations.Api;
@ -26,7 +26,7 @@ public class IotSystemDictController  extends BaseController{
    @GetMapping(value = IotRequestMapping.System.findDictByCode)
    @ApiOperation(value = "获取字典列表(不分页)")
    public Envelop<IotSystemDictVO> getList(
    public MixEnvelop<IotSystemDictVO, IotSystemDictVO> getList(
            @ApiParam(name = "dictName", value = "字典名称", defaultValue = "COMPANY_TYPE")
            @RequestParam(value = "dictName", required = true) String dictName) throws Exception {
        return systemDictService.getList(dictName);

+ 30 - 30
app/app-iot-server/src/main/java/com/yihu/iot/controller/company/IotCompanyController.java

@ -2,7 +2,7 @@ package com.yihu.iot.controller.company;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.company.CompanyService;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -25,87 +25,87 @@ public class IotCompanyController extends BaseController {
    @GetMapping(value = IotRequestMapping.Company.findCompanyPage)
    @ApiOperation(value = "分页查找企业", notes = "分页查找企业")
    public Envelop<IotCompanyVO> findCompanyPage(@ApiParam(name = "name", value = "供应商名称或联系人姓名", defaultValue = "")
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findCompanyPage(@ApiParam(name = "name", value = "供应商名称或联系人姓名", defaultValue = "")
                                                 @RequestParam(value = "name", required = false) String name,
                                                 @ApiParam(name = "status", value = "审核状态", defaultValue = "")
                                                    @ApiParam(name = "status", value = "审核状态", defaultValue = "")
                                                 @RequestParam(value = "status", required = false) String status,
                                                 @ApiParam(name = "type", value = "企业类型", defaultValue = "")
                                                    @ApiParam(name = "type", value = "企业类型", defaultValue = "")
                                                 @RequestParam(value = "type", required = false) String type,
                                                 @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                    @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                 @RequestParam(value = "page", required = false) Integer page,
                                                 @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                    @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                 @RequestParam(value = "size", required = false) Integer size){
        try {
            return companyService.findCompanyPage(name,status,type,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Company.addCompany)
    @ApiOperation(value = "创建企业", notes = "创建企业")
    public Envelop<IotCompanyVO> addCompany(@ApiParam(name = "jsonData", value = "json串", defaultValue = "")
    public MixEnvelop<IotCompanyVO, IotCompanyVO> addCompany(@ApiParam(name = "jsonData", value = "json串", defaultValue = "")
                                            @RequestParam(value = "jsonData", required = true)String jsonData) {
        try {
            return companyService.addCompany(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Company.findCompanyById)
    @ApiOperation(value = "根据id查找企业", notes = "根据id查找企业")
    public Envelop<IotCompanyVO> findByCode(@ApiParam(name = "id", value = "企业id")
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findByCode(@ApiParam(name = "id", value = "企业id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return companyService.findByCode(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Company.findByBusinessLicense)
    @ApiOperation(value = "根据营业执照号查找企业", notes = "根据营业执照号查找企业")
    public Envelop<IotCompanyVO> findByBusinessLicense(@ApiParam(name = "businessLicense", value = "营业执照号")
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findByBusinessLicense(@ApiParam(name = "businessLicense", value = "营业执照号")
                                                       @RequestParam(value = "businessLicense", required = true) String businessLicense) {
        try {
            return companyService.findByBusinessLicense(businessLicense);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Company.delCompany)
    @ApiOperation(value = "删除企业", notes = "删除企业")
    public Envelop<IotCompanyVO> delCompany(@ApiParam(name = "id", value = "企业id")
    public MixEnvelop<IotCompanyVO, IotCompanyVO> delCompany(@ApiParam(name = "id", value = "企业id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return companyService.delCompany(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Company.updCompany)
    @ApiOperation(value = "修改企业信息", notes = "修改企业信息")
    public Envelop<IotCompanyVO> updCompany(@ApiParam(name = "jsonData", value = "json串", defaultValue = "")
    public MixEnvelop<IotCompanyVO, IotCompanyVO> updCompany(@ApiParam(name = "jsonData", value = "json串", defaultValue = "")
                                            @RequestParam(value = "jsonData", required = true)String jsonData) {
        try {
            return companyService.updCompany(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertPage)
    @ApiOperation(value = "分页获取企业证书", notes = "分页获取企业证书")
    public Envelop<IotCompanyCertificateVO> findCompanyCertPage
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertPage
            (@ApiParam(name = "name", value = "证书名称", defaultValue = "")
             @RequestParam(value = "name", required = false) String name,
             @ApiParam(name = "companyId", value = "企业id", defaultValue = "")
@ -124,69 +124,69 @@ public class IotCompanyController extends BaseController {
            return companyService.findCompanyCertPage(name,page,size,companyId);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertById)
    @ApiOperation(value = "根据id查找企业证书", notes = "根据id查找企业证书")
    public Envelop<IotCompanyCertificateVO> findCompanyCertById(@ApiParam(name = "id", value = "企业证书id")
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertById(@ApiParam(name = "id", value = "企业证书id")
                                                                @RequestParam(value = "id", required = true) String id) {
        try {
            return companyService.findCompanyCertById(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertByCompanyId)
    @ApiOperation(value = "根据企业id查找企业证书", notes = "根据企业id查找企业证书")
    public Envelop<IotCompanyCertificateVO> findCompanyCertByCompanyId(@ApiParam(name = "companyId", value = "企业id")
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertByCompanyId(@ApiParam(name = "companyId", value = "企业id")
                                                                       @RequestParam(value = "companyId", required = true) String companyId) {
        try {
            return companyService.findCompanyCertByCompanyId(companyId);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Company.addCompanyCert)
    @ApiOperation(value = "创建企业证书", notes = "创建企业证书")
    public Envelop<IotCompanyCertificateVO> addCompanyCert(@ApiParam(name = "jsonData", value = "json串", defaultValue = "")
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> addCompanyCert(@ApiParam(name = "jsonData", value = "json串", defaultValue = "")
                                                           @RequestParam(value = "jsonData", required = true)String jsonData) {
        try {
            return companyService.addCompanyCert(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Company.changePassWord)
    @ApiOperation(value = "修改用户密码", notes = "修改用户密码")
    public Envelop changePassWord(@ApiParam(name = "userId", value = "用户id", defaultValue = "")
    public MixEnvelop changePassWord(@ApiParam(name = "userId", value = "用户id", defaultValue = "")
                                  @RequestParam(value = "userId", required = true)String userId,
                                  @ApiParam(name = "passWord", value = "密码", defaultValue = "")
                                     @ApiParam(name = "passWord", value = "密码", defaultValue = "")
                                  @RequestParam(value = "passWord", required = true)String passWord){
        try {
            return companyService.changePassWord(userId,passWord);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Company.delCompanyCert)
    @ApiOperation(value = "删除企业证书", notes = "删除企业证书")
    public Envelop<IotCompanyCertificateVO> delCompanyCert(@ApiParam(name = "id", value = "id", defaultValue = "")
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> delCompanyCert(@ApiParam(name = "id", value = "id", defaultValue = "")
                                                           @RequestParam(value = "id", required = true)String id) {
        try {
            return companyService.delCompanyCert(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }

+ 34 - 34
app/app-iot-server/src/main/java/com/yihu/iot/controller/device/IotDeviceController.java

@ -2,8 +2,8 @@ package com.yihu.iot.controller.device;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.device.DeviceService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
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;
@ -28,107 +28,107 @@ public class IotDeviceController extends BaseController{
    @PostMapping(value = IotRequestMapping.Device.api_create)
    @ApiOperation(value = "创建设备", notes = "创建设备")
    public Envelop<IotDeviceVO> create(@ApiParam(name = "json_data", value = "", defaultValue = "")
    public MixEnvelop<IotDeviceVO, IotDeviceVO> create(@ApiParam(name = "json_data", value = "", defaultValue = "")
                          @RequestParam String jsonData) {
        try {
            return deviceService.create(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Device.api_getById)
    @ApiOperation(value = "根据code查找设备", notes = "根据code查找设备")
    public Envelop<IotDeviceVO> findByCode(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotDeviceVO, IotDeviceVO> findByCode(@ApiParam(name = "id", value = "id")
                              @RequestParam(value = "id", required = true) String id ) {
        try {
            return deviceService.findByCode(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Device.isSnExist)
    @ApiOperation(value = "sn码是否存在", notes = "sn码是否存在")
    public Envelop<ExistVO> isSnExist(@ApiParam(name = "sn", value = "sn")
    public MixEnvelop<ExistVO, ExistVO> isSnExist(@ApiParam(name = "sn", value = "sn")
                                      @RequestParam(value = "sn", required = true) String sn) {
        try {
            return deviceService.isSnExist(sn);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Device.isSimExist)
    @ApiOperation(value = "sim卡号是否存在", notes = "sim卡号是否存在")
    public Envelop<ExistVO> isSimExist(@ApiParam(name = "sim", value = "sim")
    public MixEnvelop<ExistVO, ExistVO> isSimExist(@ApiParam(name = "sim", value = "sim")
                                           @RequestParam(value = "sim", required = true) String sim) {
        try {
            return deviceService.isSimExist(sim);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Device.api_delete)
    @ApiOperation(value = "删除设备", notes = "删除设备")
    public Envelop<IotDeviceVO> delDevice(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotDeviceVO, IotDeviceVO> delDevice(@ApiParam(name = "id", value = "id")
                                          @RequestParam(value = "id", required = true) String id
    ) {
        try {
            return deviceService.delDevice(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Device.api_update)
    @ApiOperation(value = "修改设备", notes = "修改设备")
    public BaseEnvelop updDevice(@ApiParam(name = "jsonData", value = "", defaultValue = "")
    public Envelop updDevice(@ApiParam(name = "jsonData", value = "", defaultValue = "")
                                 @RequestParam String jsonData) {
        try {
            return deviceService.updDevice(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return BaseEnvelop.getError(e.getMessage());
            return Envelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Device.updSim)
    @ApiOperation(value = "修改sim卡号", notes = "修改sim卡号")
    public BaseEnvelop updSim(@ApiParam(name = "sim", value = "sim")
    public Envelop updSim(@ApiParam(name = "sim", value = "sim")
                              @RequestParam(value = "sim", required = true) String sim,
                              @ApiParam(name = "id", value = "设备id")
                          @ApiParam(name = "id", value = "设备id")
                              @RequestParam(value = "id", required = true) String id) {
        try {
            return deviceService.updSim(sim,id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Device.api_queryPage)
    @ApiOperation(value = "分页查找设备", notes = "分页查找设备")
    public Envelop<IotDeviceVO> findProductPageByCompanyId(@ApiParam(name = "sn", value = "SN码或SIM卡号", defaultValue = "")
    public MixEnvelop<IotDeviceVO, IotDeviceVO> findProductPageByCompanyId(@ApiParam(name = "sn", value = "SN码或SIM卡号", defaultValue = "")
                                                           @RequestParam(value = "sn", required = false) String sn,
                                                           @ApiParam(name = "hospital", value = "社区医院", defaultValue = "")
                                                              @ApiParam(name = "hospital", value = "社区医院", defaultValue = "")
                                                           @RequestParam(value = "hospital", required = false) String hospital,
                                                           @ApiParam(name = "orderId", value = "订单id", defaultValue = "")
                                                              @ApiParam(name = "orderId", value = "订单id", defaultValue = "")
                                                           @RequestParam(value = "orderId", required = false) String orderId,
                                                           @ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
                                                              @ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
                                                           @RequestParam(value = "purcharseId", required = false) String purcharseId,
                                                           @ApiParam(name = "isBinding", value = "是否绑定(1已绑定,2未绑定)", defaultValue = "")
                                                              @ApiParam(name = "isBinding", value = "是否绑定(1已绑定,2未绑定)", defaultValue = "")
                                                           @RequestParam(value = "isBinding", required = false) Integer isBinding,
                                                           @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                              @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                           @RequestParam(value = "page", required = false) Integer page,
                                                           @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                              @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                           @RequestParam(value = "size", required = false) Integer size){
        try {
            if(page == null|| page < 0){
@ -140,44 +140,44 @@ public class IotDeviceController extends BaseController{
            return deviceService.findProductPageByCompanyId(sn,hospital,orderId,purcharseId,isBinding,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Device.isImportDevice)
    @ApiOperation(value = "是否正在导入设备数据", notes = "是否正在导入设备数据")
    public Envelop<ExistVO> isImportDevice(@ApiParam(name = "purcharseId", value = "purcharseId")
    public MixEnvelop<ExistVO, ExistVO> isImportDevice(@ApiParam(name = "purcharseId", value = "purcharseId")
                                           @RequestParam(value = "purcharseId", required = true) String purcharseId
    ) {
        try {
            return deviceService.isImportDevice(purcharseId);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }
    }
    @PostMapping(value = IotRequestMapping.Device.importDevice)
    @ApiOperation(value = "设备导入", notes = "设备导入")
    public Envelop<IotDeviceImportRecordVO> uploadStream(@ApiParam(value = "文件", required = true)
    public MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> uploadStream(@ApiParam(value = "文件", required = true)
                                          @RequestParam(value = "file", required = true) MultipartFile file,
                                          @ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
                                                            @ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
                                          @RequestParam(value = "purcharseId", required = true) String purcharseId) {
        try {
            return deviceService.uploadStream(file,purcharseId,request);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
            return MixEnvelop.getError(IotRequestMapping.FileUpload.message_fail_upload, IotRequestMapping.api_iot_fail);
        }
    }
    @GetMapping(value = IotRequestMapping.Device.queryImportRecordPage)
    @ApiOperation(value = "分页查找导入记录", notes = "分页查找导入记录")
    public Envelop<IotDeviceImportRecordVO> queryImportRecordPage(@ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
    public MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> queryImportRecordPage(@ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
                                                           @RequestParam(value = "purcharseId", required = true) String purcharseId,
                                                                       @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                                     @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                           @RequestParam(value = "page", required = false) Integer page,
                                                                       @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                                     @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                           @RequestParam(value = "size", required = false) Integer size){
        try {
            if(page == null|| page < 0){
@ -189,7 +189,7 @@ public class IotDeviceController extends BaseController{
            return queryImportRecordPage(purcharseId,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }

+ 21 - 21
app/app-iot-server/src/main/java/com/yihu/iot/controller/device/IotDeviceOrderController.java

@ -2,7 +2,7 @@ package com.yihu.iot.controller.device;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.device.DeviceOrderService;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -25,31 +25,31 @@ public class IotDeviceOrderController extends BaseController {
    @PostMapping(value = IotRequestMapping.DeviceOrder.createOrder)
    @ApiOperation(value = "创建设备订单", notes = "创建设备订单")
    public Envelop<IotOrderVO> create(@ApiParam(name = "jsonData", value = "", defaultValue = "")
    public MixEnvelop<IotOrderVO, IotOrderVO> create(@ApiParam(name = "jsonData", value = "", defaultValue = "")
                          @RequestParam String jsonData) {
        try {
            return deviceOrderService.create(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceOrder.findById)
    @ApiOperation(value = "根据id查找设备订单", notes = "根据id查找设备订单")
    public Envelop<IotDeviceOrderVO> findByCode(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> findByCode(@ApiParam(name = "id", value = "id")
                              @RequestParam(value = "id", required = true) String id) {
        try {
            return deviceOrderService.findByCode(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceOrder.findPage)
    @ApiOperation(value = "分页查找设备订单", notes = "分页查找设备订单")
    public Envelop<IotDeviceOrderVO> findPage(@ApiParam(name = "name", value = "供应商名称或负责人姓名", defaultValue = "")
    public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> findPage(@ApiParam(name = "name", value = "供应商名称或负责人姓名", defaultValue = "")
                                                 @RequestParam(value = "name", required = false) String name,
                                                 @ApiParam(name = "type", value = "企业类型", defaultValue = "")
                                                 @RequestParam(value = "type", required = false) String type,
@ -67,53 +67,53 @@ public class IotDeviceOrderController extends BaseController {
            return deviceOrderService.findPage(name,type,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.DeviceOrder.delOrder)
    @ApiOperation(value = "删除订单", notes = "删除订单")
    public Envelop<IotDeviceOrderVO> delOrder(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> delOrder(@ApiParam(name = "id", value = "id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return deviceOrderService.delOrder(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.DeviceOrder.delPurchase)
    @ApiOperation(value = "删除采购订单", notes = "删除采购订单")
    public Envelop<IotOrderPurchaseVO> delPurchase(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> delPurchase(@ApiParam(name = "id", value = "id")
                                                   @RequestParam(value = "id", required = true) String id) {
        try {
            return deviceOrderService.delPurchase(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.DeviceOrder.updOrder)
    @ApiOperation(value = "修改订单", notes = "修改订单")
    public Envelop<IotOrderVO> updOrder(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
    public MixEnvelop<IotOrderVO, IotOrderVO> updOrder(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
                                            @RequestParam(value = "jsonData", required = false)String jsonData) {
        try {
            return deviceOrderService.updOrder(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceOrder.findPurcharsePage)
    @ApiOperation(value = "分页查找采购清单", notes = "分页查找采购清单")
    public Envelop<IotOrderPurchaseVO> findPurcharsePage(@ApiParam(name = "orderId", value = "订单id", defaultValue = "")
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findPurcharsePage(@ApiParam(name = "orderId", value = "订单id", defaultValue = "")
                                                     @RequestParam(value = "orderId", required = true) String orderId,
                                                         @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                            @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                     @RequestParam(value = "page", required = false) Integer page,
                                                         @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                            @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                     @RequestParam(value = "size", required = false) Integer size){
        try {
            if(page == null|| page < 0){
@ -125,26 +125,26 @@ public class IotDeviceOrderController extends BaseController {
            return deviceOrderService.findPurcharsePage(orderId,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceOrder.findPurcharseById)
    @ApiOperation(value = "根据id查找采购订单", notes = "根据id查找采购订单")
    public Envelop<IotOrderPurchaseVO>  findPurcharseById(
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findPurcharseById(
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id) {
        try {
            return deviceOrderService.findPurcharseById(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceOrder.findQualityPage)
    @ApiOperation(value = "质检管理", notes = "质检管理")
    public Envelop<IotOrderPurchaseVO> findQualityPage(
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findQualityPage(
            @ApiParam(name = "qualityStatus", value = "质检状态", defaultValue = "")
            @RequestParam(value = "qualityStatus", required = false) String qualityStatus,
            @ApiParam(name = "orderNo", value = "订单编号", defaultValue = "")
@ -167,7 +167,7 @@ public class IotDeviceOrderController extends BaseController {
            return deviceOrderService.findQualityPage(qualityStatus, orderNo, startTime, endTime, page, size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }

+ 15 - 15
app/app-iot-server/src/main/java/com/yihu/iot/controller/device/IotDeviceQualityController.java

@ -2,7 +2,7 @@ package com.yihu.iot.controller.device;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.device.IotDeviceQualityService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceQualityInspectionPlanVO;
import com.yihu.jw.rm.iot.IotRequestMapping;
import io.swagger.annotations.Api;
@ -23,33 +23,33 @@ public class IotDeviceQualityController extends BaseController{
    @PostMapping(value = IotRequestMapping.DeviceQuality.addQualityPlan)
    @ApiOperation(value = "创建设备质检", notes = "创建设备质检")
    public Envelop<IotDeviceQualityInspectionPlanVO> create(@ApiParam(name = "jsonData", value = "", defaultValue = "")
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> create(@ApiParam(name = "jsonData", value = "", defaultValue = "")
                          @RequestParam String jsonData) {
        try {
            return iotDeviceQualityService.create(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceQuality.findById)
    @ApiOperation(value = "根据code查找设备质检", notes = "根据code查找设备质检")
    public Envelop<IotDeviceQualityInspectionPlanVO> findByCode(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> findByCode(@ApiParam(name = "id", value = "id")
                              @RequestParam(value = "id", required = true) String id
    ) {
        try {
            return iotDeviceQualityService.findByCode(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.DeviceQuality.queryQualityPlanPage)
    @ApiOperation(value = "分页获取设备质检计划", notes = "分页获取设备质检计划")
    public Envelop<IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(
            @ApiParam(name = "purcharseId", value = "采购id", defaultValue = "")
            @RequestParam(value = "purcharseId", required = false) String purcharseId,
            @ApiParam(name = "orderNo", value = "订单编号", defaultValue = "")
@ -66,47 +66,47 @@ public class IotDeviceQualityController extends BaseController{
            return iotDeviceQualityService.queryQualityPlanPage(purcharseId, orderNo, startTime, endTime, page, size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.DeviceQuality.delQualityPlan)
    @ApiOperation(value = "删除质检计划", notes = "删除质检计划")
    public Envelop<IotDeviceQualityInspectionPlanVO> delQualityPlan(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> delQualityPlan(@ApiParam(name = "id", value = "id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return iotDeviceQualityService.delQualityPlan(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.DeviceQuality.completeQualityPlan)
    @ApiOperation(value = "完成质检计划", notes = "完成质检计划")
    public Envelop<IotDeviceQualityInspectionPlanVO> completeQualityPlan(@ApiParam(name = "actualTime", value = "完成时间", defaultValue = "")
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completeQualityPlan(@ApiParam(name = "actualTime", value = "完成时间", defaultValue = "")
                                            @RequestParam(value = "actualTime", required = true) String actualTime,
                                            @ApiParam(name = "id", value = "id")
                                                                            @ApiParam(name = "id", value = "id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return iotDeviceQualityService.completeQualityPlan(actualTime, id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.DeviceQuality.completePlanByPurchaseId)
    @ApiOperation(value = "完成质检计划(按采购id)", notes = "完成质检计划(按采购id)")
    public Envelop<IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(@ApiParam(name = "actualTime", value = "完成时间", defaultValue = "")
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(@ApiParam(name = "actualTime", value = "完成时间", defaultValue = "")
                                                                              @RequestParam(value = "actualTime", required = true) String actualTime,
                                                                              @ApiParam(name = "purchaseId", value = "purchaseId")
                                                                                 @ApiParam(name = "purchaseId", value = "purchaseId")
                                                                              @RequestParam(value = "purchaseId", required = true) String purchaseId) {
        try {
            return iotDeviceQualityService.completePlanByPurchaseId(actualTime, purchaseId);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }

+ 22 - 22
app/app-iot-server/src/main/java/com/yihu/iot/controller/product/IotProductController.java

@ -3,7 +3,7 @@ package com.yihu.iot.controller.product;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.model.ehr.MStdDataSet;
import com.yihu.iot.service.product.ProductService;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -27,11 +27,11 @@ public class IotProductController extends BaseController {
    @GetMapping(value = IotRequestMapping.Product.data_sets)
    @ApiOperation(value = "测量数据", notes = "测量数据")
    public Envelop<MStdDataSet> data_sets(@ApiParam(name = "name", value = "名称", defaultValue = "")
    public MixEnvelop<MStdDataSet, MStdDataSet> data_sets(@ApiParam(name = "name", value = "名称", defaultValue = "")
                                         @RequestParam(value = "name", required = false) String name,
                                         @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                             @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                         @RequestParam(value = "page", required = false) Integer page,
                                         @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                             @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                         @RequestParam(value = "size", required = false) Integer size){
        try {
            if(page == null|| page < 0){
@ -43,14 +43,14 @@ public class IotProductController extends BaseController {
            return productService.data_sets(page, size, name);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Product.findProductPage)
    @ApiOperation(value = "分页查找产品", notes = "分页查找产品")
    public Envelop<IotProductBaseInfoVO> findCompanyPage(
    public MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> findCompanyPage(
            @ApiParam(name = "name", value = "注册证号或产品名称", defaultValue = "")
            @RequestParam(value = "name", required = false) String name,
            @ApiParam(name = "classify", value = "产品分类", defaultValue = "")
@ -71,19 +71,19 @@ public class IotProductController extends BaseController {
            return productService.findCompanyPage(name,classify,companyId,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Product.findProductPageByCompanyId)
    @ApiOperation(value = "分页查找产品(按企业id)", notes = "分页查找产品")
    public Envelop<IotProductBaseInfoVO> findProductPageByCompanyId(@ApiParam(name = "name", value = "产品名称", defaultValue = "")
    public MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> findProductPageByCompanyId(@ApiParam(name = "name", value = "产品名称", defaultValue = "")
                                                         @RequestParam(value = "name", required = false) String name,
                                                         @ApiParam(name = "companyId", value = "企业id", defaultValue = "")
                                                                       @ApiParam(name = "companyId", value = "企业id", defaultValue = "")
                                                         @RequestParam(value = "companyId", required = true) String companyId,
                                                         @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                                       @ApiParam(name = "page", value = "第几页", defaultValue = "")
                                                         @RequestParam(value = "page", required = false) Integer page,
                                                         @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                                       @ApiParam(name = "size", value = "每页记录数", defaultValue = "")
                                                         @RequestParam(value = "size", required = false) Integer size){
        try {
            if(page == null|| page < 0){
@ -95,69 +95,69 @@ public class IotProductController extends BaseController {
            return productService.findProductPageByCompanyId(name,companyId,page,size);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Product.addProduct)
    @ApiOperation(value = "创建产品", notes = "创建产品")
    public Envelop<IotProductVO> addProduct(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
    public MixEnvelop<IotProductVO, IotProductVO> addProduct(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
                                            @RequestParam(value = "jsonData", required = false)String jsonData) {
        try {
            return productService.addProduct(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Product.findProductById)
    @ApiOperation(value = "根据id查找产品", notes = "根据id查找产品")
    public Envelop<IotProductVO> findByCode(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotProductVO, IotProductVO> findByCode(@ApiParam(name = "id", value = "id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return productService.findByCode(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = IotRequestMapping.Product.maintenanceUnitById)
    @ApiOperation(value = "根据id查找产品的维护单位", notes = "根据id查找产品的维护单位")
    public Envelop<IotMaintenanceUnitVO> maintenanceUnitById(@ApiParam(name = "productId", value = "productId")
    public MixEnvelop<IotMaintenanceUnitVO, IotMaintenanceUnitVO> maintenanceUnitById(@ApiParam(name = "productId", value = "productId")
                                            @RequestParam(value = "productId", required = true) String productId) {
        try {
            return productService.maintenanceUnitById(productId);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Product.delProduct)
    @ApiOperation(value = "删除产品", notes = "删除产品")
    public Envelop<IotProductVO> delCompany(@ApiParam(name = "id", value = "id")
    public MixEnvelop<IotProductVO, IotProductVO> delCompany(@ApiParam(name = "id", value = "id")
                                            @RequestParam(value = "id", required = true) String id) {
        try {
            return productService.delCompany(id);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = IotRequestMapping.Product.updProduct)
    @ApiOperation(value = "修改产品信息", notes = "修改产品信息")
    public Envelop<IotProductVO> updCompany(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
    public MixEnvelop<IotProductVO, IotProductVO> updCompany(@ApiParam(name = "jsonData", value = "json", defaultValue = "")
                                            @RequestParam(value = "jsonData", required = false)String jsonData) {
        try {
            return productService.updCompany(jsonData);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }

+ 3 - 3
app/app-iot-server/src/main/java/com/yihu/iot/controller/third/wlyy/MonitoringHealthPlatformController.java

@ -2,7 +2,7 @@ package com.yihu.iot.controller.third.wlyy;
import com.yihu.iot.controller.common.BaseController;
import com.yihu.iot.service.third.wlyy.MonitoringHealthService;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.IotRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -36,7 +36,7 @@ public class MonitoringHealthPlatformController extends BaseController{
    @GetMapping(value = IotRequestMapping.PatientDevice.findLocationByIdCard)
    @ApiOperation(value = "根据idCard查询设备地址", notes = "根据idCard查询设备地址")
    public Envelop<LocationDataVO> findDeviceLocationsByIdCard(
    public MixEnvelop<LocationDataVO, LocationDataVO> findDeviceLocationsByIdCard(
            @ApiParam(name = "diseaseCondition", value = "病情:0绿标,1黄标,2红标,-1没有标注的居民", defaultValue = "")
            @RequestParam(value = "diseaseCondition",required = false) Integer diseaseCondition,
            @ApiParam(name = "type", value = "1高血压 2糖尿病", defaultValue = "")
@ -55,7 +55,7 @@ public class MonitoringHealthPlatformController extends BaseController{
            return monitoringHealthService.findDeviceLocations(diseaseCondition,page,pageSize,type);
        } catch (Exception e) {
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }

+ 6 - 6
app/app-iot-server/src/main/java/com/yihu/iot/service/common/SystemDictService.java

@ -5,7 +5,7 @@ import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.model.ObjectResult;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.dict.IotSystemDictVO;
import org.springframework.stereotype.Service;
@ -25,14 +25,14 @@ public class SystemDictService extends BaseService{
     * @return
     * @throws Exception
     */
    public Envelop<IotSystemDictVO> getList(String dictName) throws Exception {
    public MixEnvelop<IotSystemDictVO, IotSystemDictVO> getList(String dictName) throws Exception {
        if("HOSPITAL".equals(dictName)){
            return organizations();
        }
        Map<String, Object> params = new HashMap<>();
        params.put("dictName", dictName);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.System.FindDictByCode, params);
        Envelop<IotSystemDictVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotSystemDictVO, IotSystemDictVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -40,9 +40,9 @@ public class SystemDictService extends BaseService{
     * 获取组织机构信息
     * @return
     */
    private Envelop<IotSystemDictVO> organizations(){
    private MixEnvelop<IotSystemDictVO, IotSystemDictVO> organizations(){
        String url = "/organizations";
        Envelop<IotSystemDictVO> envelop = new Envelop<IotSystemDictVO>();
        MixEnvelop<IotSystemDictVO, IotSystemDictVO> envelop = new MixEnvelop<>();
        Map<String, Object> params = new HashMap<>();
        params.put("fields","");
        params.put("sorts","");
@ -53,7 +53,7 @@ public class SystemDictService extends BaseService{
            HttpResponse response = HttpHelper.get(profileInnerUrl + url, params);
            ObjectResult result =  objectMapper.readValue(response.getBody(),ObjectResult.class);
            if(result.isSuccessFlg()){
                envelop = objectMapper.readValue(response.getBody(),Envelop.class);
                envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
                envelop.setStatus(200);
            }else {
                envelop.setStatus(-1);

+ 30 - 30
app/app-iot-server/src/main/java/com/yihu/iot/service/company/CompanyService.java

@ -8,7 +8,7 @@ import com.yihu.iot.model.user.UserModel;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.company.IotCompanyCertificateVO;
import com.yihu.jw.restmodel.iot.company.IotCompanyVO;
import org.springframework.beans.factory.annotation.Value;
@ -38,7 +38,7 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyVO> findCompanyPage(String name,String status,String type,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findCompanyPage(String name, String status, String type, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("name", name);
        params.put("status", status);
@ -46,7 +46,7 @@ public class CompanyService extends BaseService {
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Company.FindCompanyPage, params);
        Envelop<IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyVO, IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -57,8 +57,8 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyVO> addCompany(String jsonData) throws IOException {
        Envelop<IotCompanyVO> envelop = new Envelop<IotCompanyVO>();
    public MixEnvelop<IotCompanyVO, IotCompanyVO> addCompany(String jsonData) throws IOException {
        MixEnvelop<IotCompanyVO, IotCompanyVO> envelop = new MixEnvelop<>();
        //新增ehr用户
        IotCompanyVO iotCompany = toModel(jsonData, IotCompanyVO.class);
@ -94,7 +94,7 @@ public class CompanyService extends BaseService {
            envelop.setMessage("该手机号码已存在");
            return envelop;
        }
        Envelop<UserModel> userModelEnvelop = updateUser(iotCompany);
        MixEnvelop<UserModel, UserModel> userModelEnvelop = updateUser(iotCompany);
        if(userModelEnvelop.getStatus()!=200){
            envelop.setStatus(-1);
            envelop.setMessage(userModelEnvelop.getMessage());
@ -104,7 +104,7 @@ public class CompanyService extends BaseService {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", toJson(iotCompany));
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Company.AddCompany, params);
        envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -114,7 +114,7 @@ public class CompanyService extends BaseService {
     * @param envelop
     * @return
     */
    private Envelop<IotCompanyVO> userVerification(IotCompanyVO iotCompany,Envelop<IotCompanyVO> envelop){
    private MixEnvelop<IotCompanyVO, IotCompanyVO> userVerification(IotCompanyVO iotCompany, MixEnvelop<IotCompanyVO, IotCompanyVO> envelop){
        if(StringUtils.isEmpty(iotCompany.getAccount())){
            envelop.setStatus(-1);
            envelop.setMessage("账号不能为空");
@ -168,7 +168,7 @@ public class CompanyService extends BaseService {
     * @param iotCompany
     * @return
     */
    private Envelop<UserModel> updateUser(IotCompanyVO iotCompany){
    private MixEnvelop<UserModel, UserModel> updateUser(IotCompanyVO iotCompany){
        String url = "/user/";
        UserModel userModel = new UserModel();
        userModel.setEmail(iotCompany.getContactsEmail());
@ -177,7 +177,7 @@ public class CompanyService extends BaseService {
        userModel.setTelephone(iotCompany.getContactsMobile());
        userModel.setRealName(iotCompany.getContactsName());
        userModel.setRole(roleId);
        Envelop envelop  = new Envelop();
        MixEnvelop envelop  = new MixEnvelop();
        Map<String, Object> params = new HashMap<>();
        params.put("user_json_data",toJson(userModel));
        try {
@ -208,8 +208,8 @@ public class CompanyService extends BaseService {
     * @param passWord
     * @return
     */
    public Envelop changePassWord(String userId,String passWord){
        Envelop envelop = new Envelop();
    public MixEnvelop changePassWord(String userId, String passWord){
        MixEnvelop envelop = new MixEnvelop();
        String url = "/users/changePassWord";
        Map<String, Object> params = new HashMap<>();
        params.put("user_id",userId);
@ -240,11 +240,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyVO> findByCode(String id) throws IOException {
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findByCode(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Company.FindCompanyById, params);
        Envelop<IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyVO, IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -253,11 +253,11 @@ public class CompanyService extends BaseService {
     * @param id
     * @return
     */
    public Envelop<IotCompanyCertificateVO> delCompanyCert(String id) throws IOException {
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> delCompanyCert(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Company.DelCompanyCert, params);
        Envelop<IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -267,11 +267,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyVO> findByBusinessLicense(String businessLicense) throws IOException {
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findByBusinessLicense(String businessLicense) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("businessLicense", businessLicense);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Company.FindByBusinessLicense, params);
        Envelop<IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyVO, IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -281,11 +281,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyVO> delCompany(String id) throws IOException {
    public MixEnvelop<IotCompanyVO, IotCompanyVO> delCompany(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Company.DelCompany, params);
        Envelop<IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyVO, IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -295,11 +295,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyVO> updCompany(String jsonData) throws IOException {
    public MixEnvelop<IotCompanyVO, IotCompanyVO> updCompany(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Company.UpdCompany, params);
        Envelop<IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyVO, IotCompanyVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -312,14 +312,14 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyCertificateVO> findCompanyCertPage(String name,Integer page,Integer size,String companyId) throws IOException{
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertPage(String name, Integer page, Integer size, String companyId) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("name", name);
        params.put("companyId", companyId);
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Company.FindCompanyCertPage, params);
        Envelop<IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -329,11 +329,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyCertificateVO> findCompanyCertById(String id) throws IOException {
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertById(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Company.FindCompanyCertById, params);
        Envelop<IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -343,11 +343,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyCertificateVO> findCompanyCertByCompanyId(String companyId) throws IOException {
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertByCompanyId(String companyId) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("companyId", companyId);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Company.FindCompanyCertByCompanyId, params);
        Envelop<IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -357,11 +357,11 @@ public class CompanyService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotCompanyCertificateVO> addCompanyCert(String jsonData) throws IOException {
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> addCompanyCert(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Company.AddCompanyCert, params);
        Envelop<IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
}

+ 20 - 20
app/app-iot-server/src/main/java/com/yihu/iot/service/device/DeviceOrderService.java

@ -4,7 +4,7 @@ import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -26,11 +26,11 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotOrderVO> create(String jsonData) throws IOException {
    public MixEnvelop<IotOrderVO, IotOrderVO> create(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.DeviceOrder.CreateOrder, params);
        Envelop<IotOrderVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotOrderVO, IotOrderVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -40,11 +40,11 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceOrderVO>  findByCode(String id) throws IOException {
    public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> findByCode(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.DeviceOrder.FindById, params);
        Envelop<IotDeviceOrderVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -57,14 +57,14 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceOrderVO> findPage(String name,String type,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> findPage(String name, String type, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("name", name);
        params.put("type", type);
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.DeviceOrder.FindPage, params);
        Envelop<IotDeviceOrderVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -74,11 +74,11 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceOrderVO> delOrder(String id) throws IOException {
    public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> delOrder(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.DeviceOrder.DelOrder, params);
        Envelop<IotDeviceOrderVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -88,11 +88,11 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotOrderPurchaseVO> delPurchase(String id) throws IOException {
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> delPurchase(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.DeviceOrder.DelPurchase, params);
        Envelop<IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -102,11 +102,11 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotOrderVO> updOrder(String jsonData) throws IOException {
    public MixEnvelop<IotOrderVO, IotOrderVO> updOrder(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.DeviceOrder.UpdOrder, params);
        Envelop<IotOrderVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotOrderVO, IotOrderVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -118,13 +118,13 @@ public class DeviceOrderService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotOrderPurchaseVO> findPurcharsePage(String orderId,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findPurcharsePage(String orderId, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("orderId", orderId);
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.DeviceOrder.FindPurcharsePage, params);
        Envelop<IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -133,11 +133,11 @@ public class DeviceOrderService extends BaseService {
     * @param id
     * @return
     */
    public Envelop<IotOrderPurchaseVO> findPurcharseById(String id) throws IOException {
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findPurcharseById(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.DeviceOrder.FindPurcharseById, params);
        Envelop<IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -151,8 +151,8 @@ public class DeviceOrderService extends BaseService {
     * @param size
     * @return
     */
    public Envelop<IotOrderPurchaseVO> findQualityPage(String qualityStatus,
            String orderNo,String startTime,String endTime,Integer page,Integer size) throws IOException {
    public MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> findQualityPage(String qualityStatus,
                                                          String orderNo, String startTime, String endTime, Integer page, Integer size) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("qualityStatus", qualityStatus);
        params.put("orderNo", orderNo);
@ -161,7 +161,7 @@ public class DeviceOrderService extends BaseService {
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.DeviceOrder.FindQualityPage, params);
        Envelop<IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(), Envelop.class);
        MixEnvelop<IotOrderPurchaseVO, IotOrderPurchaseVO> envelop = objectMapper.readValue(response.getBody(), MixEnvelop.class);
        return envelop;
    }

+ 29 - 29
app/app-iot-server/src/main/java/com/yihu/iot/service/device/DeviceService.java

@ -11,8 +11,8 @@ import com.yihu.iot.util.excel.AExcelReader;
import com.yihu.iot.util.excel.reader.IotDeviceImportVOReader;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
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.common.UploadVO;
import com.yihu.jw.restmodel.iot.device.IotDeviceImportRecordVO;
@ -48,11 +48,11 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceVO> create(String jsonData) throws IOException {
    public MixEnvelop<IotDeviceVO, IotDeviceVO> create(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Device.CreateDevice, params);
        Envelop<IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceVO, IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -62,11 +62,11 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceVO> findByCode(String id)throws IOException{
    public MixEnvelop<IotDeviceVO, IotDeviceVO> findByCode(String id)throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Device.GetDeviceById, params);
        Envelop<IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceVO, IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -76,11 +76,11 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<ExistVO> isSnExist(String sn) throws IOException {
    public MixEnvelop<ExistVO, ExistVO> isSnExist(String sn) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("sn", sn);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Device.IsSnExist, params);
        Envelop<ExistVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<ExistVO, ExistVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -90,11 +90,11 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<ExistVO> isSimExist(String sim) throws IOException {
    public MixEnvelop<ExistVO, ExistVO> isSimExist(String sim) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("sim", sim);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Device.IsSimExist, params);
        Envelop<ExistVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<ExistVO, ExistVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -104,12 +104,12 @@ public class DeviceService extends BaseService {
     * @param id
     * @return
     */
    public BaseEnvelop updSim(String sim,String id) throws IOException{
    public Envelop updSim(String sim, String id) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("sim", sim);
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Device.UpdSim, params);
        BaseEnvelop envelop = objectMapper.readValue(response.getBody(),BaseEnvelop.class);
        Envelop envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        return envelop;
    }
@ -118,11 +118,11 @@ public class DeviceService extends BaseService {
     * @param id
     * @return
     */
    public Envelop<IotDeviceVO> delDevice(String id) throws IOException{
    public MixEnvelop<IotDeviceVO, IotDeviceVO> delDevice(String id) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Device.DelDevice, params);
        Envelop<IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceVO, IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -131,11 +131,11 @@ public class DeviceService extends BaseService {
     * @param jsonData
     * @return
     */
    public BaseEnvelop updDevice(String jsonData) throws IOException{
    public Envelop updDevice(String jsonData) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Device.UpdDevice, params);
        BaseEnvelop envelop = objectMapper.readValue(response.getBody(),BaseEnvelop.class);
        Envelop envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        return envelop;
    }
@ -150,8 +150,8 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceVO> findProductPageByCompanyId(String sn,String hospital,String orderId,
                String purcharseId,Integer isBinding,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotDeviceVO, IotDeviceVO> findProductPageByCompanyId(String sn, String hospital, String orderId,
                                                              String purcharseId, Integer isBinding, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("sn", sn);
        params.put("hospital", hospital);
@ -161,7 +161,7 @@ public class DeviceService extends BaseService {
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Device.QueryDevicePage, params);
        Envelop<IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceVO, IotDeviceVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -170,8 +170,8 @@ public class DeviceService extends BaseService {
     * @param purcharseId
     * @return
     */
    public Envelop<ExistVO> isImportDevice(String purcharseId) throws IOException {
        Envelop<ExistVO> envelop = objectMapper.readValue(isImporting(purcharseId),Envelop.class);
    public MixEnvelop<ExistVO, ExistVO> isImportDevice(String purcharseId) throws IOException {
        MixEnvelop<ExistVO, ExistVO> envelop = objectMapper.readValue(isImporting(purcharseId),MixEnvelop.class);
        return envelop;
    }
@ -194,15 +194,15 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceImportRecordVO> uploadStream(MultipartFile file,String purcharseId,HttpServletRequest request) throws Exception {
    public MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> uploadStream(MultipartFile file, String purcharseId, HttpServletRequest request) throws Exception {
        String res = isImporting(purcharseId);
        JSONObject json = JSON.parseObject(res);
        if(json.getInteger("status")==200){
            if(json.getJSONObject("obj").getInteger("isExist")==1){
                return Envelop.getError("已存在导入中的数据,请等待上次数据处理完后在导入");
                return MixEnvelop.getError("已存在导入中的数据,请等待上次数据处理完后在导入");
            }
        }else {
            return Envelop.getError("查询是否在导入中失败");
            return MixEnvelop.getError("查询是否在导入中失败");
        }
        //文件上传
@ -211,7 +211,7 @@ public class DeviceService extends BaseService {
        //得到文件类型
        String fileType = fullName.substring(fullName.lastIndexOf(".") + 1).toLowerCase();
        if(!"xls".equals(fileType)){
            return Envelop.getError("文件格式不正确");
            return MixEnvelop.getError("文件格式不正确");
        }
        String fileName = fullName.substring(0, fullName.lastIndexOf("."));
@ -226,7 +226,7 @@ public class DeviceService extends BaseService {
        }else {
            UploadVO uploadVO = fileUploadService.request(request,file.getInputStream(),fullName);
            if(uploadVO==null){
                return Envelop.getError("文件上传失败");
                return MixEnvelop.getError("文件上传失败");
            }
            params.put("url", uploadVO.getFullUri());
        }
@ -240,7 +240,7 @@ public class DeviceService extends BaseService {
        params.put("fileName", fileName);
        String ret = HttpHelper.postBody(iotUrl + ServiceApi.Device.ImportDevice,JSONObject.toJSONString(params));
        Envelop<IotDeviceImportRecordVO> envelop = objectMapper.readValue(ret,Envelop.class);
        MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> envelop = objectMapper.readValue(ret,MixEnvelop.class);
        return envelop;
    }
@ -252,13 +252,13 @@ public class DeviceService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceImportRecordVO> queryImportRecordPage(String purcharseId,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> queryImportRecordPage(String purcharseId, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("purcharseId", purcharseId);
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Device.QueryImportRecordPage, params);
        Envelop<IotDeviceImportRecordVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }

+ 14 - 14
app/app-iot-server/src/main/java/com/yihu/iot/service/device/IotDeviceQualityService.java

@ -4,7 +4,7 @@ import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceQualityInspectionPlanVO;
import org.springframework.stereotype.Service;
@ -23,11 +23,11 @@ public class IotDeviceQualityService extends BaseService {
     * @param jsonData
     * @return
     */
    public Envelop<IotDeviceQualityInspectionPlanVO> create(String jsonData) throws IOException {
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> create(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Quality.AddQualityPlan, params);
        Envelop<IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -36,11 +36,11 @@ public class IotDeviceQualityService extends BaseService {
     * @param id
     * @return
     */
    public Envelop<IotDeviceQualityInspectionPlanVO> findByCode(String id) throws IOException {
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> findByCode(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Quality.FindById, params);
        Envelop<IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -52,8 +52,8 @@ public class IotDeviceQualityService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(String purcharseId,String orderNo,
            String startTime,String endTime,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(String purcharseId, String orderNo,
                                                                             String startTime, String endTime, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("purcharseId", purcharseId);
        params.put("orderNo", orderNo);
@ -62,7 +62,7 @@ public class IotDeviceQualityService extends BaseService {
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Quality.QueryQualityPlanPage, params);
        Envelop<IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -72,11 +72,11 @@ public class IotDeviceQualityService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceQualityInspectionPlanVO> delQualityPlan(String id) throws IOException {
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> delQualityPlan(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Quality.DelQualityPlan, params);
        Envelop<IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -87,12 +87,12 @@ public class IotDeviceQualityService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceQualityInspectionPlanVO> completeQualityPlan(String actualTime,String id) throws IOException {
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completeQualityPlan(String actualTime, String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("actualTime", actualTime);
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Quality.CompleteQualityPlan, params);
        Envelop<IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -103,12 +103,12 @@ public class IotDeviceQualityService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(String actualTime,String purchaseId) throws IOException {
    public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(String actualTime, String purchaseId) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("actualTime", actualTime);
        params.put("purchaseId", purchaseId);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Quality.CompletePlanByPurchaseId, params);
        Envelop<IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }

+ 18 - 18
app/app-iot-server/src/main/java/com/yihu/iot/service/product/ProductService.java

@ -7,7 +7,7 @@ import com.yihu.iot.model.ehr.MStdDataSet;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -37,9 +37,9 @@ public class ProductService extends BaseService {
     * 测量数据(ehr标准规范管理-平台标准-标准数据集)
     * @return
     */
    public Envelop<MStdDataSet> data_sets(Integer page, Integer size, String name){
    public MixEnvelop<MStdDataSet, MStdDataSet> data_sets(Integer page, Integer size, String name){
        String url = "/std/data_sets";
        Envelop<MStdDataSet> envelop = new Envelop<MStdDataSet>();
        MixEnvelop<MStdDataSet, MStdDataSet> envelop = new MixEnvelop<>();
        Map<String, Object> params = new HashMap<>();
        String filters = "reference="+reference+";";
        if(StringUtils.isNotBlank(name)){
@ -53,7 +53,7 @@ public class ProductService extends BaseService {
            HttpResponse response = HttpHelper.get(profileInnerUrl + url, params);
            ObjectResult result =  objectMapper.readValue(response.getBody(),ObjectResult.class);
            if(result.isSuccessFlg()){
                envelop = objectMapper.readValue(response.getBody(),Envelop.class);
                envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
                envelop.setStatus(200);
            }else {
                envelop.setStatus(-1);
@ -77,7 +77,7 @@ public class ProductService extends BaseService {
     * @param size
     * @return
     */
    public Envelop<IotProductBaseInfoVO> findCompanyPage(String name,String classify,String companyId,Integer page,Integer size) throws IOException{
    public MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> findCompanyPage(String name, String classify, String companyId, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("name", name);
        params.put("classify", classify);
@ -85,7 +85,7 @@ public class ProductService extends BaseService {
        params.put("page", page);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Product.FindProductPage, params);
        Envelop<IotProductBaseInfoVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -98,14 +98,14 @@ public class ProductService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotProductBaseInfoVO> findProductPageByCompanyId(String name,String companyId,Integer page, Integer size) throws IOException{
    public MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> findProductPageByCompanyId(String name, String companyId, Integer page, Integer size) throws IOException{
        Map<String, Object> params = new HashMap<>();
        params.put("name", name);
        params.put("page", page);
        params.put("companyId", companyId);
        params.put("size", size);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Product.FindProductPageByCompanyId, params);
        Envelop<IotProductBaseInfoVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotProductBaseInfoVO, IotProductBaseInfoVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -115,11 +115,11 @@ public class ProductService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotProductVO> addProduct(String jsonData) throws IOException {
    public MixEnvelop<IotProductVO, IotProductVO> addProduct(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Product.AddProduct, params);
        Envelop<IotProductVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotProductVO, IotProductVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -129,11 +129,11 @@ public class ProductService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotProductVO> findByCode(String id) throws IOException {
    public MixEnvelop<IotProductVO, IotProductVO> findByCode(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Product.FindProductById, params);
        Envelop<IotProductVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotProductVO, IotProductVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -143,11 +143,11 @@ public class ProductService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotMaintenanceUnitVO> maintenanceUnitById(String productId) throws IOException {
    public MixEnvelop<IotMaintenanceUnitVO, IotMaintenanceUnitVO> maintenanceUnitById(String productId) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("productId", productId);
        HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.Product.MaintenanceUnitById, params);
        Envelop<IotMaintenanceUnitVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotMaintenanceUnitVO, IotMaintenanceUnitVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -159,11 +159,11 @@ public class ProductService extends BaseService {
     */
    @PostMapping(value = IotRequestMapping.Product.delProduct)
    @ApiOperation(value = "删除产品", notes = "删除产品")
    public Envelop<IotProductVO> delCompany(String id) throws IOException {
    public MixEnvelop<IotProductVO, IotProductVO> delCompany(String id) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("id", id);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Product.DelProduct, params);
        Envelop<IotProductVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotProductVO, IotProductVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -173,11 +173,11 @@ public class ProductService extends BaseService {
     * @return
     * @throws IOException
     */
    public Envelop<IotProductVO> updCompany(String jsonData) throws IOException {
    public MixEnvelop<IotProductVO, IotProductVO> updCompany(String jsonData) throws IOException {
        Map<String, Object> params = new HashMap<>();
        params.put("jsonData", jsonData);
        HttpResponse response = HttpHelper.post(iotUrl + ServiceApi.Product.UpdProduct, params);
        Envelop<IotProductVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<IotProductVO, IotProductVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }

+ 6 - 6
app/app-iot-server/src/main/java/com/yihu/iot/service/third/wlyy/MonitoringHealthService.java

@ -8,7 +8,7 @@ import com.yihu.iot.constant.ServiceApi;
import com.yihu.iot.service.common.BaseService;
import com.yihu.iot.util.http.HttpHelper;
import com.yihu.iot.util.http.HttpResponse;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import io.swagger.annotations.ApiOperation;
import iot.device.LocationDataVO;
import org.apache.commons.lang.StringUtils;
@ -44,9 +44,9 @@ public class MonitoringHealthService extends BaseService {
     * @param diseaseCondition
     * @return
     */
    public Envelop<LocationDataVO> findDeviceLocations(Integer diseaseCondition, Integer page, Integer size, String type) throws IOException {
        Envelop<LocationDataVO> envelop = new Envelop<>();
        Envelop<LocationDataVO> envelopTmp = null;
    public MixEnvelop<LocationDataVO, LocationDataVO> findDeviceLocations(Integer diseaseCondition, Integer page, Integer size, String type) throws IOException {
        MixEnvelop<LocationDataVO, LocationDataVO> envelop = new MixEnvelop<>();
        MixEnvelop<LocationDataVO, LocationDataVO> envelopTmp = null;
        JSONArray jsonArray = new JSONArray();
        Integer total = 0;
        if(StringUtils.isNotBlank(type)){
@ -71,7 +71,7 @@ public class MonitoringHealthService extends BaseService {
                    Map<String, Object> params = new HashMap<>();
                    params.put("jsonData", jsonObject.toString());
                    HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.PatientDevice.findLocationByIdCard, params);
                    envelopTmp = objectMapper.readValue(response.getBody(),Envelop.class);
                    envelopTmp = objectMapper.readValue(response.getBody(),MixEnvelop.class);
                    envelop.getDetailModelList().addAll(envelopTmp.getDetailModelList());
                }
            }
@ -94,7 +94,7 @@ public class MonitoringHealthService extends BaseService {
            Map<String, Object> params = new HashMap<>();
            params.put("jsonData", jsonObject.toString());
            HttpResponse response = HttpHelper.get(iotUrl + ServiceApi.PatientDevice.findLocationByIdCard, params);
            envelop = objectMapper.readValue(response.getBody(),Envelop.class);
            envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
            return envelop;
        }
    }

+ 5 - 0
app/public-health-server/pom.xml

@ -122,6 +122,11 @@
            <artifactId>fastdfs-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.yihu</groupId>
            <artifactId>swagger-starter</artifactId>
            <version>2.0.0</version>
        </dependency>
    </dependencies>
    <build>

+ 15 - 15
app/public-health-server/src/main/java/com/yihu/health/controller/archives/ArchivesController.java

@ -4,7 +4,7 @@ package com.yihu.health.controller.archives;
import com.yihu.health.service.archives.ArchivesService;
import com.yihu.jw.restmodel.archives.PatientArchivesInfoVO;
import com.yihu.jw.restmodel.archives.PatientArchivesVO;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.archives.PatientArchivesMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -25,59 +25,59 @@ public class ArchivesController {
    @GetMapping(value = PatientArchivesMapping.Archives.findPatientArchives)
    @ApiOperation(value = "查询健康信息列表")
    public Envelop<PatientArchivesVO> findPatientArchives(@ApiParam(name = "name", value = "姓名(模糊匹配)")
    public MixEnvelop<PatientArchivesVO, PatientArchivesVO> findPatientArchives(@ApiParam(name = "name", value = "姓名(模糊匹配)")
                                                          @RequestParam(value = "name", required = false)String name,
                                                          @ApiParam(name = "status", value = "档案状态")
                                                             @ApiParam(name = "status", value = "档案状态")
                                                          @RequestParam(value = "status", required = false)String status,
                                                          @ApiParam(name = "cancelReseanType", value = "注销状态")
                                                             @ApiParam(name = "cancelReseanType", value = "注销状态")
                                                          @RequestParam(value = "cancelReseanType", required = false)String cancelReseanType,
                                                          @ApiParam(name = "page", value = "分页") @RequestParam(value = "page", required = false)Integer page,
                                                          @ApiParam(name = "size", value = "每一页大小")@RequestParam(value = "size", required = false )Integer size){
                                                             @ApiParam(name = "page", value = "分页") @RequestParam(value = "page", required = false)Integer page,
                                                             @ApiParam(name = "size", value = "每一页大小")@RequestParam(value = "size", required = false )Integer size){
        try {
            return archivesService.queryPatientArchivesPage(page,size,status, cancelReseanType ,name);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @GetMapping(value = PatientArchivesMapping.Archives.findPatientArchivesInfos)
    @ApiOperation(value = "查询健康信息详情列表")
    public Envelop<PatientArchivesInfoVO> queryPatientArchivesInfoPage(@ApiParam(name = "code", value = "档案编号")
    public MixEnvelop<PatientArchivesInfoVO, PatientArchivesInfoVO> queryPatientArchivesInfoPage(@ApiParam(name = "code", value = "档案编号")
                                                                       @RequestParam(value = "code", required = false)String code){
        try {
            return archivesService.queryPatientArchivesInfoPage(code);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PostMapping(value = PatientArchivesMapping.Archives.createPatientArchives)
    @ApiOperation(value = "创建健康信息详情列表")
    public Envelop<Boolean> createPatientArchives(@ApiParam(name = "patientArchives", value = "建档基本信息Json")
    public MixEnvelop<Boolean, Boolean> createPatientArchives(@ApiParam(name = "patientArchives", value = "建档基本信息Json")
                                                  @RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                  @ApiParam(name = "list", value = "建档详情Json")
                                                     @ApiParam(name = "list", value = "建档详情Json")
                                                  @RequestParam(value = "list", required = true)String list){
        try {
            return archivesService.createPatientArchives(patientArchives,list);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
    @PutMapping(value = PatientArchivesMapping.Archives.updatePatientArchives)
    @ApiOperation(value = "更新健康信息详情列表")
    public Envelop<Boolean> updatePatientArchives(@ApiParam(name = "patientArchives", value = "建档基本信息Json")
    public MixEnvelop<Boolean, Boolean> updatePatientArchives(@ApiParam(name = "patientArchives", value = "建档基本信息Json")
                                                  @RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                  @ApiParam(name = "list", value = "建档详情")
                                                     @ApiParam(name = "list", value = "建档详情")
                                                  @RequestParam(value = "list", required = true)String list){
        try {
            return archivesService.updatePatientArchives(patientArchives,list);
        }catch (Exception e){
            e.printStackTrace();
            return Envelop.getError(e.getMessage());
            return MixEnvelop.getError(e.getMessage());
        }
    }
}

+ 9 - 9
app/public-health-server/src/main/java/com/yihu/health/service/archives/ArchivesService.java

@ -6,7 +6,7 @@ import com.yihu.health.util.http.HttpHelper;
import com.yihu.health.util.http.HttpResponse;
import com.yihu.jw.restmodel.archives.PatientArchivesInfoVO;
import com.yihu.jw.restmodel.archives.PatientArchivesVO;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import org.springframework.stereotype.Service;
import java.text.ParseException;
@ -27,7 +27,7 @@ public class ArchivesService extends BaseService {
     * @return
     * @throws ParseException
     */
    public Envelop<PatientArchivesVO> queryPatientArchivesPage(Integer page, Integer size, String status, String cancelReseanType , String name) throws Exception {
    public MixEnvelop<PatientArchivesVO, PatientArchivesVO> queryPatientArchivesPage(Integer page, Integer size, String status, String cancelReseanType , String name) throws Exception {
        Map<String, Object> params = new HashMap<>();
        params.put("page", page);
        params.put("size", size);
@ -35,7 +35,7 @@ public class ArchivesService extends BaseService {
        params.put("cancelReseanType", cancelReseanType);
        params.put("name", name);
        HttpResponse response = HttpHelper.get(archivesInnerUrl + ServiceApi.Archives.findPatientArchives, params);
        Envelop<PatientArchivesVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<PatientArchivesVO, PatientArchivesVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
@ -44,31 +44,31 @@ public class ArchivesService extends BaseService {
     * @return
     * @throws ParseException
     */
    public Envelop<PatientArchivesInfoVO> queryPatientArchivesInfoPage(String code) throws Exception {
    public MixEnvelop<PatientArchivesInfoVO, PatientArchivesInfoVO> queryPatientArchivesInfoPage(String code) throws Exception {
        Map<String, Object> params = new HashMap<>();
        params.put("page", code);
        HttpResponse response = HttpHelper.get(archivesInnerUrl + ServiceApi.Archives.findPatientArchivesInfos, params);
        Envelop<PatientArchivesInfoVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<PatientArchivesInfoVO, PatientArchivesInfoVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
    public Envelop<Boolean> createPatientArchives(String patientArchives,String list)throws Exception {
    public MixEnvelop<Boolean, Boolean> createPatientArchives(String patientArchives, String list)throws Exception {
        Map<String, Object> params = new HashMap<>();
        params.put("patientArchives", patientArchives);
        params.put("list", list);
        HttpResponse response = HttpHelper.get(archivesInnerUrl + ServiceApi.Archives.createPatientArchives, params);
        Envelop<Boolean> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<Boolean, Boolean> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }
    public  Envelop<Boolean> updatePatientArchives(String patientArchives,String list)throws Exception {
    public MixEnvelop<Boolean, Boolean> updatePatientArchives(String patientArchives, String list)throws Exception {
        Map<String, Object> params = new HashMap<>();
        params.put("patientArchives", patientArchives);
        params.put("list", list);
        HttpResponse response = HttpHelper.get(archivesInnerUrl + ServiceApi.Archives.createPatientArchives, params);
        Envelop<Boolean> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<Boolean, Boolean> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop;
    }

+ 2 - 2
app/public-health-server/src/main/java/com/yihu/health/service/dictionary/SystemDictService.java

@ -5,7 +5,7 @@ import com.yihu.health.service.common.BaseService;
import com.yihu.health.util.http.HttpHelper;
import com.yihu.health.util.http.HttpResponse;
import com.yihu.jw.restmodel.archives.dict.SystemDictVO;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import org.springframework.stereotype.Service;
import java.util.HashMap;
@ -28,7 +28,7 @@ public class SystemDictService extends BaseService{
        Map<String, Object> params = new HashMap<>();
        params.put("filters", "id="+filters);
        HttpResponse response = HttpHelper.get(profileInnerUrl+ ServiceApi.SystemDict.dictionariesWithEntry, params);
        Envelop<SystemDictVO> envelop = objectMapper.readValue(response.getBody(),Envelop.class);
        MixEnvelop<SystemDictVO, SystemDictVO> envelop = objectMapper.readValue(response.getBody(),MixEnvelop.class);
        return envelop.getDetailModelList();
    }

+ 2 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/base/function/FunctionDO.java

@ -1,7 +1,7 @@
package com.yihu.jw.entity.base.function;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.IntegerIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -13,7 +13,7 @@ import javax.persistence.Transient;
 */
@Entity
@Table(name = "base_function")
public class FunctionDO extends UuidIdentityEntityWithOperator {
public class FunctionDO extends IntegerIdentityEntityWithOperator {
    //功能名称
    private String name;

+ 5 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/base/message/Message.java

@ -1,7 +1,8 @@
package com.yihu.jw.entity.base.message;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@ -9,11 +10,12 @@ import javax.persistence.Table;
 * Created by progr1mmer on 2018/8/14.
 */@Entity
@Table(name = "base_message")
public class Message extends UuidIdentityEntity {
public class MessageDo extends IntegerIdentityEntity {
    private String topic; //消息主题
    private String template; //消息模板
    @Column(name = "topic", nullable = false)
    public String getTopic() {
        return topic;
    }
@ -22,6 +24,7 @@ public class Message extends UuidIdentityEntity {
        this.topic = topic;
    }
    @Column(name = "template", nullable = false)
    public String getTemplate() {
        return template;
    }

+ 10 - 5
common/common-entity/src/main/java/com/yihu/jw/entity/base/message/MessageSubscriberDO.java

@ -1,7 +1,8 @@
package com.yihu.jw.entity.base.message;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@ -10,21 +11,23 @@ import javax.persistence.Table;
 */
@Entity
@Table(name = "base_message_subscriber")
public class MessageSubscriberDO extends UuidIdentityEntity {
public class MessageSubscriberDO extends IntegerIdentityEntity {
    private String messageId; //消息ID
    private Integer messageId; //消息ID
    private String saasId; //saas id
    private String url; //推送地址
    private String remark; //备注
    public String getMessageId() {
    @Column(name = "message_id")
    public Integer getMessageId() {
        return messageId;
    }
    public void setMessageId(String messageId) {
    public void setMessageId(Integer messageId) {
        this.messageId = messageId;
    }
    @Column(name = "saas_id", length = 50)
    public String getSaasId() {
        return saasId;
    }
@ -33,6 +36,7 @@ public class MessageSubscriberDO extends UuidIdentityEntity {
        this.saasId = saasId;
    }
    @Column(name = "url")
    public String getUrl() {
        return url;
    }
@ -41,6 +45,7 @@ public class MessageSubscriberDO extends UuidIdentityEntity {
        this.url = url;
    }
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

+ 2 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/base/module/ModuleDO.java

@ -1,6 +1,6 @@
package com.yihu.jw.entity.base.module;// default package
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.IntegerIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -14,7 +14,7 @@ import java.util.List;
 */
@Entity
@Table(name = "base_module")
public class ModuleDO extends UuidIdentityEntityWithOperator {
public class ModuleDO extends IntegerIdentityEntityWithOperator {
    public enum Status {
		disable,

+ 15 - 18
common/common-entity/src/main/java/com/yihu/jw/entity/base/module/ModuleFunctionDO.java

@ -1,6 +1,6 @@
package com.yihu.jw.entity.base.module;// default package
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.*;
@ -9,32 +9,29 @@ import javax.persistence.*;
 */
@Entity
@Table(name = "base_module_function")
public class ModuleFunctionDO extends UuidIdentityEntity implements java.io.Serializable {
public class ModuleFunctionDO extends IntegerIdentityEntity {
	private String functionId;//关联 base_function    code
	private String moduleId;//关联 base_module  code
	//关联 base_module   id
	private Integer moduleId;
	//关联 base_function   ic
	private Integer functionId;
	// Constructors
	@Column(name = "module_id")
	public Integer getModuleId() {
		return this.moduleId;
	}
	/** default constructor */
	public ModuleFunctionDO() {
	public void setModuleId(Integer moduleId) {
		this.moduleId = moduleId;
	}
	@Column(name = "function_id", length = 100)
	public String getFunctionId() {
	@Column(name = "function_id")
	public Integer getFunctionId() {
		return this.functionId;
	}
	public void setFunctionId(String functionId) {
	public void setFunctionId(Integer functionId) {
		this.functionId = functionId;
	}
	@Column(name = "module_id", length = 100)
	public String getModuleId() {
		return this.moduleId;
	}
	public void setModuleId(String moduleId) {
		this.moduleId = moduleId;
	}
}

+ 139 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/oauth2/OauthClientDetailsDO.java

@ -0,0 +1,139 @@
package com.yihu.jw.entity.base.oauth2;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.*;
/**
 * Entity - Oauth2
 * Created by progr1mmer on 2018/1/23.
 */
@Entity
@Table(name = "oauth_client_details")
@Access(value = AccessType.PROPERTY)
public class OauthClientDetailsDO {
    private String clientId;
    private String saasId;
    private String resourceIds;
    private String clientSecret;
    private String scope;
    private String authorizedGrantTypes;
    private String webServerRedirectUri;
    private String authorities;
    private Integer accessTokenValidity;
    private Integer refreshTokenValidity;
    private String additionalInformation;
    private String autoApprove;
    @Id
    @GeneratedValue(generator = "Generator")
    @GenericGenerator(name = "Generator", strategy = "assigned")
    @Column(name = "client_id", nullable = false)
    public String getClientId() {
        return clientId;
    }
    public void setClientId(String clientId) {
        this.clientId = clientId;
    }
    @Column(name = "saas_id")
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "resource_ids")
    public String getResourceIds() {
        return resourceIds;
    }
    public void setResourceIds(String resourceIds) {
        this.resourceIds = resourceIds;
    }
    @Column(name = "client_secret")
    public String getClientSecret() {
        return clientSecret;
    }
    public void setClientSecret(String clientSecret) {
        this.clientSecret = clientSecret;
    }
    @Column(name = "scope")
    public String getScope() {
        return scope;
    }
    public void setScope(String scope) {
        this.scope = scope;
    }
    @Column(name = "authorized_grant_types")
    public String getAuthorizedGrantTypes() {
        return authorizedGrantTypes;
    }
    public void setAuthorizedGrantTypes(String authorizedGrantTypes) {
        this.authorizedGrantTypes = authorizedGrantTypes;
    }
    @Column(name = "web_server_redirect_uri")
    public String getWebServerRedirectUri() {
        return webServerRedirectUri;
    }
    public void setWebServerRedirectUri(String webServerRedirectUri) {
        this.webServerRedirectUri = webServerRedirectUri;
    }
    @Column(name = "authorities")
    public String getAuthorities() {
        return authorities;
    }
    public void setAuthorities(String authorities) {
        this.authorities = authorities;
    }
    @Column(name = "access_token_validity")
    public Integer getAccessTokenValidity() {
        return accessTokenValidity;
    }
    public void setAccessTokenValidity(Integer accessTokenValidity) {
        this.accessTokenValidity = accessTokenValidity;
    }
    @Column(name = "refresh_token_validity")
    public Integer getRefreshTokenValidity() {
        return refreshTokenValidity;
    }
    public void setRefreshTokenValidity(Integer refreshTokenValidity) {
        this.refreshTokenValidity = refreshTokenValidity;
    }
    @Column(name = "additional_information")
    public String getAdditionalInformation() {
        return additionalInformation;
    }
    public void setAdditionalInformation(String additionalInformation) {
        this.additionalInformation = additionalInformation;
    }
    @Column(name = "autoapprove")
    public String getAutoApprove() {
        return autoApprove;
    }
    public void setAutoApprove(String autoApprove) {
        this.autoApprove = autoApprove;
    }
}

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/org/Organization.java

@ -10,7 +10,7 @@ import javax.persistence.Table;
 */
@Entity
@Table(name = "base_organization")
public class Organization extends UuidIdentityEntity {
public class OrganizationDO extends UuidIdentityEntity {
    private String name; //名称
    private String code; //编码

+ 33 - 25
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/RoleDO.java

@ -1,8 +1,7 @@
package com.yihu.jw.entity.base.user;
package com.yihu.jw.entity.base.role;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import com.yihu.jw.entity.IntegerIdentityEntityWithOperator;
import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@ -12,7 +11,19 @@ import javax.persistence.Table;
 */
@Entity
@Table(name = "base_role")
public class RoleDO extends UuidIdentityEntityWithOperator {
public class RoleDO extends IntegerIdentityEntityWithOperator {
	/**
	 * 角色类型
	 */
	public enum Type {
		//系统 - user对应的角色类型
		system,
		//医生
		doctor,
		//患者
		patient
	}
	//saas id
	private String saasId;
@ -22,22 +33,10 @@ public class RoleDO extends UuidIdentityEntityWithOperator {
	private String code;
	//备注
	private String remark;
	//角色类型
	private Type type;
	// Constructors
	/** default constructor */
	public RoleDO() {
	}
	/** minimal constructor */
	public RoleDO(String id, Timestamp createTime, Timestamp updateTime) {
		this.id = id;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}
	// Property accessors
	@Column(name = "saas_id", length = 50)
	@Column(name = "saas_id", nullable = false, length = 50)
	public String getSaasId() {
		return this.saasId;
	}
@ -55,7 +54,16 @@ public class RoleDO extends UuidIdentityEntityWithOperator {
		this.name = name;
	}
	@Column(name = "remark", length = 1000)
	@Column(name = "code", length = 50)
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "remark")
	public String getRemark() {
		return this.remark;
	}
@ -64,12 +72,12 @@ public class RoleDO extends UuidIdentityEntityWithOperator {
		this.remark = remark;
	}
	@Column(name = "code", length = 50)
	public String getCode() {
		return code;
	@Column(name = "type")
	public Type getType() {
		return type;
	}
	public void setCode(String code) {
		this.code = code;
	public void setType(Type type) {
		this.type = type;
	}
}

+ 47 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/role/RoleModuleFunctionDO.java

@ -0,0 +1,47 @@
package com.yihu.jw.entity.base.role;
import com.yihu.jw.entity.IntegerIdentityEntity;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created by progr1mmer on 2018/8/14.
 */
@Entity
@Table(name = "base_role_module_function")
public class RoleModuleFunctionDO extends IntegerIdentityEntity {
    private Integer roleId; //角色ID
    private Integer moduleId; //模块ID
    private Integer functionId; //功能ID
    @Column(name = "role_id", nullable = false)
    public Integer getRoleId() {
        return roleId;
    }
    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }
    @Column(name = "module_id", nullable = false)
    public Integer getModuleId() {
        return moduleId;
    }
    public void setModuleId(Integer moduleId) {
        this.moduleId = moduleId;
    }
    @Column(name = "function_id", nullable = false)
    public Integer getFunctionId() {
        return functionId;
    }
    public void setFunctionId(Integer functionId) {
        this.functionId = functionId;
    }
}

+ 37 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasDO.java

@ -16,9 +16,13 @@ import javax.persistence.Table;
public class SaasDO extends UuidIdentityEntityWithOperator {
    public enum Status {
    	//待审核
        auditWait,
		//审核通过
        auditPassed,
		//审核不通过
        auditNotPassed,
		//已删除
		delete
    }
@ -33,11 +37,14 @@ public class SaasDO extends UuidIdentityEntityWithOperator {
    private String orgCode; //机构编码
	private String name; //系统名称
	private Status status; //状态 0 已删除 1待审核 2审核通过 3审核不通过
	private Status status; //状态  0待审核 1审核通过 2审核不通过 3已删除
	private String remark; //备注
	private String logo; //远程fastDFS文件地址
    private Integer theme; //主题ID
    private Type type; //类型
	private String manager; //管理员 - 关联user表id字段
	private String email; //管理员邮箱
	private String phone; //管理员手机号码
	@Column(name = "org_code", nullable = false)
	public String getOrgCode() {
@ -66,7 +73,7 @@ public class SaasDO extends UuidIdentityEntityWithOperator {
        this.status = status;
    }
    @Column(name = "remark", length = 1000)
    @Column(name = "remark")
	public String getRemark() {
		return this.remark;
	}
@ -101,4 +108,32 @@ public class SaasDO extends UuidIdentityEntityWithOperator {
	public void setType(Type type) {
		this.type = type;
	}
	@Column(name = "manager", length = 50)
	public String getManager() {
		return manager;
	}
	public void setManager(String manager) {
		this.manager = manager;
	}
	@Column(name = "email")
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	@Column(name = "phone")
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
}

+ 5 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasDefaultModuleDO.java

@ -1,7 +1,8 @@
package com.yihu.jw.entity.base.saas;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
@ -10,11 +11,12 @@ import javax.persistence.Table;
 */
@Entity
@Table(name = "base_saas_default_module")
public class SaasDefaultModuleDO extends UuidIdentityEntity {
public class SaasDefaultModuleDO extends IntegerIdentityEntity {
    private SaasDO.Type type;
    private Integer moduleId;
    @Column(name = "type", nullable = false)
    public SaasDO.Type getType() {
        return type;
    }
@ -23,6 +25,7 @@ public class SaasDefaultModuleDO extends UuidIdentityEntity {
        this.type = type;
    }
    @Column(name = "module_id", nullable = false)
    public Integer getModuleId() {
        return moduleId;
    }

+ 7 - 7
common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasModuleDO.java

@ -1,7 +1,7 @@
package com.yihu.jw.entity.base.saas;// default package
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.*;
@ -10,14 +10,14 @@ import javax.persistence.*;
 */
@Entity
@Table(name = "base_saas_module")
public class SaasModuleDO extends UuidIdentityEntity implements java.io.Serializable {
public class SaasModuleDO extends IntegerIdentityEntity {
	private String saasId; //关联WlyySaas code
	private String moduleId; //关联 WlyyModule code
	private Integer moduleId; //关联 WlyyModule code
	// Constructors
	@Column(name = "saas_id", length = 100)
	@Column(name = "saas_id", length = 50)
	public String getSaasId() {
		return saasId;
	}
@ -26,12 +26,12 @@ public class SaasModuleDO extends UuidIdentityEntity implements java.io.Serializ
		this.saasId = saasId;
	}
	@Column(name = "module_id", length = 100)
	public String getModuleId() {
	@Column(name = "module_id", nullable = false)
	public Integer getModuleId() {
		return this.moduleId;
	}
	public void setModuleId(String moduleId) {
	public void setModuleId(Integer moduleId) {
		this.moduleId = moduleId;
	}
}

+ 0 - 22
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/EmployHideModuleFunctionDO.java

@ -1,22 +0,0 @@
package com.yihu.jw.entity.base.user;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created by progr1mmer on 2018/8/14.
 */
@Entity
@Table(name = "base_employ_hide_module_function")
public class EmployHideModuleFunctionDO extends UuidIdentityEntity {
    //用户ID
    private String employId;
    //模块ID
    private String moduleId;
    //功能ID(该字段为空则直接隐藏上级模块)
    private String functionId;
}

+ 0 - 56
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/EmployRoleDO.java

@ -1,56 +0,0 @@
package com.yihu.jw.entity.base.user;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * BaseEmployRole entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "base_employ_role")
public class EmployRoleDO extends UuidIdentityEntity implements java.io.Serializable {
	// Fields
	private String employId;
	private String roleId;
	// Constructors
	/** default constructor */
	public EmployRoleDO() {
	}
	/** minimal constructor */
	public EmployRoleDO(String id) {
		this.id = id;
	}
	/** full constructor */
	public EmployRoleDO(String id, String roleId, String employId) {
		this.id = id;
		this.roleId = roleId;
		this.employId = employId;
	}
	@Column(name = "role_id", length = 50)
	public String getRoleId() {
		return this.roleId;
	}
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}
	@Column(name = "employ_id", length = 50)
	public String getEmployId() {
		return this.employId;
	}
	public void setEmployId(String employId) {
		this.employId = employId;
	}
}

+ 0 - 36
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/RoleModuleFunctionDO.java

@ -1,36 +0,0 @@
package com.yihu.jw.entity.base.user;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created by progr1mmer on 2018/8/14.
 */
@Entity
@Table(name = "base_role_module_function")
public class RoleModuleFunctionDO extends UuidIdentityEntity {
    private String roleId; //角色ID
    private String moduleId; //模块ID
    private String functionId; //功能ID
    private String access; //访问权限
    public String getRoleId() {
        return roleId;
    }
    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }
    public String getModuleId() {
        return moduleId;
    }
    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }
}

+ 170 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserDO.java

@ -0,0 +1,170 @@
package com.yihu.jw.entity.base.user;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;
/**
 * Created by progr1mmer on 2018/8/20.
 */
@Entity
@Table(name = "base_user")
public class UserDO extends UuidIdentityEntityWithOperator {
    /**
     * 性别
     */
    public enum Gender {
        //男
        male,
        //女
        female
    }
    //用户名
    private String username;
    //密码
    private String password;
    //密码散列值
    private String salt;
    //姓名
    private String name;
    //性别
    private Gender gender;
    //身份证号码
    private String idcard;
    //手机号码
    private String phone;
    //邮箱
    private String email;
    //是否可用
    private Boolean isEnabled;
    //是否锁定
    private Boolean isLocked;
    //锁定时间
    private Date lockedDate;
    //最后登陆时间
    private Date loginDate;
    //登陆失败次数
    private Integer loginFailureCount;
    @Column(name = "username", nullable = false)
    public String getUsername() {
        return username;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    @Column(name = "password", nullable = false)
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    @Column(name = "salt", nullable = false)
    public String getSalt() {
        return salt;
    }
    public void setSalt(String salt) {
        this.salt = salt;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "gender")
    public Gender getGender() {
        return gender;
    }
    public void setGender(Gender gender) {
        this.gender = gender;
    }
    @Column(name = "idcard")
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    @Column(name = "phone", length = 200)
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    @Column(name = "email", length = 200)
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    @Column(name = "is_enabled", nullable = false)
    public Boolean getEnabled() {
        return isEnabled;
    }
    public void setEnabled(Boolean enabled) {
        isEnabled = enabled;
    }
    @Column(name = "is_locked", nullable = false)
    public Boolean getLocked() {
        return isLocked;
    }
    public void setLocked(Boolean locked) {
        isLocked = locked;
    }
    @Column(name = "locked_date")
    public Date getLockedDate() {
        return lockedDate;
    }
    public void setLockedDate(Date lockedDate) {
        this.lockedDate = lockedDate;
    }
    @Column(name = "login_date")
    public Date getLoginDate() {
        return loginDate;
    }
    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }
    @Column(name = "login_failure_count")
    public Integer getLoginFailureCount() {
        return loginFailureCount;
    }
    public void setLoginFailureCount(Integer loginFailureCount) {
        this.loginFailureCount = loginFailureCount;
    }
}

+ 49 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserHideModuleFunctionDO.java

@ -0,0 +1,49 @@
package com.yihu.jw.entity.base.user;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Created by progr1mmer on 2018/8/14.
 */
@Entity
@Table(name = "base_user_hide_module_function")
public class UserHideModuleFunctionDO extends IntegerIdentityEntity {
    //用户ID
    private String userId;
    //模块ID
    private Integer moduleId;
    //功能ID(该字段为空则直接隐藏上级模块)
    private Integer functionId;
    @Column(name = "user_id", nullable = false, length = 50)
    public String getUserId() {
        return userId;
    }
    public void setUserId(String userId) {
        this.userId = userId;
    }
    @Column(name = "module_id", nullable = false)
    public Integer getModuleId() {
        return moduleId;
    }
    public void setModuleId(Integer moduleId) {
        this.moduleId = moduleId;
    }
    @Column(name = "function_id")
    public Integer getFunctionId() {
        return functionId;
    }
    public void setFunctionId(Integer functionId) {
        this.functionId = functionId;
    }
}

+ 39 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserRoleDO.java

@ -0,0 +1,39 @@
package com.yihu.jw.entity.base.user;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * BaseEmployRole entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "base_user_role")
public class UserRoleDO extends IntegerIdentityEntity {
	// Fields
	private String userId;
	private Integer roleId;
	@Column(name = "user_id", length = 50)
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	@Column(name = "role_id")
	public Integer getRoleId() {
		return this.roleId;
	}
	public void setRoleId(Integer roleId) {
		this.roleId = roleId;
	}
}

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/wlyy/agreement/WlyyAgreementDO.java

@ -1,4 +1,4 @@
package com.yihu.jw.wlyy.agreement;
package com.yihu.jw.entity.wlyy.agreement;

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/wlyy/agreement/WlyyAgreementKpiDO.java

@ -1,4 +1,4 @@
package com.yihu.jw.wlyy.agreement;
package com.yihu.jw.entity.wlyy.agreement;

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/wlyy/agreement/WlyyAgreementKpiLogDO.java

@ -1,4 +1,4 @@
package com.yihu.jw.wlyy.agreement;
package com.yihu.jw.entity.wlyy.agreement;
import com.yihu.jw.entity.UuidIdentityEntity;

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/wlyy/agreement/WlyySignFamilyDO.java

@ -1,4 +1,4 @@
package com.yihu.jw.wlyy.agreement;
package com.yihu.jw.entity.wlyy.agreement;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/wlyy/hospital/BaseOrgDO.java

@ -1,4 +1,4 @@
package com.yihu.jw.wlyy.hospital;// default package
package com.yihu.jw.entity.wlyy.hospital;// default package
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/wlyy/hospital/BaseOrgDeptDO.java

@ -1,4 +1,4 @@
package com.yihu.jw.wlyy.hospital;// default package
package com.yihu.jw.entity.wlyy.hospital;// default package
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/wlyy/hospital/BaseOrgHospitalDO.java

@ -1,4 +1,4 @@
package com.yihu.jw.wlyy.hospital;
package com.yihu.jw.entity.wlyy.hospital;

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/wlyy/patient/BasePatientExtendDO.java

@ -1,4 +1,4 @@
package com.yihu.jw.wlyy.patient;// default package
package com.yihu.jw.entity.wlyy.patient;// default package
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/wlyy/patient/BasePatientWechatDO.java

@ -1,4 +1,4 @@
package com.yihu.jw.wlyy.patient;// default package
package com.yihu.jw.entity.wlyy.patient;// default package
import com.yihu.jw.entity.UuidIdentityEntity;

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/wlyy/patient/WlyyAdvertisementDO.java

@ -1,4 +1,4 @@
package com.yihu.jw.wlyy.patient;
package com.yihu.jw.entity.wlyy.patient;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;

+ 13 - 12
common/common-exception/src/main/java/com/yihu/jw/exception/ApiException.java

@ -22,19 +22,8 @@ package com.yihu.jw.exception;
 * @created 2015.12.20 16:05
 */
public class ApiException extends RuntimeException {
    private Integer errorCode = -10000;
    public Integer getErrorCode() {
        return errorCode;
    }
    public void setErrorCode(Integer errorCode) {
        this.errorCode = errorCode;
    }
    public ApiException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
    private Integer errorCode = -10000;
    public ApiException() {
    }
@ -55,4 +44,16 @@ public class ApiException extends RuntimeException {
    public ApiException(Throwable cause) {
        super(cause);
    }
    public ApiException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
    public Integer getErrorCode() {
        return errorCode;
    }
    public void setErrorCode(Integer errorCode) {
        this.errorCode = errorCode;
    }
}

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

@ -4,7 +4,7 @@ import com.yihu.jw.fegin.fallbackfactory.archives.ArchivesFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.archives.PatientArchivesInfoVO;
import com.yihu.jw.restmodel.archives.PatientArchivesVO;
import com.yihu.jw.restmodel.common.Envelop;
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.*;
@ -20,20 +20,20 @@ import org.springframework.web.bind.annotation.*;
public interface ArchivesFeign {
    @GetMapping(value = PatientArchivesMapping.Archives.findPatientArchives)
    public Envelop<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);
    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 Envelop<PatientArchivesInfoVO> queryPatientArchivesInfoPage(@RequestParam(value = "code", required = false)String code);
    public MixEnvelop<PatientArchivesInfoVO, PatientArchivesInfoVO> queryPatientArchivesInfoPage(@RequestParam(value = "code", required = false)String code);
    @PostMapping(value = PatientArchivesMapping.Archives.createPatientArchives)
    public Envelop<Boolean> createPatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                  @RequestParam(value = "list", required = true)String list);
    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 Envelop<Boolean> updatePatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                  @RequestParam(value = "list", required = true)String list);
    public MixEnvelop<Boolean, Boolean> updatePatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                     @RequestParam(value = "list", required = true)String list);
}

+ 48 - 48
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/FunctionFeign.java

@ -1,48 +1,48 @@
package com.yihu.jw.fegin.base.base;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.base.FunctionFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = FunctionFeignFallbackFactory.class
)
@RequestMapping(value = BaseRequestMapping.api_base_common)
public interface FunctionFeign {
    @RequestMapping(value = BaseRequestMapping.Function.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop create(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseRequestMapping.Function.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseRequestMapping.Function.api_delete,method = RequestMethod.DELETE)
    Envelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.Function.api_getById)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseRequestMapping.Function.api_getList, method = RequestMethod.GET)
    Envelop 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 = BaseRequestMapping.Function.api_getListNoPage)
    Envelop 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 = BaseRequestMapping.Function.api_getChildren)
    Envelop getChildren(@PathVariable(value="id") String id) throws JiWeiException;
}
//package com.yihu.jw.fegin.base.base;
//
//import com.yihu.jw.exception.business.JiWeiException;
//import com.yihu.jw.fegin.fallbackfactory.base.base.FunctionFeignFallbackFactory;
//import com.yihu.jw.restmodel.CommonContants;
//import com.yihu.jw.restmodel.web.MixEnvelop;
//import com.yihu.jw.rm.base.BaseRequestMapping;
//import org.springframework.cloud.netflix.feign.FeignClient;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.*;
//
//
//@FeignClient(
//        name = CommonContants.svr_base // name值是eurika的实例名字
//        ,fallbackFactory  = FunctionFeignFallbackFactory.class
//)
//@RequestMapping(value = BaseRequestMapping.api_base_common)
//public interface FunctionFeign {
//
//    @RequestMapping(value = BaseRequestMapping.Function.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
//    MixEnvelop create(@RequestBody String jsonData) throws JiWeiException;
//
//    @RequestMapping(value =  BaseRequestMapping.Function.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
//    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
//
//    @RequestMapping(value =  BaseRequestMapping.Function.api_delete,method = RequestMethod.DELETE)
//    MixEnvelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.Function.api_getById)
//    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
//
//    @RequestMapping(value = BaseRequestMapping.Function.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 = BaseRequestMapping.Function.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 = BaseRequestMapping.Function.api_getChildren)
//    MixEnvelop getChildren(@PathVariable(value="id") String id) throws JiWeiException;
//}

+ 54 - 54
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/ModuleFeign.java

@ -1,54 +1,54 @@
package com.yihu.jw.fegin.base.base;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.base.ModuleFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = ModuleFeignFallbackFactory.class
)
@RequestMapping(value = BaseRequestMapping.api_base_common)
public interface ModuleFeign {
    @PostMapping(value = BaseRequestMapping.Module.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop create(@RequestBody String jsonData) throws JiWeiException;
    @PutMapping(value =  BaseRequestMapping.Module.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    @DeleteMapping(value =BaseRequestMapping.Module.api_delete)
    Envelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.Module.api_getById)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseRequestMapping.Module.api_getList, method = RequestMethod.GET)
    Envelop 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 = BaseRequestMapping.Module.api_getListNoPage)
    Envelop 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 = BaseRequestMapping.Module.api_getChildren)
    Envelop getChildren(@PathVariable(value = "id") String id) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.ModuleFun.api_getExistFun)
    Envelop getExistFunc(@PathVariable(value = "id") String id) throws JiWeiException;
    @PutMapping(value =  BaseRequestMapping.ModuleFun.api_changeFun,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop changeFun(@RequestBody String jsonData) throws JiWeiException;
}
//package com.yihu.jw.fegin.base.base;
//
//import com.yihu.jw.exception.business.JiWeiException;
//import com.yihu.jw.fegin.fallbackfactory.base.base.ModuleFeignFallbackFactory;
//import com.yihu.jw.restmodel.CommonContants;
//import com.yihu.jw.restmodel.common.Envelop;
//import com.yihu.jw.rm.base.BaseRequestMapping;
//import org.springframework.cloud.netflix.feign.FeignClient;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.*;
//
//
//@FeignClient(
//        name = CommonContants.svr_base // name值是eurika的实例名字
//        ,fallbackFactory  = ModuleFeignFallbackFactory.class
//)
//@RequestMapping(value = BaseRequestMapping.api_base_common)
//public interface ModuleFeign {
//
//    @PostMapping(value = BaseRequestMapping.Module.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
//    Envelop create(@RequestBody String jsonData) throws JiWeiException;
//
//    @PutMapping(value =  BaseRequestMapping.Module.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
//    Envelop update(@RequestBody String jsonData) throws JiWeiException;
//
//    @DeleteMapping(value =BaseRequestMapping.Module.api_delete)
//    Envelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.Module.api_getById)
//    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
//
//    @RequestMapping(value = BaseRequestMapping.Module.api_getList, method = RequestMethod.GET)
//    Envelop 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 = BaseRequestMapping.Module.api_getListNoPage)
//    Envelop 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 = BaseRequestMapping.Module.api_getChildren)
//    Envelop getChildren(@PathVariable(value = "id") String id) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.ModuleFun.api_getExistFun)
//    Envelop getExistFunc(@PathVariable(value = "id") String id) throws JiWeiException;
//
//    @PutMapping(value =  BaseRequestMapping.ModuleFun.api_changeFun,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
//    Envelop changeFun(@RequestBody String jsonData) throws JiWeiException;
//}

+ 26 - 26
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SaasFeign.java

@ -1,26 +1,26 @@
package com.yihu.jw.fegin.base.base;
import com.yihu.jw.fegin.fallbackfactory.base.base.SaasFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = SaasFeignFallbackFactory.class
)
@RequestMapping(value = BaseRequestMapping.api_base_common)
public interface SaasFeign {
    @GetMapping(value = BaseRequestMapping.Saas.api_getSaassNoPage)
    Envelop getList(@RequestParam(value = "fields",required = false)String fields,@RequestParam(value = "filters",required = false) String filters,@RequestParam(value = "sorts",required = false) String sorts);
    @GetMapping(value = BaseRequestMapping.Saas.api_getById, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop findByCode(@RequestParam(value = "id", required = true) String id);
}
//package com.yihu.jw.fegin.base.base;
//
//import com.yihu.jw.fegin.fallbackfactory.base.base.SaasFeignFallbackFactory;
//import com.yihu.jw.restmodel.CommonContants;
//import com.yihu.jw.restmodel.common.Envelop;
//import com.yihu.jw.rm.base.BaseRequestMapping;
//import org.springframework.cloud.netflix.feign.FeignClient;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//
//
//@FeignClient(
//        name = CommonContants.svr_base // name值是eurika的实例名字
//        ,fallbackFactory  = SaasFeignFallbackFactory.class
//)
//@RequestMapping(value = BaseRequestMapping.api_base_common)
//public interface SaasFeign {
//
//    @GetMapping(value = BaseRequestMapping.Saas.api_getSaassNoPage)
//    Envelop getList(@RequestParam(value = "fields",required = false)String fields,@RequestParam(value = "filters",required = false) String filters,@RequestParam(value = "sorts",required = false) String sorts);
//
//    @GetMapping(value = BaseRequestMapping.Saas.api_getById, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
//    Envelop findByCode(@RequestParam(value = "id", required = true) String id);
//}

+ 45 - 45
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SystemDictFeign.java

@ -1,45 +1,45 @@
package com.yihu.jw.fegin.base.base;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.base.SystemDictFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = SystemDictFeignFallbackFactory.class
)
@RequestMapping(value = BaseRequestMapping.api_base_common)
public interface SystemDictFeign {
    @RequestMapping(value = BaseRequestMapping.SystemDict.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop create(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseRequestMapping.SystemDict.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseRequestMapping.SystemDict.api_delete,method = RequestMethod.DELETE)
    Envelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.SystemDict.api_getById)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseRequestMapping.SystemDict.api_getList, method = RequestMethod.GET)
    Envelop 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 = BaseRequestMapping.SystemDict.api_getListNoPage)
    Envelop getListNoPage(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
}
//package com.yihu.jw.fegin.base.base;
//
//import com.yihu.jw.exception.business.JiWeiException;
//import com.yihu.jw.fegin.fallbackfactory.base.base.SystemDictFeignFallbackFactory;
//import com.yihu.jw.restmodel.CommonContants;
//import com.yihu.jw.restmodel.common.Envelop;
//import com.yihu.jw.rm.base.BaseRequestMapping;
//import org.springframework.cloud.netflix.feign.FeignClient;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.*;
//
//
//@FeignClient(
//        name = CommonContants.svr_base // name值是eurika的实例名字
//        ,fallbackFactory  = SystemDictFeignFallbackFactory.class
//)
//@RequestMapping(value = BaseRequestMapping.api_base_common)
//public interface SystemDictFeign {
//
//    @RequestMapping(value = BaseRequestMapping.SystemDict.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
//    Envelop create(@RequestBody String jsonData) throws JiWeiException;
//
//    @RequestMapping(value =  BaseRequestMapping.SystemDict.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
//    Envelop update(@RequestBody String jsonData) throws JiWeiException;
//
//    @RequestMapping(value =  BaseRequestMapping.SystemDict.api_delete,method = RequestMethod.DELETE)
//    Envelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.SystemDict.api_getById)
//    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
//
//    @RequestMapping(value = BaseRequestMapping.SystemDict.api_getList, method = RequestMethod.GET)
//    Envelop 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 = BaseRequestMapping.SystemDict.api_getListNoPage)
//    Envelop getListNoPage(
//            @RequestParam(value = "fields", required = false) String fields,
//            @RequestParam(value = "filters", required = false) String filters,
//            @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
//}

+ 48 - 48
common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SystemDictListFeign.java

@ -1,48 +1,48 @@
package com.yihu.jw.fegin.base.base;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.base.SystemDictListFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@FeignClient(
        name = CommonContants.svr_base // name值是eurika的实例名字
        ,fallbackFactory  = SystemDictListFeignFallbackFactory.class
)
@RequestMapping(value = BaseRequestMapping.api_base_common)
public interface SystemDictListFeign {
    @RequestMapping(value = BaseRequestMapping.SystemDictList.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop create(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseRequestMapping.SystemDictList.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseRequestMapping.SystemDictList.api_delete,method = RequestMethod.DELETE)
    Envelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
    @GetMapping(value = BaseRequestMapping.SystemDictList.api_getById)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseRequestMapping.SystemDictList.api_getList, method = RequestMethod.GET)
    Envelop 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 = BaseRequestMapping.SystemDictList.api_getListNoPage)
    Envelop 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 = BaseRequestMapping.SystemDictList.api_getChildren)
    Envelop getChildren(@PathVariable(value = "id") String id) throws JiWeiException;
}
//package com.yihu.jw.fegin.base.base;
//
//import com.yihu.jw.exception.business.JiWeiException;
//import com.yihu.jw.fegin.fallbackfactory.base.base.SystemDictListFeignFallbackFactory;
//import com.yihu.jw.restmodel.CommonContants;
//import com.yihu.jw.restmodel.web.MixEnvelop;
//import com.yihu.jw.rm.base.BaseRequestMapping;
//import org.springframework.cloud.netflix.feign.FeignClient;
//import org.springframework.http.MediaType;
//import org.springframework.web.bind.annotation.*;
//
//
//@FeignClient(
//        name = CommonContants.svr_base // name值是eurika的实例名字
//        ,fallbackFactory  = SystemDictListFeignFallbackFactory.class
//)
//@RequestMapping(value = BaseRequestMapping.api_base_common)
//public interface SystemDictListFeign {
//
//    @RequestMapping(value = BaseRequestMapping.SystemDictList.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
//    MixEnvelop create(@RequestBody String jsonData) throws JiWeiException;
//
//    @RequestMapping(value =  BaseRequestMapping.SystemDictList.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
//    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
//
//    @RequestMapping(value =  BaseRequestMapping.SystemDictList.api_delete,method = RequestMethod.DELETE)
//    MixEnvelop delete(@PathVariable(value = "ids", required = true) String ids, @RequestParam(value = "userId") String userId, @RequestParam(value = "userName") String userName) throws JiWeiException;
//
//    @GetMapping(value = BaseRequestMapping.SystemDictList.api_getById)
//    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
//
//    @RequestMapping(value = BaseRequestMapping.SystemDictList.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 = BaseRequestMapping.SystemDictList.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 = BaseRequestMapping.SystemDictList.api_getChildren)
//    MixEnvelop getChildren(@PathVariable(value = "id") String id) throws JiWeiException;
//}

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

@ -2,8 +2,8 @@ package com.yihu.jw.fegin.base.login;
import com.yihu.jw.fegin.fallbackfactory.base.base.LoginFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
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;
@ -22,10 +22,10 @@ import org.springframework.web.bind.annotation.RequestParam;
public interface LoginFeign {
    @PostMapping(value = BaseLoginRequestMapping.BaseLoginAccount.api_checkoutInfo, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    BaseEnvelop checkoutInfo(@RequestParam(value = "ssc", required = true) String ssc,@RequestParam(value = "idcard", required = true) String idcard);
    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)
    Envelop register(
    MixEnvelop register(
            @RequestParam(value = "mobilePhone", required = true) String mobilePhone,
            @RequestParam(value = "saasId", required = true) String saasId,
            @RequestParam(value = "type", required = true) int type,
@ -37,8 +37,8 @@ public interface LoginFeign {
    @PostMapping(value = BaseLoginRequestMapping.BaseLoginAccount.api_login, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop 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);
    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);
}

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.base.sms;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
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;
@ -21,8 +21,8 @@ import java.io.IOException;
@RequestMapping(value = BaseSmsRequestMapping.api_common)
public interface RegisterSmsFeign {
    @PostMapping(value = BaseSmsRequestMapping.Sms.api_sms_send, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    BaseEnvelop 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 ;
    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 ;
    }

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

@ -3,7 +3,7 @@ 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.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -19,31 +19,31 @@ import org.springframework.web.bind.annotation.*;
public interface BaseMenuFeign {
    
    @RequestMapping(value = BaseUserRequestMapping.BaseMenu.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop create(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop create(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseUserRequestMapping.BaseMenu.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseUserRequestMapping.BaseMenu.api_delete,method = RequestMethod.DELETE)
    Envelop delete(@PathVariable(value = "id") String id) throws JiWeiException;
    MixEnvelop delete(@PathVariable(value = "id") String id) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseMenu.api_getOne)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseMenu.api_getList, method = RequestMethod.GET)
    Envelop 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;
    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)
    Envelop getListNoPage(@RequestParam(value = "fields", required = false) String fields,
                          @RequestParam(value = "filters", required = false) String filters,
                          @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException;
    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)
    Envelop getChildren(@RequestParam(value = "saasId", required = true) String saasId, @RequestParam(value = "parentId", required = true) String parentId) throws JiWeiException;
    MixEnvelop getChildren(@RequestParam(value = "saasId", required = true) String saasId, @RequestParam(value = "parentId", required = true) String parentId) throws JiWeiException;

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

@ -3,7 +3,7 @@ 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.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -20,19 +20,19 @@ import org.springframework.web.bind.annotation.*;
public interface BaseRoleFeign {
    @RequestMapping(value = BaseUserRequestMapping.BaseRole.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    Envelop create(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop create(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRole.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.PUT)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRole.api_delete, method = RequestMethod.DELETE)
    Envelop delete(@PathVariable(value = "id") String id) throws JiWeiException;
    MixEnvelop delete(@PathVariable(value = "id") String id) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseRole.api_getById)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRole.api_getListPage, method = RequestMethod.GET)
    Envelop getList(
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -40,24 +40,24 @@ public interface BaseRoleFeign {
            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseRole.api_getlistNoPage)
    Envelop 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)
    Envelop createRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop createRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRoleMenu.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    Envelop updateRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop updateRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRoleMenu.api_delete, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    Envelop deleteRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop deleteRoleMenus(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseRoleMenu.api_getListNoPage, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, method = RequestMethod.POST)
    Envelop getMenuList(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop getMenuList(@RequestBody String jsonData) throws JiWeiException;
    @PostMapping(value = BaseUserRequestMapping.BaseRole.api_getRoleByPhoneAndSaasId, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop getPhoneAndSaasId(@RequestParam(value = "phone", required = true) String phone, @RequestParam(value = "saasId", required = true) String saasId);
    MixEnvelop getPhoneAndSaasId(@RequestParam(value = "phone", required = true) String phone, @RequestParam(value = "saasId", required = true) String saasId);
}

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

@ -3,7 +3,7 @@ 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.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -20,19 +20,19 @@ import org.springframework.web.bind.annotation.*;
public interface EmployFeign {
    @RequestMapping(value = BaseUserRequestMapping.BaseEmploy.api_create,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop create(@RequestBody String jsonData);
    MixEnvelop create(@RequestBody String jsonData);
    @RequestMapping(value =  BaseUserRequestMapping.BaseEmploy.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.PUT)
    Envelop update(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop update(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value =  BaseUserRequestMapping.BaseEmploy.api_delete,method = RequestMethod.DELETE)
    Envelop delete(@PathVariable (value = "id") String id) throws JiWeiException;
    MixEnvelop delete(@PathVariable (value = "id") String id) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseEmploy.api_getById)
    Envelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    MixEnvelop findById(@PathVariable(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmploy.api_getListBySaasId, method = RequestMethod.GET)
    Envelop getList(
    MixEnvelop getList(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -40,24 +40,24 @@ public interface EmployFeign {
            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseEmploy.api_getListNoPage)
    Envelop 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)
    Envelop createEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop createEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmployRole.api_update,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop updateEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop updateEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmployRole.api_delete,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop deleteEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop deleteEmployRoles(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = BaseUserRequestMapping.BaseEmployRole.api_getListNoPage,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE,method = RequestMethod.POST)
    Envelop getRoleList(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop getRoleList(@RequestBody String jsonData) throws JiWeiException;
    @GetMapping(value = BaseUserRequestMapping.BaseEmploy.api_getByPhone)
    Envelop getEmployeeByPhoneAndSaasId(@RequestParam(value = "phone", required = true) String phone,@RequestParam(value = "saasId", required = true) String saasId);
    MixEnvelop getEmployeeByPhoneAndSaasId(@RequestParam(value = "phone", required = true) String phone, @RequestParam(value = "saasId", required = true) String saasId);
}

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

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.fegin.fallbackfactory.base.wx.AccessTokenFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -20,6 +20,6 @@ import org.springframework.web.bind.annotation.RequestParam;
public interface AccessTokenFeign {
    @RequestMapping(value = WechatRequestMapping.WxAccessToken.api_get, method = RequestMethod.GET)
    Envelop getWxAccessToken(@RequestParam(value = "wechatId") String wechatId) ;
    MixEnvelop getWxAccessToken(@RequestParam(value = "wechatId") String wechatId) ;
}

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

@ -3,7 +3,7 @@ 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.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;;
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;
@ -23,19 +23,19 @@ import org.springframework.web.bind.annotation.RequestParam;
public interface GraphicMessageFeign {
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_create, method = RequestMethod.POST,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop createWxGraphicMessage( @RequestBody String jsonData) throws JiWeiException;
    MixEnvelop createWxGraphicMessage(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_update,method = RequestMethod.PUT,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop updateWxGraphicMessage( @RequestBody String jsonData) throws JiWeiException;
    MixEnvelop updateWxGraphicMessage(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_delete,method = RequestMethod.DELETE)
    Envelop deleteWxGraphicMessage(@RequestParam(value = "ids") String ids,@RequestParam(value = "userId") String userId,@RequestParam(value = "userName") String userName) throws JiWeiException;
    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)
    Envelop findById(@RequestParam(value = "id") String id) throws JiWeiException;
    MixEnvelop findById(@RequestParam(value = "id") String id) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_getWxGraphicMessages,method = RequestMethod.GET)
    Envelop getWxGraphicMessages(
    MixEnvelop getWxGraphicMessages(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -43,7 +43,7 @@ public interface GraphicMessageFeign {
            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxGraphicMessage.api_getWxGraphicMessageNoPage,method = RequestMethod.GET)
    Envelop getWxGraphicMessageNoPage(
    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;

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

@ -3,7 +3,7 @@ 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.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -21,20 +21,20 @@ import org.springframework.web.bind.annotation.RequestParam;
public interface WechatFeign {
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_create, method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop createWechat( @RequestBody String jsonData) throws JiWeiException;
    MixEnvelop createWechat(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_update, method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop updateWechat(String jsonData) throws JiWeiException;
    MixEnvelop updateWechat(String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_delete,method = RequestMethod.DELETE)
    Envelop deleteWechat(@RequestParam(value = "ids") String ids,@RequestParam(value = "userId") String userId,@RequestParam(value = "userName") String userName) throws JiWeiException;
    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)
    Envelop findById(@RequestParam(value = "id") String id) throws JiWeiException;
    MixEnvelop findById(@RequestParam(value = "id") String id) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxConfig.api_getWechats ,method = RequestMethod.GET)
    Envelop 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;
    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 )
    Envelop getWechatNoPage(@RequestParam(value = "fields")String fields,@RequestParam(value = "filters") String filters,@RequestParam(value = "sorts") String sorts) throws JiWeiException;
    MixEnvelop getWechatNoPage(@RequestParam(value = "fields")String fields, @RequestParam(value = "filters") String filters, @RequestParam(value = "sorts") String sorts) throws JiWeiException;
}

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

@ -3,7 +3,7 @@ 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.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -20,25 +20,25 @@ import org.springframework.web.bind.annotation.*;
public interface WechatMenuFeign {
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_create,method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop createWxMenu( @RequestBody String jsonData) throws JiWeiException;
    MixEnvelop createWxMenu(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_update,method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop updateWxMenu( @RequestBody String jsonData) throws JiWeiException;
    MixEnvelop updateWxMenu(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_delete,method = RequestMethod.DELETE)
    Envelop deleteWxMenu(@RequestParam(value="ids")String ids,@RequestParam(value = "userId") String userId,@RequestParam(value = "userName") String userName) throws JiWeiException;
    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)
    Envelop findById(@RequestParam(value="id")String id) throws JiWeiException;
    MixEnvelop findById(@RequestParam(value="id")String id) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_getWxMenuNoPage,method = RequestMethod.GET)
    Envelop getWxMenuNoPage(
    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)
    Envelop getWxMenus(
    MixEnvelop getWxMenus(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -46,11 +46,11 @@ public interface WechatMenuFeign {
            @RequestParam(value = "page", required = false) int page) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_createMenu ,method = RequestMethod.GET)
    Envelop createWechatMenu(@RequestParam(value = "wechatId", required = true)String wechatId);
    MixEnvelop createWechatMenu(@RequestParam(value = "wechatId", required = true)String wechatId);
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_getParentMenu,method = RequestMethod.GET)
    Envelop getParentMenu(@PathVariable(value = "wechatId", required = true) String wechatId) throws JiWeiException;
    MixEnvelop getParentMenu(@PathVariable(value = "wechatId", required = true) String wechatId) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxMenu.api_getChildMenus,method = RequestMethod.GET)
    Envelop getChildMenus(@PathVariable(value = "parentId", required = true) String parentId) throws JiWeiException;
    MixEnvelop getChildMenus(@PathVariable(value = "parentId", required = true) String parentId) throws JiWeiException;
}

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

@ -3,7 +3,7 @@ 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.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -20,25 +20,25 @@ import org.springframework.web.bind.annotation.*;
public interface WechatTemplateFeign {
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_create ,method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop createWxTemplate(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop createWxTemplate(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_update ,method = RequestMethod.PUT, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop updateWxTemplate(@RequestBody String jsonData) throws JiWeiException;
    MixEnvelop updateWxTemplate(@RequestBody String jsonData) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_delete ,method = RequestMethod.DELETE)
    Envelop deleteWxTemplate( @RequestParam(value = "ids", required = true) String ids,@RequestParam(value = "userId") String userId,@RequestParam(value = "userName") String userName) throws JiWeiException;
    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)
    Envelop findById( @RequestParam(value = "id", required = true) String id) throws JiWeiException;
    MixEnvelop findById(@RequestParam(value = "id", required = true) String id) throws JiWeiException;
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_getWxTemplatesNoPage ,method = RequestMethod.GET)
    Envelop getWechatNoPage(
    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)
    Envelop getWechats(
    MixEnvelop getWechats(
            @RequestParam(value = "fields", required = false) String fields,
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts,
@ -47,7 +47,7 @@ public interface WechatTemplateFeign {
    @RequestMapping(value = WechatRequestMapping.WxTemplate.api_sendTemplateMessage ,method = RequestMethod.GET)
    @ResponseBody
    Envelop sendTemplateMessage(
    MixEnvelop sendTemplateMessage(
            @RequestParam(value="openid") String openid,
            @RequestParam(value="templateId") String templateId,
            @RequestParam(value="url",required = false) String url,

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

@ -3,7 +3,7 @@ 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.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -22,11 +22,11 @@ public class ArchivesFallbackFactory implements FallbackFactory<ArchivesFeign> {
    public ArchivesFeign create(Throwable e){
        return new ArchivesFeign() {
            @Override
            public Envelop<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){
            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);
@ -36,15 +36,15 @@ public class ArchivesFallbackFactory implements FallbackFactory<ArchivesFeign> {
                return null;
            }
            @Override
            public Envelop<PatientArchivesInfoVO> queryPatientArchivesInfoPage(@RequestParam(value = "code", required = false)String code){
            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 Envelop<Boolean> createPatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                          @RequestParam(value = "list", required = true)String list){
            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);
@ -52,8 +52,8 @@ public class ArchivesFallbackFactory implements FallbackFactory<ArchivesFeign> {
            }
            @Override
            public Envelop<Boolean> updatePatientArchives(@RequestParam(value = "patientArchives", required = true)String patientArchives,
                                                          @RequestParam(value = "list", required = true)String list){
            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);

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

@ -1,80 +1,80 @@
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.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 FunctionFeignFallbackFactory implements FallbackFactory<FunctionFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public FunctionFeign create(Throwable e) {
        return new FunctionFeign() {
            @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);
            }
            @Override
            public Envelop getChildren(String code) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找功能子项失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("code:" + code);
                throw new JiWeiException(e);
            }
        };
    }
}
//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);
//            }
//        };
//    }
//}

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

@ -1,9 +1,9 @@
package com.yihu.jw.fegin.fallbackfactory.base.base;
import com.yihu.jw.fegin.base.login.LoginFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelopStatus;
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;
@ -28,9 +28,9 @@ public class LoginFeignFallbackFactory implements FallbackFactory<LoginFeign> {
             * @return
             */
            @Override
            public BaseEnvelop checkoutInfo(String ssc,String idcard) {
            public Envelop checkoutInfo(String ssc, String idcard) {
                tracer.getCurrentSpan().logEvent("校验医保卡、身份证、手机号接口错误:原因:"+e.getMessage());
                return Envelop.getError(e.getMessage(), BaseEnvelopStatus.system_error.getCode());
                return MixEnvelop.getError(e.getMessage(), EnvelopStatus.system_error.code);
            }
            /**
@ -46,9 +46,9 @@ public class LoginFeignFallbackFactory implements FallbackFactory<LoginFeign> {
             * @return
             */
            @Override
            public Envelop register(String mobilePhone, String saasId, int type, String captcha, String name, String password, String idcard, String ssc) {
            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 Envelop.getError(e.getMessage(),BaseEnvelopStatus.system_error.getCode());
                return MixEnvelop.getError(e.getMessage(), EnvelopStatus.system_error.code);
            }
            /**
@ -60,9 +60,9 @@ public class LoginFeignFallbackFactory implements FallbackFactory<LoginFeign> {
             * @return
             */
            @Override
            public Envelop login(String mobilePhone, String password, String saasId, String captcha) {
            public MixEnvelop login(String mobilePhone, String password, String saasId, String captcha) {
                tracer.getCurrentSpan().logEvent("登录账号接口错误:原因:"+e.getMessage());
                return Envelop.getError(e.getMessage(),BaseEnvelopStatus.system_error.getCode());
                return MixEnvelop.getError(e.getMessage(), EnvelopStatus.system_error.code);
            }
        };
    }

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

@ -1,94 +1,94 @@
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);
            }
        };
    }
}
//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);
//            }
//        };
//    }
//}

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

@ -1,26 +1,26 @@
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;
            }
        };
    }
}
//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;
//            }
//        };
//    }
//}

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

@ -1,73 +1,73 @@
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);
            }
        };
    }
}
//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);
//            }
//
//        };
//    }
//}

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

@ -1,79 +1,79 @@
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.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 SystemDictListFeignFallbackFactory implements FallbackFactory<SystemDictListFeign> {
    @Autowired
    private Tracer tracer;
    @Override
    public SystemDictListFeign create(Throwable e) {
        return new SystemDictListFeign() {
            @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);
            }
            @Override
            public Envelop getChildren(String code) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找系統字典子项失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("code:" + code);
                throw new JiWeiException(e);
            }
        };
    }
}
//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);
//            }
//        };
//    }
//}

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

@ -2,7 +2,7 @@ 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.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -23,35 +23,35 @@ public class BaseMenuFeignFallbackFactory implements FallbackFactory<BaseMenuFei
    public BaseMenuFeign create(Throwable e) {
        return new BaseMenuFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop 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 {
            public MixEnvelop 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 id) throws JiWeiException {
            public MixEnvelop delete(@PathVariable String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop findById(String id) throws JiWeiException {
            public MixEnvelop 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 {
            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);
@ -62,7 +62,7 @@ public class BaseMenuFeignFallbackFactory implements FallbackFactory<BaseMenuFei
            }
            @Override
            public Envelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
            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);
@ -71,7 +71,7 @@ public class BaseMenuFeignFallbackFactory implements FallbackFactory<BaseMenuFei
            }
            @Override
            public Envelop getChildren(String saasId, String parentId) throws JiWeiException {
            public MixEnvelop getChildren(String saasId, String parentId) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找子菜单列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("filters:" + saasId);
                tracer.getCurrentSpan().logEvent("sorts:" + parentId);

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

@ -2,7 +2,7 @@ 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.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -23,35 +23,35 @@ public class BaseRoleFeignFallbackFactory implements FallbackFactory<BaseRoleFei
    public BaseRoleFeign create(Throwable e) {
        return new BaseRoleFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop 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 {
            public MixEnvelop 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 id) throws JiWeiException {
            public MixEnvelop delete(@PathVariable String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop findById(String id) throws JiWeiException {
            public MixEnvelop 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 {
            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);
@ -62,7 +62,7 @@ public class BaseRoleFeignFallbackFactory implements FallbackFactory<BaseRoleFei
            }
            @Override
            public Envelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
            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);
@ -71,35 +71,35 @@ public class BaseRoleFeignFallbackFactory implements FallbackFactory<BaseRoleFei
            }
            @Override
            public Envelop createRoleMenus(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop createRoleMenus(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建角色菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop updateRoleMenus(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop updateRoleMenus(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("修改角色菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop deleteRoleMenus(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop deleteRoleMenus(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除角色菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getMenuList(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop getMenuList(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("获取角色菜单列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getPhoneAndSaasId(String phone, String saasId) {
            public MixEnvelop getPhoneAndSaasId(String phone, String saasId) {
                return null;
            }

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

@ -2,7 +2,7 @@ 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.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -22,35 +22,35 @@ public class EmployeeFeignFallbackFactory  implements FallbackFactory<EmployFeig
    public EmployFeign create(Throwable e) {
        return new EmployFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData){
            public MixEnvelop create(@RequestBody String jsonData){
                tracer.getCurrentSpan().logEvent("创建用户失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                return null;
            }
            @Override
            public Envelop update(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop 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 id) throws JiWeiException {
            public MixEnvelop delete(@PathVariable String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除用户失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop findById(String id) throws JiWeiException {
            public MixEnvelop 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 {
            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);
@ -61,7 +61,7 @@ public class EmployeeFeignFallbackFactory  implements FallbackFactory<EmployFeig
            }
            @Override
            public Envelop getListNoPage(String fields, String filters, String sorts) throws JiWeiException {
            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);
@ -70,35 +70,35 @@ public class EmployeeFeignFallbackFactory  implements FallbackFactory<EmployFeig
            }
            @Override
            public Envelop createEmployRoles(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop createEmployRoles(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("新增用户角色列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop updateEmployRoles(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop updateEmployRoles(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("修改用户角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop deleteEmployRoles(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop deleteEmployRoles(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("删除用户角色失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getRoleList(@RequestBody String jsonData) throws JiWeiException {
            public MixEnvelop getRoleList(@RequestBody String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("获取用户角色列表失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getEmployeeByPhoneAndSaasId(String phone, String saasId){
            public MixEnvelop getEmployeeByPhoneAndSaasId(String phone, String saasId){
                return null;
            }
        };

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.base.wx;
import com.yihu.jw.fegin.base.wx.AccessTokenFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;
@ -15,7 +15,7 @@ public class AccessTokenFeignFallbackFactory implements FallbackFactory<AccessTo
    public AccessTokenFeign create(Throwable throwable) {
        return new AccessTokenFeign() {
            @Override
            public Envelop getWxAccessToken(@RequestParam(value = "wechatCode") String wechatCode) {
            public MixEnvelop getWxAccessToken(@RequestParam(value = "wechatCode") String wechatCode) {
                return null;
            }
        };

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

@ -2,7 +2,7 @@ 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.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -22,21 +22,21 @@ public class GraphicMessageFeignFallbackFactory implements FallbackFactory<Graph
    public GraphicMessageFeign create(Throwable e) {
        return new GraphicMessageFeign() {
            @Override
            public Envelop createWxGraphicMessage(@RequestParam(value = "jsonData") String jsonData) throws JiWeiException {
            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 Envelop updateWxGraphicMessage(@RequestParam(value = "jsonData") String jsonData) throws JiWeiException {
            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 Envelop deleteWxGraphicMessage(String codes,String userCode,String userName) throws JiWeiException {
            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);
@ -44,14 +44,14 @@ public class GraphicMessageFeignFallbackFactory implements FallbackFactory<Graph
            }
            @Override
            public Envelop findById(String id) throws JiWeiException {
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("根据code查找微信图文消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop 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 {
            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);
@ -62,7 +62,7 @@ public class GraphicMessageFeignFallbackFactory implements FallbackFactory<Graph
            }
            @Override
            public Envelop getWxGraphicMessageNoPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) throws JiWeiException {
            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);

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

@ -2,7 +2,7 @@ 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.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -19,31 +19,31 @@ public class WechatFeignFallbackFactory implements FallbackFactory<WechatFeign>
    public WechatFeign create(Throwable e) {
        return new WechatFeign() {
            public Envelop createWechat(String jsonData) throws JiWeiException {
            public MixEnvelop createWechat(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            public Envelop updateWechat(String jsonData) throws JiWeiException {
            public MixEnvelop updateWechat(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            public Envelop deleteWechat(String codes,String userCode,String userName) throws JiWeiException {
            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 Envelop findById(String id) throws JiWeiException {
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信配置失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            public Envelop getWechats(String fields, String filters, String sorts, int size, int page) throws JiWeiException {
            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);
@ -53,7 +53,7 @@ public class WechatFeignFallbackFactory implements FallbackFactory<WechatFeign>
                throw new JiWeiException(e);
            }
            public Envelop getWechatNoPage(String fields, String filters, String sorts) throws JiWeiException {
            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);

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

@ -2,7 +2,7 @@ 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.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -22,21 +22,21 @@ public class WechatMenuFeignFallbackFactory implements FallbackFactory<WechatMen
    public WechatMenuFeign create(Throwable e) {
        return new WechatMenuFeign() {
            @Override
            public Envelop createWxMenu(String jsonData) throws JiWeiException {
            public MixEnvelop createWxMenu(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建微信菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop updateWxMenu(String jsonData) throws JiWeiException {
            public MixEnvelop updateWxMenu(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新微信菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop deleteWxMenu(String codes,String userCode,String userName) throws JiWeiException {
            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);
@ -45,14 +45,14 @@ public class WechatMenuFeignFallbackFactory implements FallbackFactory<WechatMen
            @Override
            public Envelop findById(String id) throws JiWeiException {
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("查找微信菜单失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop getWxMenuNoPage(String fields, String filters, String sorts) throws JiWeiException {
            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);
@ -62,26 +62,26 @@ public class WechatMenuFeignFallbackFactory implements FallbackFactory<WechatMen
            @Override
            public Envelop createWechatMenu(String wechatCode) {
            public MixEnvelop createWechatMenu(String wechatCode) {
                return null;
            }
            @Override
            public Envelop getParentMenu(@PathVariable String wechatCode) throws JiWeiException {
            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 Envelop getChildMenus(@PathVariable(value = "parentCode", required = true) String parentCode) throws JiWeiException {
            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 Envelop getWxMenus(String fields, String filters, String sorts, int size, int page) throws JiWeiException {
            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);

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

@ -2,7 +2,7 @@ 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.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.sleuth.Tracer;
@ -21,40 +21,40 @@ public class WechatTemplateFeignFallbackFactory implements FallbackFactory<Wecha
    public WechatTemplateFeign create(Throwable e) {
        return new WechatTemplateFeign() {
            @Override
            public Envelop createWxTemplate(String jsonData) throws JiWeiException {
            public MixEnvelop createWxTemplate(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("创建微信模板消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop updateWxTemplate(String jsonData) throws JiWeiException {
            public MixEnvelop updateWxTemplate(String jsonData) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("更新微信模板消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:"+jsonData);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop deleteWxTemplate(String codes,String userCode,String userName) throws JiWeiException {
            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 Envelop findById(String id) throws JiWeiException {
            public MixEnvelop findById(String id) throws JiWeiException {
                tracer.getCurrentSpan().logEvent("根据code查找微信模板消息失败:原因:"+e.getMessage());
                tracer.getCurrentSpan().logEvent("id:"+id);
                throw new JiWeiException(e);
            }
            @Override
            public Envelop sendTemplateMessage(String openid, String templateCode, String url, String appid, String pagepath, String data) {
            public MixEnvelop sendTemplateMessage(String openid, String templateCode, String url, String appid, String pagepath, String data) {
                return null;
            }
            @Override
            public Envelop getWechatNoPage(String fields, String filters, String sorts) throws JiWeiException {
            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);
@ -63,7 +63,7 @@ public class WechatTemplateFeignFallbackFactory implements FallbackFactory<Wecha
            }
            @Override
            public Envelop getWechats(String fields, String filters, String sorts, int size, int page) throws JiWeiException {
            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);

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.common;
import com.yihu.jw.fegin.iot.common.IotFileUploadFeign;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -24,25 +24,25 @@ public class IotFileUploadFallbackFactory implements FallbackFactory<IotFileUplo
    public IotFileUploadFeign create(Throwable e) {
        return new IotFileUploadFeign() {
            @Override
            public Envelop<UploadVO> uploadImg(@RequestParam(value = "file", required = true) MultipartFile file) {
            public MixEnvelop<UploadVO, UploadVO> uploadImg(@RequestParam(value = "file", required = true) MultipartFile file) {
                tracer.getCurrentSpan().logEvent("文件流上传图片失败:原因:" + e.getMessage());
                return null;
            }
            @Override
            public Envelop<UploadVO> uploadAttachment(@RequestParam(value = "file", required = true) MultipartFile file) {
            public MixEnvelop<UploadVO, UploadVO> uploadAttachment(@RequestParam(value = "file", required = true) MultipartFile file) {
                tracer.getCurrentSpan().logEvent("文件流上传附件失败:原因:" + e.getMessage());
                return null;
            }
            @Override
            public Envelop<UploadVO> uploadStream(@RequestParam(value = "file", required = true) MultipartFile file) {
            public MixEnvelop<UploadVO, UploadVO> uploadStream(@RequestParam(value = "file", required = true) MultipartFile file) {
                tracer.getCurrentSpan().logEvent("文件流上传文件失败:原因:" + e.getMessage());
                return null;
            }
            @Override
            public Envelop<UploadVO> uploadImages(@RequestBody String jsonData) {
            public MixEnvelop<UploadVO, UploadVO> uploadImages(@RequestBody String jsonData) {
                tracer.getCurrentSpan().logEvent("base64上传图片失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.common;
import com.yihu.jw.fegin.iot.common.IotSystemDictFeign;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -22,7 +22,7 @@ public class IotSystemDictFallbackFactory implements FallbackFactory<IotSystemDi
    public IotSystemDictFeign create(Throwable e) {
        return new IotSystemDictFeign() {
            @Override
            public Envelop<IotSystemDictVO> getList(@RequestParam(value = "dictName", required = true) String dictName) throws Exception {
            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;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.company;
import com.yihu.jw.fegin.iot.company.IotCompanyFeign;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -24,11 +24,11 @@ public class IotCompanyFallbackFactory implements FallbackFactory<IotCompanyFeig
        return new IotCompanyFeign() {
            @Override
            public Envelop<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){
            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);
@ -39,42 +39,42 @@ public class IotCompanyFallbackFactory implements FallbackFactory<IotCompanyFeig
            }
            @Override
            public Envelop<IotCompanyVO> addCompany(@RequestParam(value = "jsonData", required = true)String jsonData) {
            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 Envelop<IotCompanyVO> findByCode(@RequestParam(value = "id", required = true) String id) {
            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 Envelop<IotCompanyVO> findByBusinessLicense(@RequestParam(value = "businessLicense", required = true) String businessLicense) {
            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 Envelop<IotCompanyVO> delCompany(@RequestParam(value = "id", required = true) String id) {
            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 Envelop<IotCompanyVO> updCompany(@RequestParam(value = "jsonData", required = true)String jsonData) {
            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 Envelop<IotCompanyCertificateVO> 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,
@ -88,28 +88,28 @@ public class IotCompanyFallbackFactory implements FallbackFactory<IotCompanyFeig
            }
            @Override
            public Envelop<IotCompanyCertificateVO> findCompanyCertById(@RequestParam(value = "id", required = true) String id) {
            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 Envelop<IotCompanyCertificateVO> findCompanyCertByCompanyId(@RequestParam(value = "companyId", required = true) String companyId) {
            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 Envelop<IotCompanyCertificateVO> addCompanyCert(@RequestParam(value = "jsonData", required = true)String jsonData) {
            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 Envelop<IotCompanyCertificateVO> delCompanyCert(@RequestParam(value = "id", required = true)String id) {
            public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> delCompanyCert(@RequestParam(value = "id", required = true)String id) {
                tracer.getCurrentSpan().logEvent("删除企业证书失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
                return null;

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

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

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

@ -1,12 +1,11 @@
package com.yihu.jw.fegin.fallbackfactory.iot.data_input;
import com.yihu.jw.fegin.iot.data_input.DataSearchFeign;
import com.yihu.jw.restmodel.common.Envelop;
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 DataSearchFeignFallbackFactory implements FallbackFactory<DataSearchFeign> {
@ -19,70 +18,70 @@ public class DataSearchFeignFallbackFactory implements FallbackFactory<DataSearc
        return new DataSearchFeign() {
            @Override
            public Envelop getOne(String jsonData) {
            public MixEnvelop getOne(String jsonData) {
                tracer.getCurrentSpan().logEvent("根据id获取单条数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getList(String jsonData ) {
            public MixEnvelop getList(String jsonData ) {
                tracer.getCurrentSpan().logEvent("获取多条数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getListPage(String jsonData ) {
            public MixEnvelop getListPage(String jsonData ) {
                tracer.getCurrentSpan().logEvent("获取数据分页列表失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getRecent5ByTypeAndTime(String jsonData ) {
            public MixEnvelop getRecent5ByTypeAndTime(String jsonData ) {
                tracer.getCurrentSpan().logEvent("获取最近5条记录数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getAbnormalTimesAWeek(String jsonData ) {
            public MixEnvelop getAbnormalTimesAWeek(String jsonData ) {
                tracer.getCurrentSpan().logEvent("获取最近体征数据异常次数失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getRecent1ByCodeAndDel(String jsonData ) {
            public MixEnvelop getRecent1ByCodeAndDel(String jsonData ) {
                tracer.getCurrentSpan().logEvent("根据居民code和删除标识获取最近一次体征数据:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getListByCodeAndDel(String jsonData ) {
            public MixEnvelop getListByCodeAndDel(String jsonData ) {
                tracer.getCurrentSpan().logEvent("根据居民code和删除标识获取所有体征数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop delete(String jsonData) {
            public MixEnvelop delete(String jsonData) {
                tracer.getCurrentSpan().logEvent("根据居民rid删除用户体征数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop update(String jsonData) {
            public MixEnvelop update(String jsonData) {
                tracer.getCurrentSpan().logEvent("根据rid修改用户体征数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop getWeRunDataListById(String jsonData) {
            public MixEnvelop getWeRunDataListById(String jsonData) {
                tracer.getCurrentSpan().logEvent("根据用户code用户微信运动数据列表数据失败:原因:" + throwable.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;

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

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

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

@ -1,8 +1,8 @@
package com.yihu.jw.fegin.fallbackfactory.iot.device;
import com.yihu.jw.fegin.iot.device.IotDeviceFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.common.base.BaseEnvelop;
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;
@ -28,14 +28,14 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
        return new IotDeviceFeign() {
            @Override
            public Envelop<IotDeviceVO> create(@RequestParam(value = "jsonData", required = true) String jsonData) {
            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 Envelop<IotDeviceVO> findByCode(@RequestParam(value = "id", required = true) String id
            public MixEnvelop<IotDeviceVO, IotDeviceVO> findByCode(@RequestParam(value = "id", required = true) String id
            ) {
                tracer.getCurrentSpan().logEvent("根据id查找设备失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
@ -43,7 +43,7 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public Envelop<IotDeviceVO> delDevice(@RequestParam(value = "id", required = true) String id
            public MixEnvelop<IotDeviceVO, IotDeviceVO> delDevice(@RequestParam(value = "id", required = true) String id
            ) {
                tracer.getCurrentSpan().logEvent("删除设备失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
@ -51,14 +51,14 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public BaseEnvelop updDevice(@RequestParam String jsonData) {
            public Envelop updDevice(@RequestParam String jsonData) {
                tracer.getCurrentSpan().logEvent("修改设备失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop<ExistVO> isSnExist(@RequestParam(value = "sn", required = true) String sn
            public MixEnvelop<ExistVO, ExistVO> isSnExist(@RequestParam(value = "sn", required = true) String sn
            ) {
                tracer.getCurrentSpan().logEvent("sn码是否存在失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("sn:" + sn);
@ -66,7 +66,7 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public Envelop<ExistVO> isSimExist(@RequestParam(value = "sim", required = true) String sim
            public MixEnvelop<ExistVO, ExistVO> isSimExist(@RequestParam(value = "sim", required = true) String sim
            ) {
                tracer.getCurrentSpan().logEvent("sim卡号是否存在失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("sim:" + sim);
@ -74,8 +74,8 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public BaseEnvelop updSim(@RequestParam(value = "sim", required = true) String sim,
                                      @RequestParam(value = "id", required = true) String id) {
            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);
@ -83,13 +83,13 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public Envelop<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){
            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);
@ -102,7 +102,7 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public Envelop<ExistVO> isImportDevice(@ApiParam(name = "purcharseId", value = "purcharseId")
            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);
@ -110,16 +110,16 @@ public class IotDeviceFallbackFactory implements FallbackFactory<IotDeviceFeign>
            }
            @Override
            public Envelop<IotDeviceImportRecordVO> uploadStream(@RequestBody String jsonData) {
            public MixEnvelop<IotDeviceImportRecordVO, IotDeviceImportRecordVO> uploadStream(@RequestBody String jsonData) {
                tracer.getCurrentSpan().logEvent("设备导入失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
            }
            @Override
            public Envelop<IotDeviceImportRecordVO> queryImportRecordPage(@RequestParam(value = "purcharseId", required = true) String purcharseId,
                                                                               @RequestParam(value = "page", required = false) Integer page,
                                                                               @RequestParam(value = "size", required = false) Integer size){
            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);

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.device;
import com.yihu.jw.fegin.iot.device.IotDeviceOrderFeign;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -25,14 +25,14 @@ public class IotDeviceOrderFallbackFactory implements FallbackFactory<IotDeviceO
        return new IotDeviceOrderFeign() {
            @Override
            public Envelop<IotOrderVO> create(@RequestParam(value = "jsonData", required = true) String jsonData) {
            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 Envelop<IotDeviceOrderVO>  findByCode(@RequestParam(value = "id", required = true) String id
            public MixEnvelop<IotDeviceOrderVO, IotDeviceOrderVO> findByCode(@RequestParam(value = "id", required = true) String id
            ) {
                tracer.getCurrentSpan().logEvent("根据id查找设备订单失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
@ -40,10 +40,10 @@ public class IotDeviceOrderFallbackFactory implements FallbackFactory<IotDeviceO
            }
            @Override
            public Envelop<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){
            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);
@ -53,30 +53,30 @@ public class IotDeviceOrderFallbackFactory implements FallbackFactory<IotDeviceO
            }
            @Override
            public Envelop<IotDeviceOrderVO> delOrder(@RequestParam(value = "id", required = true) String id) {
            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 Envelop<IotOrderPurchaseVO> delPurchase(@RequestParam(value = "id", required = true) String id) {
            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 Envelop<IotOrderVO> updOrder(@RequestParam(value = "jsonData", required = false)String jsonData) {
            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 Envelop<IotOrderPurchaseVO> findPurcharsePage(@RequestParam(value = "orderId", required = true) String orderId,
                                                                 @RequestParam(value = "page", required = false) Integer page,
                                                                 @RequestParam(value = "size", required = false) Integer size){
            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);
@ -85,14 +85,14 @@ public class IotDeviceOrderFallbackFactory implements FallbackFactory<IotDeviceO
            }
            @Override
            public Envelop<IotOrderPurchaseVO>  findPurcharseById(@RequestParam(value = "id", required = true) String id) {
            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 Envelop<IotOrderPurchaseVO> findQualityPage(
            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,

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.device;
import com.yihu.jw.fegin.iot.device.IotDeviceQualityFeign;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -22,14 +22,14 @@ public class IotDeviceQualityFallbackFactory implements FallbackFactory<IotDevic
        return new IotDeviceQualityFeign() {
            @Override
            public Envelop<IotDeviceQualityInspectionPlanVO> create(@RequestParam(value = "jsonData", required = true) String jsonData) {
            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 Envelop<IotDeviceQualityInspectionPlanVO> findByCode(@RequestParam(value = "id", required = true) String id
            public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> findByCode(@RequestParam(value = "id", required = true) String id
            ) {
                tracer.getCurrentSpan().logEvent("查找质检计划失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
@ -37,7 +37,7 @@ public class IotDeviceQualityFallbackFactory implements FallbackFactory<IotDevic
            }
            @Override
            public Envelop<IotDeviceQualityInspectionPlanVO> queryQualityPlanPage(
            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,
@ -55,7 +55,7 @@ public class IotDeviceQualityFallbackFactory implements FallbackFactory<IotDevic
            }
            @Override
            public Envelop<IotDeviceQualityInspectionPlanVO> delQualityPlan(
            public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> delQualityPlan(
                    @RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("删除质检计划失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("id:" + id);
@ -63,7 +63,7 @@ public class IotDeviceQualityFallbackFactory implements FallbackFactory<IotDevic
            }
            @Override
            public Envelop<IotDeviceQualityInspectionPlanVO> completeQualityPlan(
            public MixEnvelop<IotDeviceQualityInspectionPlanVO, IotDeviceQualityInspectionPlanVO> completeQualityPlan(
                        @RequestParam(value = "actualTime", required = true) String actualTime,
                        @RequestParam(value = "id", required = true) String id) {
                tracer.getCurrentSpan().logEvent("完成质检计划失败:原因:" + e.getMessage());
@ -73,7 +73,7 @@ public class IotDeviceQualityFallbackFactory implements FallbackFactory<IotDevic
            }
            @Override
            public Envelop<IotDeviceQualityInspectionPlanVO> completePlanByPurchaseId(
            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());

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.device;
import com.yihu.jw.fegin.iot.device.IotPatientDeviceFeign;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -25,7 +25,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
        return new IotPatientDeviceFeign() {
            @Override
            public Envelop<IotPatientDeviceVO> create(
            public MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> create(
                    @RequestParam String jsonData) {
                tracer.getCurrentSpan().logEvent("设备绑定失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
@ -33,7 +33,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotPatientDeviceVO> findByDeviceSnAndUserType(
            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());
@ -43,7 +43,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotPatientDeviceVO> findByPatient(
            public MixEnvelop<IotPatientDeviceVO, IotPatientDeviceVO> findByPatient(
                    @RequestParam(value = "patient",required = true) String patient) {
                tracer.getCurrentSpan().logEvent("按居民code查找失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("patient:" + patient);
@ -51,7 +51,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotPatientDeviceVO> findByPatientAndDeviceSn(
            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());
@ -61,7 +61,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotDeviceVO> findListByPatient(
            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){
@ -73,7 +73,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotPatientDeviceVO> findByDeviceSnAndCategoryCode(
            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());
@ -83,7 +83,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotPatientDeviceVO> findByDeviceSnAndCategoryCodeAndUserType(
            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) {
@ -95,7 +95,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<IotPatientDeviceVO> updatePatientDevice(
            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,
@ -111,7 +111,7 @@ public class IotPatientDeviceFallbackFactory implements FallbackFactory<IotPatie
            }
            @Override
            public Envelop<LocationDataVO> findDeviceLocationsByIdCard(
            public MixEnvelop<LocationDataVO, LocationDataVO> findDeviceLocationsByIdCard(
                    @RequestParam(value = "jsonData",required = true) String jsonData) {
                tracer.getCurrentSpan().logEvent("查询设备地址失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.iot.product;
import com.yihu.jw.fegin.iot.product.IotProductFeign;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -25,7 +25,7 @@ public class IotProductFallbackFactory implements FallbackFactory<IotProductFeig
        return new IotProductFeign() {
            @Override
            public Envelop<IotProductBaseInfoVO> findCompanyPage(
            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,
@ -41,7 +41,7 @@ public class IotProductFallbackFactory implements FallbackFactory<IotProductFeig
            }
            @Override
            public Envelop<IotProductBaseInfoVO> 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,
@ -55,7 +55,7 @@ public class IotProductFallbackFactory implements FallbackFactory<IotProductFeig
            }
            @Override
            public Envelop<IotProductVO> addProduct(@RequestParam(value = "jsonData", required = false)String jsonData) {
            public MixEnvelop<IotProductVO, IotProductVO> addProduct(@RequestParam(value = "jsonData", required = false)String jsonData) {
                tracer.getCurrentSpan().logEvent("创建产品失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;
@ -63,28 +63,28 @@ public class IotProductFallbackFactory implements FallbackFactory<IotProductFeig
            @Override
            public Envelop<IotProductVO> findByCode(@RequestParam(value = "id", required = true) String id) {
            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 Envelop<IotMaintenanceUnitVO> getList(@RequestParam(value = "productId", required = true) String productId){
            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 Envelop<IotProductVO> delCompany(@RequestParam(value = "id", required = true) String id) {
            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 Envelop<IotProductVO> updCompany(@RequestParam(value = "jsonData", required = false)String jsonData) {
            public MixEnvelop<IotProductVO, IotProductVO> updCompany(@RequestParam(value = "jsonData", required = false)String jsonData) {
                tracer.getCurrentSpan().logEvent("修改产品信息失败:原因:" + e.getMessage());
                tracer.getCurrentSpan().logEvent("jsonData:" + jsonData);
                return null;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.agreement;
import com.yihu.jw.fegin.wlyy.agreement.WlyyAgreementFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
@ -17,32 +17,32 @@ public class WlyyAgreementFeignFallbackFactory implements FallbackFactory<WlyyAg
    public WlyyAgreementFeign create(Throwable throwable) {
        return new WlyyAgreementFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) {
            public MixEnvelop create(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop update(@RequestBody String jsonData) {
            public MixEnvelop update(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop delete(@RequestParam(value = "code") String code) {
            public MixEnvelop delete(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public Envelop findByCode(@RequestParam(value = "code") String code) {
            public MixEnvelop findByCode(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public Envelop queryPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts, @RequestParam(value = "size", required = false) int size, @RequestParam(value = "page", required = false) int page) {
            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 Envelop getList(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) {
            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;
            }
        };

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.agreement;
import com.yihu.jw.fegin.wlyy.agreement.WlyyAgreementKpiFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
@ -15,32 +15,32 @@ public class WlyyAgreementKpiFeignFallbackFactory implements FallbackFactory<Wly
    public WlyyAgreementKpiFeign create(Throwable throwable) {
        return new WlyyAgreementKpiFeign() {
            @Override
            public Envelop create(String jsonData) {
            public MixEnvelop create(String jsonData) {
                return null;
            }
            @Override
            public Envelop update(String jsonData) {
            public MixEnvelop update(String jsonData) {
                return null;
            }
            @Override
            public Envelop delete(String code) {
            public MixEnvelop delete(String code) {
                return null;
            }
            @Override
            public Envelop findByCode(String code) {
            public MixEnvelop findByCode(String code) {
                return null;
            }
            @Override
            public Envelop queryPage(String fields, String filters, String sorts, int size, int page) {
            public MixEnvelop queryPage(String fields, String filters, String sorts, int size, int page) {
                return null;
            }
            @Override
            public Envelop getList(String fields, String filters, String sorts) {
            public MixEnvelop getList(String fields, String filters, String sorts) {
                return null;
            }
        };

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.agreement;
import com.yihu.jw.fegin.wlyy.agreement.WlyyAgreementKpiLogFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
@ -15,22 +15,22 @@ public class WlyyAgreementKpiLogFeignFallbackFactory implements FallbackFactory<
    public WlyyAgreementKpiLogFeign create(Throwable throwable) {
        return new WlyyAgreementKpiLogFeign() {
            @Override
            public Envelop create(String jsonData) {
            public MixEnvelop create(String jsonData) {
                return null;
            }
            @Override
            public Envelop findByCode(String code) {
            public MixEnvelop findByCode(String code) {
                return null;
            }
            @Override
            public Envelop queryPage(String fields, String filters, String sorts, int size, int page) {
            public MixEnvelop queryPage(String fields, String filters, String sorts, int size, int page) {
                return null;
            }
            @Override
            public Envelop getList(String fields, String filters, String sorts) {
            public MixEnvelop getList(String fields, String filters, String sorts) {
                return null;
            }
        };

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.agreement;
import com.yihu.jw.fegin.wlyy.agreement.WlyySignFamilyFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
@ -17,27 +17,27 @@ public class WlyySignFamilyFeignFallbackFactory implements FallbackFactory<WlyyS
    public WlyySignFamilyFeign create(Throwable throwable) {
        return new WlyySignFamilyFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) {
            public MixEnvelop create(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop update(@RequestBody String jsonData) {
            public MixEnvelop update(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop findByCode(@RequestParam(value = "code") String code) {
            public MixEnvelop findByCode(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public Envelop queryPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts, @RequestParam(value = "size", required = false) int size, @RequestParam(value = "page", required = false) int page) {
            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 Envelop getList(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) {
            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;
            }
        };

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.fallbackfactory.wlyy.patient;
import com.yihu.jw.fegin.wlyy.patient.AdvertisementFeign;
import com.yihu.jw.restmodel.common.Envelop;
import com.yihu.jw.restmodel.web.MixEnvelop;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
@ -18,42 +18,42 @@ public class AdvertisementFeignFallbackFactory implements FallbackFactory<Advert
    public AdvertisementFeign create(Throwable throwable) {
        return new AdvertisementFeign() {
            @Override
            public Envelop create(@RequestBody String jsonData) {
            public MixEnvelop create(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop update(@RequestBody String jsonData) {
            public MixEnvelop update(@RequestBody String jsonData) {
                return null;
            }
            @Override
            public Envelop delete(@RequestParam(value = "code") String code) {
            public MixEnvelop delete(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public Envelop findByCode(@RequestParam(value = "code") String code) {
            public MixEnvelop findByCode(@RequestParam(value = "code") String code) {
                return null;
            }
            @Override
            public Envelop queryPage(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts, @RequestParam(value = "size", required = false) int size, @RequestParam(value = "page", required = false) int page) {
            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 Envelop getList(@RequestParam(value = "fields", required = false) String fields, @RequestParam(value = "filters", required = false) String filters, @RequestParam(value = "sorts", required = false) String sorts) {
            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 Envelop getListByPatientCode(@RequestParam(value = "patientCode") String patientCode) {
            public MixEnvelop getListByPatientCode(@RequestParam(value = "patientCode") String patientCode) {
                return null;
            }
            @Override
            public Envelop getListByIp(@RequestParam(value = "ipAddress") String ipAddress) {
            public MixEnvelop getListByIp(@RequestParam(value = "ipAddress") String ipAddress) {
                return null;
            }

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

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.common;
import com.yihu.jw.fegin.fallbackfactory.iot.common.IotFileUploadFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -23,16 +23,16 @@ import org.springframework.web.multipart.MultipartFile;
public interface IotFileUploadFeign {
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream_img)
    public Envelop<UploadVO> uploadImg(@RequestParam(value = "file", required = true) MultipartFile file);
    public MixEnvelop<UploadVO, UploadVO> uploadImg(@RequestParam(value = "file", required = true) MultipartFile file);
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream_attachment)
    public Envelop<UploadVO> uploadAttachment(@RequestParam(value = "file", required = true) MultipartFile file);
    public MixEnvelop<UploadVO, UploadVO> uploadAttachment(@RequestParam(value = "file", required = true) MultipartFile file);
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_stream)
    public Envelop<UploadVO> uploadStream(@RequestParam(value = "file", required = true) MultipartFile file);
    public MixEnvelop<UploadVO, UploadVO> uploadStream(@RequestParam(value = "file", required = true) MultipartFile file);
    @PostMapping(value = IotRequestMapping.FileUpload.api_upload_string)
    public Envelop<UploadVO> uploadImages(@RequestBody String jsonData) throws Exception;
    public MixEnvelop<UploadVO, UploadVO> uploadImages(@RequestBody String jsonData) throws Exception;
}

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

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.common;
import com.yihu.jw.fegin.fallbackfactory.iot.common.IotSystemDictFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -22,6 +22,6 @@ public interface IotSystemDictFeign {
    @GetMapping(value = IotRequestMapping.System.findDictByCode)
    public Envelop<IotSystemDictVO> getList(@RequestParam(value = "dictName", required = true) String dictName) throws Exception ;
    public MixEnvelop<IotSystemDictVO, IotSystemDictVO> getList(@RequestParam(value = "dictName", required = true) String dictName) throws Exception ;
}

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

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.company;
import com.yihu.jw.fegin.fallbackfactory.iot.company.IotCompanyFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -24,7 +24,7 @@ public interface IotCompanyFeign {
    @GetMapping(value = IotRequestMapping.Company.findCompanyPage)
    public Envelop<IotCompanyVO> 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,
@ -32,36 +32,36 @@ public interface IotCompanyFeign {
                                       @RequestParam(value = "size", required = false) Integer size);
    @PostMapping(value = IotRequestMapping.Company.addCompany)
    public Envelop<IotCompanyVO> addCompany(@RequestParam(value = "jsonData", required = true)String jsonData);
    public MixEnvelop<IotCompanyVO, IotCompanyVO> addCompany(@RequestParam(value = "jsonData", required = true)String jsonData);
    @GetMapping(value = IotRequestMapping.Company.findCompanyById)
    public Envelop<IotCompanyVO> findByCode(@RequestParam(value = "id", required = true) String id);
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findByCode(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.Company.findByBusinessLicense)
    public Envelop<IotCompanyVO> findByBusinessLicense(@RequestParam(value = "businessLicense", required = true) String businessLicense);
    public MixEnvelop<IotCompanyVO, IotCompanyVO> findByBusinessLicense(@RequestParam(value = "businessLicense", required = true) String businessLicense);
    @PostMapping(value = IotRequestMapping.Company.delCompany)
    public Envelop<IotCompanyVO> delCompany(@RequestParam(value = "id", required = true) String id);
    public MixEnvelop<IotCompanyVO, IotCompanyVO> delCompany(@RequestParam(value = "id", required = true) String id);
    @PostMapping(value = IotRequestMapping.Company.updCompany)
    public Envelop<IotCompanyVO> updCompany(@RequestParam(value = "jsonData", required = true)String jsonData);
    public MixEnvelop<IotCompanyVO, IotCompanyVO> updCompany(@RequestParam(value = "jsonData", required = true)String jsonData);
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertPage)
    public Envelop<IotCompanyCertificateVO> 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 Envelop<IotCompanyCertificateVO> findCompanyCertById(@RequestParam(value = "id", required = true) String id);
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertById(@RequestParam(value = "id", required = true) String id);
    @GetMapping(value = IotRequestMapping.Company.findCompanyCertByCompanyId)
    public Envelop<IotCompanyCertificateVO> findCompanyCertByCompanyId(@RequestParam(value = "companyId", required = true) String companyId);
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> findCompanyCertByCompanyId(@RequestParam(value = "companyId", required = true) String companyId);
    @PostMapping(value = IotRequestMapping.Company.addCompanyCert)
    public Envelop<IotCompanyCertificateVO> addCompanyCert(@RequestParam(value = "jsonData", required = true)String jsonData);
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> addCompanyCert(@RequestParam(value = "jsonData", required = true)String jsonData);
    @PostMapping(value = IotRequestMapping.Company.delCompanyCert)
    public Envelop<IotCompanyCertificateVO> delCompanyCert(@RequestParam(value = "id", required = true)String id);
    public MixEnvelop<IotCompanyCertificateVO, IotCompanyCertificateVO> delCompanyCert(@RequestParam(value = "id", required = true)String id);
}

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

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.iot.data_input;
import com.yihu.jw.fegin.fallbackfactory.iot.data_input.DataInputFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.restmodel.common.Envelop;
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;
@ -18,12 +18,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
public interface DataInputFeign {
    @PostMapping(value = DataRequestMapping.DataInput.api_user_bind, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop bindUser(@RequestBody String jsonData);
    MixEnvelop bindUser(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataInput.api_data_input, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop uploadData(@RequestBody String jsonData);
    MixEnvelop uploadData(@RequestBody String jsonData);
    @PostMapping(value = DataRequestMapping.DataInput.api_weRunData_input, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop uploadWeRunData(@RequestBody String jsonData);
    MixEnvelop uploadWeRunData(@RequestBody String jsonData);
}

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


Some files were not shown because too many files changed in this diff