chenweida 7 سال پیش
والد
کامیت
7650da6158
33فایلهای تغییر یافته به همراه169 افزوده شده و 201 حذف شده
  1. 8 8
      common/common-entity/src/main/java/com/yihu/jw/wlyy/agreement/WlyySignFamily.java
  2. 8 11
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java
  3. 1 3
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseSmsRequestMapping.java
  4. 14 18
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseVersionRequestMapping.java
  5. 20 23
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/wlyy/WlyyRequestMapping.java
  6. 10 11
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/wx/WechatRequestMapping.java
  7. 3 6
      svr/svr-base/src/main/java/com/yihu/jw/business/base/service/FunctionService.java
  8. 2 2
      svr/svr-base/src/main/java/com/yihu/jw/business/base/service/ModuleFunService.java
  9. 3 6
      svr/svr-base/src/main/java/com/yihu/jw/business/base/service/ModuleService.java
  10. 3 6
      svr/svr-base/src/main/java/com/yihu/jw/business/base/service/SaasService.java
  11. 3 6
      svr/svr-base/src/main/java/com/yihu/jw/business/sms/service/SmsGatewayService.java
  12. 1 4
      svr/svr-base/src/main/java/com/yihu/jw/business/wx/service/WechatService.java
  13. 3 3
      svr/svr-base/src/main/java/com/yihu/jw/business/wx/service/WxAccessTokenService.java
  14. 2 2
      svr/svr-base/src/main/java/com/yihu/jw/business/wx/service/WxGraphicMessageService.java
  15. 2 2
      svr/svr-base/src/main/java/com/yihu/jw/business/wx/service/WxMenuService.java
  16. 1 1
      svr/svr-base/src/main/java/com/yihu/jw/business/wx/service/WxTemplateService.java
  17. 7 7
      svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/controller/agreement/WlyyAgreementController.java
  18. 8 8
      svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/controller/agreement/WlyyAgreementKpiController.java
  19. 4 4
      svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/controller/agreement/WlyyAgreementKpiLogController.java
  20. 4 4
      svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/controller/agreement/WlyySignFamilyController.java
  21. 12 12
      svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/controller/patient/AdvertisementControlelr.java
  22. 2 2
      svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/dao/agreement/WlyySignFamilyDao.java
  23. 1 1
      svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/dao/patient/AdvertisementDao.java
  24. 6 6
      svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/service/agreement/WlyyAgreementKpiLogService.java
  25. 8 8
      svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/service/agreement/WlyyAgreementKpiService.java
  26. 4 4
      svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/service/agreement/WlyyAgreementService.java
  27. 6 6
      svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/service/agreement/WlyySignFamilyService.java
  28. 8 12
      svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/service/patient/AdvertisementService.java
  29. 3 3
      web-gateway/src/main/java/com/yihu/jw/feign/wlyy/agreement/WlyyAgreementFeign.java
  30. 3 3
      web-gateway/src/main/java/com/yihu/jw/feign/wlyy/agreement/WlyyAgreementKpiFeign.java
  31. 2 2
      web-gateway/src/main/java/com/yihu/jw/feign/wlyy/agreement/WlyyAgreementKpiLogFeign.java
  32. 2 2
      web-gateway/src/main/java/com/yihu/jw/feign/wlyy/agreement/WlyySignFamilyFeign.java
  33. 5 5
      web-gateway/src/main/java/com/yihu/jw/feign/wlyy/patient/AdvertisementFeign.java

+ 8 - 8
common/common-entity/src/main/java/com/yihu/jw/wlyy/agreement/WlyySignFamily.java

@ -61,7 +61,7 @@ public class WlyySignFamily extends IdEntityWithOperation {
    private String agentDoctorLevel;//代签的健康管理师
    private Integer adminTeamCode;//行政团队
    private Date expensesTime;//缴费时间
    private String agreementCode;//协议code
    private String agreementId;//协议code
    private String criticalPeopleMobile;//紧急联系人电话
    private String criticalPeople;//紧急联系人
@ -484,16 +484,16 @@ public class WlyySignFamily extends IdEntityWithOperation {
        this.expensesTime = expensesTime;
    }
    
    @Column(name = "agreement_code")
    public String getAgreementCode() {
        return agreementCode;
    }
    public void setAgreementCode(String agreementCode) {
        this.agreementCode = agreementCode;
    @Column(name = "agreement_id")
    public String getAgreementId() {
        return agreementId;
    }
    public void setAgreementId(String agreementId) {
        this.agreementId = agreementId;
    }
    
    @Column(name = "critical_people_mobile")
    public String getCriticalPeopleMobile() {

+ 8 - 11
common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java

@ -20,10 +20,9 @@ public class BaseRequestMapping {
        public static final String message_fail_name_exist="function name exist";
        public static final String message_fail_code_is_null="code is null";
        public static final String message_fail_name_is_null="function is null";
        public static final String message_fail_id_is_null="id is null";
        public static final String message_fail_code_no_exist="code no exist";
        public static final String message_fail_id_no_exist=" no exist";
        public static final String api_create="/function";
@ -34,7 +33,7 @@ public class BaseRequestMapping {
        public static final String api_getList="/function/list";
        public static final String api_assignFunction="/assignFunction";
        public static final String api_getModuleFunctions="/api_getModuleFunctions";
        public static final String api_getChildren="/function/children/{code}";
        public static final String api_getChildren="/function/children/{id}";
    }
    //模块常量
@ -48,20 +47,19 @@ public class BaseRequestMapping {
        public static final String message_fail_name_exist=" name exist";
        public static final String message_fail_code_is_null=" code is null";
        public static final String message_fail_name_is_null="name is null";
        public static final String message_fail_saasid_is_null="saasid is null";
        public static final String message_fail_id_is_null="id is null";
        public static final String message_fail_code_no_exist="code no exist";
        public static final String message_fail_id_no_exist="id no exist";
        public static final String api_create="/module";
        public static final String api_update="/module";
        public static final String api_delete="/module/{codes}";
        public static final String api_delete="/module/{ids}";
        public static final String api_getById="/module/{id}";
        public static final String api_getListNoPage="/module/listNoPage";
        public static final String api_getList="/module/list";
        public static final String api_getChildren="/module/children/{code}";
        public static final String api_getChildren="/module/children/{id}";
    }
@ -70,8 +68,8 @@ public class BaseRequestMapping {
        public static final String api_changeFun="/moduleFun/changeFun";
        public static final String moduleCode_is_null="moduleCode is null";
        public static final String funCodes_is_null="funCodes is null";
        public static final String moduleId_is_null="moduleId is null";
        public static final String funIds_is_null="funIds is null";
    }
    //saas常量
@ -84,10 +82,9 @@ public class BaseRequestMapping {
        public static final String message_fail_name_exist="saas name exist";
        public static final String message_fail_code_is_null="code is null";
        public static final String message_fail_name_is_null="name is null";
        public static final String message_fail_id_is_null="id is null";
        public static final String message_fail_code_no_exist="code no exist";
        public static final String message_fail_id_no_exist="id no exist";
        public static final String api_create="/saas";

+ 1 - 3
common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseSmsRequestMapping.java

@ -17,7 +17,6 @@ public class BaseSmsRequestMapping {
        public static final String message_fail_name_exist="sms name exist";
        public static final String message_fail_code_is_null="code is null";
        public static final String message_fail_name_is_null="sms is null";
        public static final String message_fail_id_is_null="id is null";
@ -40,12 +39,11 @@ public class BaseSmsRequestMapping {
        public static final String message_fail_name_exist="SmsGateway name exist";
        public static final String message_fail_code_is_null="code is null";
        public static final String message_fail_name_is_null="SmsGateway is null";
        public static final String message_fail_id_is_null="id is null";
        public static final String message_fail_code_no_exist="code no exist";
        public static final String message_fail_id_no_exist="id no exist";
        public static final String api_create="smsGateway";
        public static final String api_update="smsGateway";
        public static final String api_delete="smsGateway";

+ 14 - 18
common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseVersionRequestMapping.java

@ -16,15 +16,14 @@ public class BaseVersionRequestMapping {
        public static final String message_fail_name_exist = "ServerVersion name exist";
        public static final String message_fail_code_is_null = "code is null";
        public static final String message_fail_name_is_null = "ServerVersion is null";
        public static final String message_fail_id_is_null = "id is null";
        public static final String message_fail_code_no_exist = "code no exist";
        public static final String message_fail_id_no_exist = "id no exist";
        public static final String api_create = "/serverVersion";
        public static final String api_update = "/serverVersion";
        public static final String api_delete = "/serverVersion/{codes}";
        public static final String api_getByCode = "/serverVersion/{code}";
        public static final String api_delete = "/serverVersion/{ids}";
        public static final String api_getById = "/serverVersion/{id}";
        public static final String api_getList="/serverVersion/list";
        public static final String api_getListNoPage="/serverVersion/listNoPage";
@ -38,15 +37,14 @@ public class BaseVersionRequestMapping {
        public static final String message_success_delete = "ServerUrlVersion delete success";
        public static final String message_fail_name_exist = "ServerUrlVersion name exist";
        public static final String message_fail_code_is_null = "code is null";
        public static final String message_fail_name_is_null = "ServerUrlVersion is null";
        public static final String message_fail_id_is_null = "id is null";
        public static final String message_fail_code_no_exist = "code no exist";
        public static final String message_fail_id_no_exist = "id no exist";
        public static final String api_create = "/serverUrl";
        public static final String api_update = "/serverUrl";
        public static final String api_delete = "/serverUrl/{codes}";
        public static final String api_getByCode = "/serverUrl/{code}";
        public static final String api_delete = "/serverUrl/{ids}";
        public static final String api_getById = "/serverUrl/{id}";
        public static final String api_getList="/serverUrl/list";
        public static final String api_getListNoPage="/serverUrl/listNoPage";
@ -59,15 +57,14 @@ public class BaseVersionRequestMapping {
        public static final String message_success_find_BaseServerVersionLog = "BaseServerVersionLog find success";
        public static final String message_success_delete = "BaseServerVersionLog delete success";
        public static final String message_fail_code_is_null = "code is null";
        public static final String message_fail_name_is_null = "ServerVersion is null";
        public static final String message_fail_id_is_null = "id is null";
        public static final String message_fail_code_no_exist = "code no exist";
        public static final String message_fail_id_no_exist = "id no exist";
        public static final String api_create = "/serverVersionLog";
        public static final String api_update = "/serverVersionLog";
        public static final String api_delete = "/serverVersionLog/{codes}";
        public static final String api_getByCode = "/serverVersionLog/{code}";
        public static final String api_delete = "/serverVersionLog/{ids}";
        public static final String api_getById = "/serverVersionLog/{id}";
        public static final String api_getList="/serverVersionLog/list";
        public static final String api_getListNoPage="/serverVersionLog/listNoPage";
@ -83,15 +80,14 @@ public class BaseVersionRequestMapping {
        public static final String message_fail_name_exist = "WlyyVersion name exist";
        public static final String message_fail_code_is_null = "code is null";
        public static final String message_fail_name_is_null = "ServerVersion is null";
        public static final String message_fail_id_is_null = "id is null";
        public static final String message_fail_code_no_exist = "code no exist";
        public static final String message_fail_id_no_exist = "id no exist";
        public static final String api_create = "/wlyyVersion";
        public static final String api_update = "/wlyyVersion";
        public static final String api_delete = "/wlyyVersion/{codes}";
        public static final String api_getByCode = "/wlyyVersion/{code}";
        public static final String api_delete = "/wlyyVersion/{ids}";
        public static final String api_getById = "/wlyyVersion/{id}";
        public static final String api_getList="/wlyyVersion/list";
        public static final String api_getListNoPage="/wlyyVersion/listNoPage";
@ -100,8 +96,8 @@ public class BaseVersionRequestMapping {
    public class UserUrlVersion {
        public static final String api_create = "/userUrlVersion";
        public static final String api_update = "/userUrlVersion";
        public static final String api_delete = "/userUrlVersion/{codes}";
        public static final String api_getByCode = "/userUrlVersion/{code}";
        public static final String api_delete = "/userUrlVersion/{ids}";
        public static final String api_getById = "/userUrlVersion/{id}";
        public static final String api_getList="/userUrlVersion/list";
        public static final String api_getListNoPage="/userUrlVersion/listNoPage";
        public static final String api_changeUserVersion="/userUrlVersion/userVersion";

+ 20 - 23
common/common-request-mapping/src/main/java/com/yihu/jw/rm/wlyy/WlyyRequestMapping.java

@ -11,7 +11,7 @@ public class WlyyRequestMapping {
    public static class Agreement {
        public static final String api_create = "agreement";
        public static final String api_delete = "agreement";
        public static final String api_getByCode = "getAgreementByCode";
        public static final String api_getById = "getAgreementById";
        public static final String api_update = "agreement";
        public static final String api_queryPage = "queryAgreementPage";
        public static final String api_getList = "getAgreementList";
@ -22,14 +22,13 @@ public class WlyyRequestMapping {
        public static final String message_success_create = "agreement create success";
        public static final String message_success_find_functions = "agreement find success";
        public static final String message_fail_code_is_null = "code is null";
        public static final String message_fail_name_is_null = "name is null";
        public static final String message_fail_price_is_null = "price is null";
        public static final String message_fail_wlyyAgreement_is_no_exist = "wlyyAgreement is no exist";
        public static final String message_fail_code_no_exist = "code no exist";
        public static final String message_fail_id_no_exist = "id no exist";
        public static final String message_fail_status_is_null = "status is null";
        public static final String message_fail_id_is_null = "id is null";
        public static final String message_fail_code_exist = "code exist";
        public static final String message_fail_id_exist = "id exist";
        public static final String message_fail_saasId_is_null = "saasId is null";
    }
@ -37,22 +36,22 @@ public class WlyyRequestMapping {
    public static class AgreementKpi {
        public static final String api_create = "agreementKpi";
        public static final String api_delete = "agreementKpi";
        public static final String api_getByCode = "getaAreementKpiByCode";
        public static final String api_getById = "getaAreementKpiById";
        public static final String api_update = "agreementKpi";
        public static final String api_queryPage = "queryAgreementKpiPage";
        public static final String api_getList = "getAagreementKpiList";
        public static final String message_fail_code_is_null = "code is null";
        public static final String message_fail_id_is_null = "id is null";
        public static final String message_fail_name_is_null = "name is null";
        public static final String message_fail_code_no_exist = "code no exist";
        public static final String message_fail_id_no_exist = "id no exist";
        public static final String message_fail_wlyyAgreementKpi_is_no_exist = "wlyyAgreementKpi is no exist";
        public static final String message_fail_status_is_null = "status is null";
        public static final String message_fail_kpiName_is_null = "kpiName is null";
        public static final String message_fail_type_is_null = "type is null";
        public static final String message_fail_patientCode_is_null = "patientCode is null";
        public static final String message_fail_signCode_is_null = "signCode is null";
        public static final String message_fail_kpiCode_is_null = "kpiCode is null";
        public static final String message_fail_agreementCode_is_null = "agreementCode is null";
        public static final String message_fail_patientId_is_null = "patientId is null";
        public static final String message_fail_signId_is_null = "signId is null";
        public static final String message_fail_kpiId_is_null = "kpiId is null";
        public static final String message_fail_agreementId_is_null = "agreementId is null";
        public static final String message_fail_agreement_is_null = "agreement is null";
        public static final String message_success_update = "agreementKpi update success";
@ -66,14 +65,14 @@ public class WlyyRequestMapping {
    public static class AgreementKpiLog {
        public static final String api_create = "agreementKpiLog";
        public static final String api_delete = "agreementKpiLog";
        public static final String api_getByCode = "getAgreementKpiLogByCode";
        public static final String api_getById = "getAgreementKpiLogById";
        public static final String api_update = "agreementKpiLog";
        public static final String api_queryPage = "queryAgreementKpiLogPage";
        public static final String api_getList = "getAgreementKpiLogList";
        public static final String message_fail_code_is_null = "code is null";
        public static final String message_fail_id_is_null = "id is null";
        public static final String message_fail_name_is_null = "name is null";
        public static final String message_fail_code_no_exist = "code no exist";
        public static final String message_fail_id_no_exist = "id no exist";
        public static final String message_success_update = "agreementKpiLog update success";
        public static final String message_success_delete = "agreementKpiLog delete success";
@ -86,14 +85,13 @@ public class WlyyRequestMapping {
    public static class SignFamily {
        public static final String api_create = "signFamily";
        public static final String api_delete = "signFamily";
        public static final String api_getByCode = "getSignFamilyByCode";
        public static final String api_getById = "getSignFamilyById";
        public static final String api_update = "signFamily";
        public static final String api_queryPage = "querySignFamilyPage";
        public static final String api_getList = "getSignFamilyList";
        public static final String message_fail_code_is_null = "code is null";
        public static final String message_fail_name_is_null = "name is null";
        public static final String message_fail_code_no_exist = "code no exist";
        public static final String message_fail_id_no_exist = "id no exist";
        public static final String message_fail_status_is_null = "status is null";
        public static final String message_fail_id_is_null = "id is null";
        public static final String message_fail_type_is_null = "type is null";
@ -103,7 +101,7 @@ public class WlyyRequestMapping {
        public static final String message_fail_hospitalName_is_null = "hospitalName is null";
        public static final String message_fail_expense_is_null = "expense is null";
        public static final String message_fail_expenseStatus_is_null = "expenseStatus is null";
        public static final String message_fail_agreementCode_is_null = "agreementCode is null";
        public static final String message_fail_agreementId_is_null = "agreementId is null";
        public static final String message_success_update = "signFamily update success";
        public static final String message_success_delete = "signFamily delete success";
@ -120,11 +118,11 @@ public class WlyyRequestMapping {
        public static final String api_common = "advertisement";
        public static final String api_create = "create";
        public static final String api_delete = "delete";
        public static final String api_getByCode = "getByCode";
        public static final String api_getById = "getById";
        public static final String api_update = "update";
        public static final String api_queryPage = "queryPage";
        public static final String api_getList = "getList";
        public static final String api_getListByPatientCode = "getListByPatientCode";
        public static final String api_getListByPatientId = "getListByPatientId";
        public static final String api_getListByHttp = "getListByHttp";
        public static final String api_getListByIp = "getListByIp";
@ -134,12 +132,11 @@ public class WlyyRequestMapping {
        public static final String message_success_create = "advertisement create success";
        public static final String message_success_find_functions = "advertisement find success";
        public static final String message_fail_code_is_null = "code is null";
        public static final String message_fail_name_is_null = "name is null";
        public static final String message_fail_code_no_exist = "code no exist";
        public static final String message_fail_id_no_exist = "id no exist";
        public static final String message_fail_status_is_null = "status is null";
        public static final String message_fail_id_is_null = "id is null";
        public static final String message_fail_code_exist = "code exist";
        public static final String message_fail_id_exist = "id exist";
        public static final String message_fail_saasid_is_null = "saasid is null";
        public static final String message_fail_picture_is_null = "picture is null";
        public static final String message_fail_wlyyAdvertisement_is_not_exist = "WlyyAdvertisement is not exist";

+ 10 - 11
common/common-request-mapping/src/main/java/com/yihu/jw/rm/wx/WechatRequestMapping.java

@ -30,7 +30,7 @@ public class WechatRequestMapping {
        public static final String api_createMenu="/createMenu";
        public static final String api_getChildMenus="/childMenu/list/{parentId}";
        public static final String message_fail_code_is_null="id is null";
        public static final String message_fail_id_is_null="id is null";
        public static final String message_fail_name_is_null="name is null";
        public static final String message_fail_type_is_null="type is null";
        public static final String message_fail_key_is_null="key is null";
@ -41,8 +41,8 @@ public class WechatRequestMapping {
        public static final String message_fail_url_is_toLong="url is to long";
        public static final String message_fail_sort_is_null="sort is null";
        public static final String message_fail_sort_is_repeat="sort is repeat";
        public static final String message_fail_code_no_exist="id no exist";
        public static final String message_fail_supMenuCode_is_no_exist="supMenuId is no exist";
        public static final String message_fail_id_no_exist="id no exist";
        public static final String message_fail_supMenuId_is_no_exist="supMenuId is no exist";
        public static final String message_fail_mediaId_is_null="mediaId is null";
        public static final String message_fail_childMenu_is_to_much="childMenu is to much";//子菜单数目过多
        public static final String message_fail_parentMenu_is_to_much="parentMenu is to much";//子菜单数目过多
@ -73,9 +73,9 @@ public class WechatRequestMapping {
        public static final String message_success_find_functions="wxTemplate find success";
        public static final String message_success_delete="wxTemplate delete success";
        public static final String message_fail_code_is_null="id is null";
        public static final String message_fail_code_no_exist="id no exist";
        public static final String message_fail_wechatCode_is_null="wechatId is null";
        public static final String message_fail_id_is_null="id is null";
        public static final String message_fail_id_no_exist="id no exist";
        public static final String message_fail_wechatId_is_null="wechatId is null";
        public static final String message_fail_templateid_is_null="templateid is null";
        public static final String message_fail_content_is_null="content is null";
        public static final String message_fail_content_format_is_not_right="content format is not right";
@ -97,8 +97,7 @@ public class WechatRequestMapping {
        public static final String message_success_find_functions="wechat find success";
        public static final String message_success_delete="wechat delete success";
        public static final String message_fail_code_is_null="id is null";
        public static final String message_fail_code_no_exist="id not exist";
        public static final String message_fail_id_no_exist="id not exist";
        public static final String message_fail_appSecret_is_null="appSecret is null";
        public static final String message_fail_appId_exist="wechat appId exist";
        public static final String message_fail_status_is_null="status is null";
@ -125,9 +124,9 @@ public class WechatRequestMapping {
        public static final String message_success_find_functions="wxGraphicMessage find success";
        public static final String message_success_delete="wxGraphicMessage delete success";
        public static final String message_fail_code_is_null="id is null";
        public static final String message_fail_code_no_exist="id not exist";
        public static final String message_fail_code_exist="id exist";
        public static final String message_fail_id_is_null="id is null";
        public static final String message_fail_id_no_exist="id not exist";
        public static final String message_fail_id_exist="id exist";
        public static final String message_fail_status_is_null="status is null";
        public static final String message_fail_title_is_null="title is null";
        public static final String message_fail_wxGraphicMessage_is_no_exist="wxGraphicMessage is not exist";

+ 3 - 6
svr/svr-base/src/main/java/com/yihu/jw/business/base/service/FunctionService.java

@ -37,7 +37,7 @@ public class FunctionService extends BaseJpaService<Function, FunctionDao> {
    @Transactional
    public Function createFunction(Function function) throws ApiException {
        if (StringUtils.isEmpty(function.getId())) {
            throw new ApiException(BaseRequestMapping.Function.message_fail_code_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseRequestMapping.Function.message_fail_id_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(function.getName())) {
            throw new ApiException(BaseRequestMapping.Function.message_fail_name_is_null, ExceptionCode.common_error_params_code);
@ -51,9 +51,6 @@ public class FunctionService extends BaseJpaService<Function, FunctionDao> {
    @Transactional
    public Function updateFunction(Function function) {
        if (StringUtils.isEmpty(function.getId())) {
            throw new ApiException(BaseRequestMapping.Function.message_fail_code_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(function.getName())) {
            throw new ApiException(BaseRequestMapping.Function.message_fail_name_is_null, ExceptionCode.common_error_params_code);
        }
@ -70,7 +67,7 @@ public class FunctionService extends BaseJpaService<Function, FunctionDao> {
    public Function findById(String id) {
        Function function = functionDao.findById(id);
        if (function == null) {
            throw new ApiException(BaseRequestMapping.Function.message_fail_code_no_exist, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseRequestMapping.Function.message_fail_id_no_exist, ExceptionCode.common_error_params_code);
        }
        return function;
    }
@ -79,7 +76,7 @@ public class FunctionService extends BaseJpaService<Function, FunctionDao> {
    public void deleteFunction(String id) {
        Function function = functionDao.findById(id);
        if (function == null) {
            throw new ApiException(BaseRequestMapping.Function.message_fail_code_no_exist, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseRequestMapping.Function.message_fail_id_no_exist, ExceptionCode.common_error_params_code);
        }
        function.setStatus(-1);
        functionDao.save(function);

+ 2 - 2
svr/svr-base/src/main/java/com/yihu/jw/business/base/service/ModuleFunService.java

@ -46,11 +46,11 @@ public class ModuleFunService extends BaseJpaService<ModuleFunction, ModuleFunct
    public void changeFun(String jsonData) {
        JSONObject jsonObject =  new JSONObject(jsonData);
        if(!jsonObject.has("moduleCode")){
            throw new ApiException(BaseRequestMapping.ModuleFun.moduleCode_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseRequestMapping.ModuleFun.moduleId_is_null, ExceptionCode.common_error_params_code);
            //filterStr+="saasId="+jsonObject.get("saasId")+";";
        }
        if(!jsonObject.has("funCodes")){
            throw new ApiException(BaseRequestMapping.ModuleFun.funCodes_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseRequestMapping.ModuleFun.funIds_is_null, ExceptionCode.common_error_params_code);
        }
        String moduleCode = jsonObject.get("moduleCode").toString();//模块code
        String funCodes = jsonObject.get("funCodes").toString();//功能code,多个code  ","  分隔

+ 3 - 6
svr/svr-base/src/main/java/com/yihu/jw/business/base/service/ModuleService.java

@ -36,7 +36,7 @@ public class ModuleService extends BaseJpaService<Module, ModuleDao> {
    @Transactional
    public Module createModule(Module module) throws ApiException {
        if (StringUtils.isEmpty(module.getId())) {
            throw new ApiException(BaseRequestMapping.Module.message_fail_code_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseRequestMapping.Module.message_fail_id_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(module.getName())) {
            throw new ApiException(BaseRequestMapping.Module.message_fail_name_is_null, ExceptionCode.common_error_params_code);
@ -53,9 +53,6 @@ public class ModuleService extends BaseJpaService<Module, ModuleDao> {
    @Transactional
    public Module updateModule(Module module) {
        if (StringUtils.isEmpty(module.getId())) {
            throw new ApiException(BaseRequestMapping.Module.message_fail_code_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(module.getName())) {
            throw new ApiException(BaseRequestMapping.Module.message_fail_name_is_null, ExceptionCode.common_error_params_code);
        }
@ -72,7 +69,7 @@ public class ModuleService extends BaseJpaService<Module, ModuleDao> {
    public Module findById(String Id) {
        Module module = moduleDao.findById(Id);
        if (module == null) {
            throw new ApiException(BaseRequestMapping.Module.message_fail_code_no_exist, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseRequestMapping.Module.message_fail_id_no_exist, ExceptionCode.common_error_params_code);
        }
        return module;
    }
@ -81,7 +78,7 @@ public class ModuleService extends BaseJpaService<Module, ModuleDao> {
    public void deleteModule(String Id) {
        Module module = moduleDao.findById(Id);
        if (module == null) {
            throw new ApiException(BaseRequestMapping.Module.message_fail_code_no_exist, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseRequestMapping.Module.message_fail_id_no_exist, ExceptionCode.common_error_params_code);
        }
        module.setStatus(-1);
    }

+ 3 - 6
svr/svr-base/src/main/java/com/yihu/jw/business/base/service/SaasService.java

@ -22,7 +22,7 @@ public class SaasService extends BaseJpaService<Saas, SaasDao> {
    @Transactional
    public Saas createSaas(Saas saas) throws ApiException {
        if (StringUtils.isEmpty(saas.getId())) {
            throw new ApiException(BaseRequestMapping.Saas.message_fail_code_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseRequestMapping.Saas.message_fail_id_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(saas.getName())) {
            throw new ApiException(BaseRequestMapping.Saas.message_fail_name_is_null, ExceptionCode.common_error_params_code);
@ -36,9 +36,6 @@ public class SaasService extends BaseJpaService<Saas, SaasDao> {
    @Transactional
    public Saas updateSaas(Saas saas) {
        if (StringUtils.isEmpty(saas.getId())) {
            throw new ApiException(BaseRequestMapping.Saas.message_fail_code_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(saas.getName())) {
            throw new ApiException(BaseRequestMapping.Saas.message_fail_name_is_null, ExceptionCode.common_error_params_code);
        }
@ -55,7 +52,7 @@ public class SaasService extends BaseJpaService<Saas, SaasDao> {
    public Saas findById(String id) {
        Saas saas = saasDao.findById(id);
        if (saas == null) {
            throw new ApiException(BaseRequestMapping.Saas.message_fail_code_no_exist, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseRequestMapping.Saas.message_fail_id_no_exist, ExceptionCode.common_error_params_code);
        }
        return saas;
    }
@ -64,7 +61,7 @@ public class SaasService extends BaseJpaService<Saas, SaasDao> {
    public void deleteSaas(String id) {
        Saas saas = saasDao.findById(id);
        if (saas == null) {
            throw new ApiException(BaseRequestMapping.Saas.message_fail_code_no_exist, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseRequestMapping.Saas.message_fail_id_no_exist, ExceptionCode.common_error_params_code);
        }
        saas.setStatus(-1);
    }

+ 3 - 6
svr/svr-base/src/main/java/com/yihu/jw/business/sms/service/SmsGatewayService.java

@ -22,7 +22,7 @@ public class SmsGatewayService extends BaseJpaService<BaseSmsGateway, SmsGateway
    @Transactional
    public BaseSmsGateway createSmsGateway(BaseSmsGateway smsGateway) throws ApiException {
        if (StringUtils.isEmpty(smsGateway.getId())) {
            throw new ApiException(BaseSmsRequestMapping.SmsGateway.message_fail_code_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseSmsRequestMapping.SmsGateway.message_fail_id_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(smsGateway.getName())) {
            throw new ApiException(BaseSmsRequestMapping.SmsGateway.message_fail_name_is_null, ExceptionCode.common_error_params_code);
@ -36,9 +36,6 @@ public class SmsGatewayService extends BaseJpaService<BaseSmsGateway, SmsGateway
    @Transactional
    public BaseSmsGateway updateSmsGateway(BaseSmsGateway smsGateway) {
        if (StringUtils.isEmpty(smsGateway.getId())) {
            throw new ApiException(BaseSmsRequestMapping.SmsGateway.message_fail_code_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(smsGateway.getName())) {
            throw new ApiException(BaseSmsRequestMapping.SmsGateway.message_fail_name_is_null, ExceptionCode.common_error_params_code);
        }
@ -55,7 +52,7 @@ public class SmsGatewayService extends BaseJpaService<BaseSmsGateway, SmsGateway
    public BaseSmsGateway findById(String id) {
        BaseSmsGateway smsGateway = smsGatewayDao.findById(id);
        if (smsGateway == null) {
            throw new ApiException(BaseSmsRequestMapping.SmsGateway.message_fail_code_no_exist, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseSmsRequestMapping.SmsGateway.message_fail_id_no_exist, ExceptionCode.common_error_params_code);
        }
        return smsGateway;
    }
@ -64,7 +61,7 @@ public class SmsGatewayService extends BaseJpaService<BaseSmsGateway, SmsGateway
    public void deleteSmsGateway(String id) {
        BaseSmsGateway smsGateway = smsGatewayDao.findById(id);
        if (smsGateway == null) {
            throw new ApiException(BaseSmsRequestMapping.SmsGateway.message_fail_code_no_exist, ExceptionCode.common_error_params_code);
            throw new ApiException(BaseSmsRequestMapping.SmsGateway.message_fail_id_no_exist, ExceptionCode.common_error_params_code);
        }
        smsGateway.setStatus(-1);
    }

+ 1 - 4
svr/svr-base/src/main/java/com/yihu/jw/business/wx/service/WechatService.java

@ -47,9 +47,6 @@ public class WechatService extends BaseJpaService<WxWechat, WechatDao> {
    @Transient
    public WxWechat updateWxchat(WxWechat wechat) {
        if (StringUtils.isEmpty(wechat.getId())) {
            throw new ApiException(WechatRequestMapping.WxConfig.message_fail_code_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(wechat.getSaasId())) {
            throw new ApiException(WechatRequestMapping.WxConfig.message_fail_saasId_is_null, ExceptionCode.common_error_params_code);
        }
@ -85,7 +82,7 @@ public class WechatService extends BaseJpaService<WxWechat, WechatDao> {
            for (String code : codeArray) {
                WxWechat wxWechat = wechatDao.findById(code);
                if (wxWechat == null) {
                    throw new ApiException(WechatRequestMapping.WxConfig.message_fail_code_no_exist, ExceptionCode.common_error_params_code);
                    throw new ApiException(WechatRequestMapping.WxConfig.message_fail_id_no_exist, ExceptionCode.common_error_params_code);
                }
                wxWechat.setStatus(-1);
                wxWechat.setUpdateUser(userId);

+ 3 - 3
svr/svr-base/src/main/java/com/yihu/jw/business/wx/service/WxAccessTokenService.java

@ -45,7 +45,7 @@ public class WxAccessTokenService extends BaseJpaService<WxAccessToken, WxAccess
            //根据wechatCode查找出appid和appSecret
            WxWechat wxWechat = wechatDao.findById(wechatId);
            if(wxWechat==null){
                throw new ApiException(WechatRequestMapping.WxConfig.message_fail_wxWechat_is_no_exist, ExceptionCode.common_error_params_code);
                throw new ApiException(WechatRequestMapping.WxConfig.message_fail_wxWechat_is_no_exist, ExceptionCode.common_error_params_id);
            }
            List<WxAccessToken> wxAccessTokens =  wxAccessTokenDao.getWxAccessTokenById(wechatId);
            if(wxAccessTokens!=null&&wxAccessTokens.size()>0){
@ -64,10 +64,10 @@ public class WxAccessTokenService extends BaseJpaService<WxAccessToken, WxAccess
            appId = wxWechat.getAppId();
            appSecret = wxWechat.getAppSecret();
            if (StringUtils.isEmpty(appId)){
                throw new ApiException(WechatRequestMapping.WxConfig.message_fail_appId_is_null, ExceptionCode.common_error_params_code);
                throw new ApiException(WechatRequestMapping.WxConfig.message_fail_appId_is_null, ExceptionCode.common_error_params_id);
            }
            if (StringUtils.isEmpty(appSecret)){
                throw new ApiException(WechatRequestMapping.WxConfig.message_fail_appSecret_is_null, ExceptionCode.common_error_params_code);
                throw new ApiException(WechatRequestMapping.WxConfig.message_fail_appSecret_is_null, ExceptionCode.common_error_params_id);
            }
            String params = "grant_type=client_credential&appid=" + appId + "&secret=" + appSecret;
            String result = HttpUtil.sendGet(token_url, params);

+ 2 - 2
svr/svr-base/src/main/java/com/yihu/jw/business/wx/service/WxGraphicMessageService.java

@ -36,7 +36,7 @@ public class WxGraphicMessageService extends BaseJpaService<WxGraphicMessage, Wx
        }
        WxGraphicMessage wxGraphicMessageTem = wxGraphicMessageDao.findById(wxGraphicMessage.getId());
        if (wxGraphicMessageTem != null) {
            throw new ApiException(WechatRequestMapping.WxGraphicMessage.message_fail_code_exist, ExceptionCode.common_error_params_code);
            throw new ApiException(WechatRequestMapping.WxGraphicMessage.message_fail_id_exist, ExceptionCode.common_error_params_code);
        }
        return wxGraphicMessageDao.save(wxGraphicMessage);
    }
@ -44,7 +44,7 @@ public class WxGraphicMessageService extends BaseJpaService<WxGraphicMessage, Wx
    @Transient
    public WxGraphicMessage updateWxGraphicMessage(WxGraphicMessage wxGraphicMessage) {
        if (StringUtils.isEmpty(wxGraphicMessage.getId())) {
            throw new ApiException(WechatRequestMapping.WxGraphicMessage.message_fail_code_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(WechatRequestMapping.WxGraphicMessage.message_fail_id_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(wxGraphicMessage.getStatus())) {
            throw new ApiException(WechatRequestMapping.WxGraphicMessage.message_fail_status_is_null, ExceptionCode.common_error_params_code);

+ 2 - 2
svr/svr-base/src/main/java/com/yihu/jw/business/wx/service/WxMenuService.java

@ -56,7 +56,7 @@ public class WxMenuService extends BaseJpaService<WxMenu, WxMenuDao> {
    @Transient
    public WxMenu updateWxMenu(WxMenu wxMenu) {
        if (StringUtils.isEmpty(wxMenu.getId())) {
            throw new ApiException(WechatRequestMapping.WxMenu.message_fail_code_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(WechatRequestMapping.WxMenu.message_fail_id_is_null, ExceptionCode.common_error_params_code);
        }
        if(canSaveOrUpata(wxMenu)){
            WxMenu wxMenu1 = findById(wxMenu.getId());
@ -270,7 +270,7 @@ public class WxMenuService extends BaseJpaService<WxMenu, WxMenuDao> {
            //判断父菜单是否存在
            WxMenu parentMenuCode = findById(supMenucode);
            if(parentMenuCode==null){
                throw new ApiException(WechatRequestMapping.WxMenu.message_fail_supMenuCode_is_no_exist, ExceptionCode.common_error_params_code);
                throw new ApiException(WechatRequestMapping.WxMenu.message_fail_supMenuId_is_no_exist, ExceptionCode.common_error_params_code);
            }
            //查询已经存在的子菜单条数

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/business/wx/service/WxTemplateService.java

@ -79,7 +79,7 @@ public class WxTemplateService extends BaseJpaService<WxTemplate, WxTemplateDao>
            for (String code : codeArray) {
                WxTemplate wxTemplate = wxTemplateDao.findById(code);
                if (wxTemplate == null) {
                    throw new ApiException(WechatRequestMapping.WxTemplate.message_fail_code_no_exist, ExceptionCode.common_error_params_code);
                    throw new ApiException(WechatRequestMapping.WxTemplate.message_fail_id_no_exist, ExceptionCode.common_error_params_code);
                }
                wxTemplate.setStatus(-1);
                wxTemplate.setUpdateUser(userCode);

+ 7 - 7
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/controller/agreement/WlyyAgreementController.java

@ -56,24 +56,24 @@ public class WlyyAgreementController extends EnvelopRestController {
    @DeleteMapping(value = WlyyRequestMapping.Agreement.api_delete)
    @ApiOperation(value = "删除协议", notes = "删除协议")
    public Envelop delete(
            @ApiParam(name = "code", value = "code")
            @RequestParam(value = "code", required = true) String code) {
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id) {
        try {
            wlyyAgreementService.delete(code);
            wlyyAgreementService.delete(id);
            return Envelop.getSuccess(WlyyRequestMapping.Agreement.message_success_delete );
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }
    }
    @GetMapping(value = WlyyRequestMapping.Agreement.api_getByCode)
    @GetMapping(value = WlyyRequestMapping.Agreement.api_getById)
    @ApiOperation(value = "根据code查找协议", notes = "根据code查找协议")
    public Envelop findByCode(
            @ApiParam(name = "code", value = "code")
            @RequestParam(value = "code", required = true) String code
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id
    ) {
        try {
            return Envelop.getSuccess(WlyyRequestMapping.Agreement.message_success_find, wlyyAgreementService.findByCode(code));
            return Envelop.getSuccess(WlyyRequestMapping.Agreement.message_success_find, wlyyAgreementService.findById(id));
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }

+ 8 - 8
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/controller/agreement/WlyyAgreementKpiController.java

@ -56,24 +56,24 @@ public class WlyyAgreementKpiController extends EnvelopRestController {
    @DeleteMapping(value = WlyyRequestMapping.AgreementKpi.api_delete)
    @ApiOperation(value = "删除套餐指标", notes = "删除套餐指标")
    public Envelop delete(
            @ApiParam(name = "code", value = "code")
            @RequestParam(value = "code", required = true) String code) {
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id) {
        try {
            wlyyAgreementKpiService.delete(code);
            wlyyAgreementKpiService.delete(id);
            return Envelop.getSuccess(WlyyRequestMapping.AgreementKpi.message_success_delete );
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }
    }
    @GetMapping(value = WlyyRequestMapping.AgreementKpi.api_getByCode)
    @ApiOperation(value = "根据code查找套餐指标", notes = "根据code查找套餐指标")
    @GetMapping(value = WlyyRequestMapping.AgreementKpi.api_getById)
    @ApiOperation(value = "根据id查找套餐指标", notes = "根据id查找套餐指标")
    public Envelop findByCode(
            @ApiParam(name = "code", value = "code")
            @RequestParam(value = "code", required = true) String code
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id
    ) {
        try {
            return Envelop.getSuccess(WlyyRequestMapping.AgreementKpi.message_success_find, wlyyAgreementKpiService.findByCode(code));
            return Envelop.getSuccess(WlyyRequestMapping.AgreementKpi.message_success_find, wlyyAgreementKpiService.findById(id));
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }

+ 4 - 4
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/controller/agreement/WlyyAgreementKpiLogController.java

@ -39,14 +39,14 @@ public class WlyyAgreementKpiLogController extends EnvelopRestController {
        }
    }
    @GetMapping(value = WlyyRequestMapping.AgreementKpiLog.api_getByCode)
    @GetMapping(value = WlyyRequestMapping.AgreementKpiLog.api_getById)
    @ApiOperation(value = "根据code查找套餐指标日志", notes = "根据code查找套餐指标日志")
    public Envelop findByCode(
            @ApiParam(name = "code", value = "code")
            @RequestParam(value = "code", required = true) String code
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id
    ) {
        try {
            return Envelop.getSuccess(WlyyRequestMapping.AgreementKpiLog.message_success_find, wlyyAgreementKpiLogService.findByCode(code));
            return Envelop.getSuccess(WlyyRequestMapping.AgreementKpiLog.message_success_find, wlyyAgreementKpiLogService.findById(id));
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }

+ 4 - 4
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/controller/agreement/WlyySignFamilyController.java

@ -53,14 +53,14 @@ public class WlyySignFamilyController extends EnvelopRestController {
        }
    }
    @GetMapping(value = WlyyRequestMapping.SignFamily.api_getByCode)
    @GetMapping(value = WlyyRequestMapping.SignFamily.api_getById)
    @ApiOperation(value = "根据code查找协议", notes = "根据code查找协议")
    public Envelop findByCode(
            @ApiParam(name = "code", value = "code")
            @RequestParam(value = "code", required = true) String code
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id
    ) {
        try {
            return Envelop.getSuccess(WlyyRequestMapping.SignFamily.message_success_find, wlyySignFamilyService.findByCode(code));
            return Envelop.getSuccess(WlyyRequestMapping.SignFamily.message_success_find, wlyySignFamilyService.findById(id));
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }

+ 12 - 12
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/controller/patient/AdvertisementControlelr.java

@ -59,24 +59,24 @@ public class AdvertisementControlelr extends EnvelopRestController {
    @DeleteMapping(value = WlyyRequestMapping.Advertisement.api_delete)
    @ApiOperation(value = "删除广告", notes = "删除广告")
    public Envelop delete(
            @ApiParam(name = "code", value = "code")
            @RequestParam(value = "code", required = true) String code) {
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id) {
        try {
            advertisementService.delete(code);
            advertisementService.delete(id);
            return Envelop.getSuccess(WlyyRequestMapping.Advertisement.message_success_delete);
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }
    }
    @GetMapping(value = WlyyRequestMapping.Advertisement.api_getByCode)
    @ApiOperation(value = "根据code查找广告", notes = "根据code查找广告")
    @GetMapping(value = WlyyRequestMapping.Advertisement.api_getById)
    @ApiOperation(value = "根据id查找广告", notes = "根据id查找广告")
    public Envelop findByCode(
            @ApiParam(name = "code", value = "code")
            @RequestParam(value = "code", required = true) String code
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id
    ) {
        try {
            return Envelop.getSuccess(WlyyRequestMapping.Advertisement.message_success_find, advertisementService.findByCode(code));
            return Envelop.getSuccess(WlyyRequestMapping.Advertisement.message_success_find, advertisementService.findById(id));
        } catch (ApiException e) {
            return Envelop.getError(e.getMessage(), e.getErrorCode());
        }
@ -126,14 +126,14 @@ public class AdvertisementControlelr extends EnvelopRestController {
        return Envelop.getSuccessList(WlyyRequestMapping.Advertisement.message_success_find_functions, advertisement);
    }
    @GetMapping(value = WlyyRequestMapping.Advertisement.api_getListByPatientCode)
    @GetMapping(value = WlyyRequestMapping.Advertisement.api_getListByPatientId)
    @ApiOperation(value = "根据患者code获取广告")
    public Envelop getListByPatientCode(
            @ApiParam(name = "patientCode")
            @RequestParam(value = "patientCode") String patientCode,
            @ApiParam(name = "patientId")
            @RequestParam(value = "patientId") String patientId,
            HttpServletRequest request
    ) {
        List<WlyyAdvertisement> advertisements = advertisementService.getListByPatientCode(patientCode, request);
        List<WlyyAdvertisement> advertisements = advertisementService.getListByPatientId(patientId, request);
        return Envelop.getSuccessList(WlyyRequestMapping.Advertisement.message_success_find_functions, advertisements);
    }

+ 2 - 2
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/dao/agreement/WlyySignFamilyDao.java

@ -13,8 +13,8 @@ import java.util.List;
public interface WlyySignFamilyDao  extends PagingAndSortingRepository<WlyySignFamily, String>, JpaSpecificationExecutor<WlyySignFamily> {
    @Query("from WlyySignFamily w where w.id = ?1")
    WlyySignFamily findById(String code);
    WlyySignFamily findById(String id);
    @Query("from WlyySignFamily w where w.patient = ?1 and w.status = ?2")
    List<WlyySignFamily> findByPatientCode(String patientCode, Integer status);
    List<WlyySignFamily> findByPatientId(String patientId, Integer status);
}

+ 1 - 1
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/dao/patient/AdvertisementDao.java

@ -18,7 +18,7 @@ public interface AdvertisementDao extends PagingAndSortingRepository<WlyyAdverti
    //根据saasCode查询广告
    @Query("from WlyyAdvertisement w where w.saasId=?1 and w.status !=-1 order by w.sort")
    List<WlyyAdvertisement> getListBySaasCode(String saasCode);
    List<WlyyAdvertisement> getListBySaasId(String saasCode);
    //查询默认广告
    @Query("from WlyyAdvertisement w where w.saasId ='0' and w.status !=-1 order by w.sort")

+ 6 - 6
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/service/agreement/WlyyAgreementKpiLogService.java

@ -36,16 +36,16 @@ public class WlyyAgreementKpiLogService extends BaseJpaService<WlyyAgreementKpiL
        //    throw new ApiException(BaseContants.Saas.message_fail_code_no_exist, ExceptionCode.common_error_params_code);
        //}
        if (StringUtils.isEmpty(wlyyAgreementKpiLog.getPatientCode())) {
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_patientCode_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_patientId_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(wlyyAgreementKpiLog.getSignCode())) {
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_signCode_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_signId_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(wlyyAgreementKpiLog.getKpiCode())) {
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_kpiCode_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_kpiId_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(wlyyAgreementKpiLog.getAgreementCode())) {
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_agreementCode_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_agreementId_is_null, ExceptionCode.common_error_params_code);
        }
        if (StringUtils.isEmpty(wlyyAgreementKpiLog.getKpiName())) {
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_kpiName_is_null, ExceptionCode.common_error_params_code);
@ -57,7 +57,7 @@ public class WlyyAgreementKpiLogService extends BaseJpaService<WlyyAgreementKpiL
    }
    public WlyyAgreementKpiLog findByCode(String code) {
        return wlyyAgreementKpiLogDao.findById(code);
    public WlyyAgreementKpiLog findById(String id) {
        return wlyyAgreementKpiLogDao.findById(id);
    }
}

+ 8 - 8
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/service/agreement/WlyyAgreementKpiService.java

@ -42,9 +42,9 @@ public class WlyyAgreementKpiService extends BaseJpaService<WlyyAgreementKpi, Wl
        //判断agreement是否存在
        String agreementCode = wlyyAgreementKpi.getAgreementCode();
        if (StringUtils.isEmpty(agreementCode)) {
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_agreementCode_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_agreementId_is_null, ExceptionCode.common_error_params_code);
        }
        WlyyAgreement agreement = wlyyAgreementService.findByCode(agreementCode);
        WlyyAgreement agreement = wlyyAgreementService.findById(agreementCode);
        if(agreement == null){
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_agreement_is_null, ExceptionCode.common_error_params_code);
        }
@ -76,9 +76,9 @@ public class WlyyAgreementKpiService extends BaseJpaService<WlyyAgreementKpi, Wl
        //判断agreement是否存在
        String agreementCode = wlyyAgreementKpi.getAgreementCode();
        if (StringUtils.isEmpty(agreementCode)) {
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_agreementCode_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_agreementId_is_null, ExceptionCode.common_error_params_code);
        }
        WlyyAgreement agreement = wlyyAgreementService.findByCode(agreementCode);
        WlyyAgreement agreement = wlyyAgreementService.findById(agreementCode);
        if(agreement == null){
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_agreement_is_null, ExceptionCode.common_error_params_code);
        }
@ -106,13 +106,13 @@ public class WlyyAgreementKpiService extends BaseJpaService<WlyyAgreementKpi, Wl
        return wlyyAgreementKpiDao.save(wlyyAgreementKpi);
    }
    public WlyyAgreementKpi findByCode(String code) {
        return wlyyAgreementKpiDao.findById(code);
    public WlyyAgreementKpi findById(String id) {
        return wlyyAgreementKpiDao.findById(id);
    }
    @Transient
    public void delete(String code) {
        WlyyAgreementKpi wlyyAgreementKpi = findByCode(code);
    public void delete(String id) {
        WlyyAgreementKpi wlyyAgreementKpi = findById(id);
        if(wlyyAgreementKpi==null){
            throw new ApiException(WlyyRequestMapping.AgreementKpi.message_fail_wlyyAgreementKpi_is_no_exist, ExceptionCode.common_error_params_code);
        }

+ 4 - 4
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/service/agreement/WlyyAgreementService.java

@ -86,14 +86,14 @@ public class WlyyAgreementService extends BaseJpaService<WlyyAgreement, WlyyAgre
        return wlyyAgreementDao.save(wlyyAgreement);
    }
    public WlyyAgreement findByCode(String code) {
        WlyyAgreement wlyyAgreement = wlyyAgreementDao.findById(code);
    public WlyyAgreement findById(String id) {
        WlyyAgreement wlyyAgreement = wlyyAgreementDao.findById(id);
        return wlyyAgreement;
    }
    @Transient
    public void delete(String code) {
        WlyyAgreement wlyyAgreement = findByCode(code);
    public void delete(String id) {
        WlyyAgreement wlyyAgreement = findById(id);
        if(wlyyAgreement==null){
            throw new ApiException(WlyyRequestMapping.Agreement.message_fail_wlyyAgreement_is_no_exist, ExceptionCode.common_error_params_code);
        }

+ 6 - 6
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/service/agreement/WlyySignFamilyService.java

@ -49,8 +49,8 @@ public class WlyySignFamilyService extends BaseJpaService<WlyySignFamily, WlyySi
        return null;
    }
    public WlyySignFamily findByCode(String code) {
        return wlyySignFamilyDao.findById(code);
    public WlyySignFamily findById(String id) {
        return wlyySignFamilyDao.findById(id);
    }
    private boolean canSaveOrUpdate(WlyySignFamily wlyySignFamily) throws ParseException {
@ -94,12 +94,12 @@ public class WlyySignFamilyService extends BaseJpaService<WlyySignFamily, WlyySi
        if (StringUtils.isEmpty(wlyySignFamily.getExpensesStatus())) {
            throw new ApiException(WlyyRequestMapping.SignFamily.message_fail_expenseStatus_is_null, ExceptionCode.common_error_params_code);
        }
        String agreementCode = wlyySignFamily.getAgreementCode();
        String agreementCode = wlyySignFamily.getAgreementId();
        if (StringUtils.isEmpty(agreementCode)) {
            throw new ApiException(WlyyRequestMapping.SignFamily.message_fail_agreementCode_is_null, ExceptionCode.common_error_params_code);
            throw new ApiException(WlyyRequestMapping.SignFamily.message_fail_agreementId_is_null, ExceptionCode.common_error_params_code);
        }
        //根据agreementCode查找协议是否存在
        WlyyAgreement agreement = wlyyAgreementService.findByCode(agreementCode);
        WlyyAgreement agreement = wlyyAgreementService.findById(agreementCode);
        if(agreement==null){
            throw new ApiException(WlyyRequestMapping.Agreement.message_fail_wlyyAgreement_is_no_exist, ExceptionCode.common_error_params_code);
        }
@ -113,6 +113,6 @@ public class WlyySignFamilyService extends BaseJpaService<WlyySignFamily, WlyySi
     * @return
     */
    public List<WlyySignFamily> findByPatientCode(String patientCode,Integer status) {
        return wlyySignFamilyDao.findByPatientCode(patientCode,status);
        return wlyySignFamilyDao.findByPatientId(patientCode,status);
    }
}

+ 8 - 12
svr/svr-wlyy/src/main/java/com/yihu/jw/wlyy/service/patient/AdvertisementService.java

@ -100,13 +100,9 @@ public class AdvertisementService extends BaseJpaService<WlyyAdvertisement, Adve
        return advertisementDao.findById(id);
    }
    public WlyyAdvertisement findByCode(String code) {
        return advertisementDao.findById(code);
    }
    @Transient
    public void delete(String code) {
        WlyyAdvertisement advertisement = findByCode(code);
    public void delete(String id) {
        WlyyAdvertisement advertisement = findById(id);
        if(advertisement==null){
            throw new ApiException(WlyyRequestMapping.Advertisement.message_fail_wlyyAdvertisement_is_not_exist, ExceptionCode.common_error_params_code);
        }
@ -120,7 +116,7 @@ public class AdvertisementService extends BaseJpaService<WlyyAdvertisement, Adve
     * @param request
     * @return
     */
    public List<WlyyAdvertisement> getListByPatientCode(String patientCode, HttpServletRequest request) {
    public List<WlyyAdvertisement> getListByPatientId(String patientCode, HttpServletRequest request) {
        List<WlyyAdvertisement> advertisements = null;
        //查找已签约的,根据签约的saasId查找地区,获得广告
        List<WlyySignFamily> signs =  signFamilyService.findByPatientCode(patientCode,1);
@ -128,7 +124,7 @@ public class AdvertisementService extends BaseJpaService<WlyyAdvertisement, Adve
            for(WlyySignFamily sign:signs){
                String saasCode = sign.getSaasId();
                if(!StringUtils.isEmpty(sign.getSaasId())){
                    advertisements = getListBySaasCode(saasCode);
                    advertisements = getListBySaasId(saasCode);
                    if(advertisements!=null){
                        return advertisements;
                    }
@ -145,8 +141,8 @@ public class AdvertisementService extends BaseJpaService<WlyyAdvertisement, Adve
     * @param saasCode
     * @return
     */
    public List<WlyyAdvertisement> getListBySaasCode(String saasCode){
        return advertisementDao.getListBySaasCode(saasCode);
    public List<WlyyAdvertisement> getListBySaasId(String saasCode){
        return advertisementDao.getListBySaasId(saasCode);
    }
    /**
@ -183,7 +179,7 @@ public class AdvertisementService extends BaseJpaService<WlyyAdvertisement, Adve
                    return  getDefaultList();
                }
                String saasCode = saas.getId();
                return getListBySaasCode(saasCode);
                return getListBySaasId(saasCode);
            }
        } catch (UnsupportedEncodingException e) {//解析ip失败,展示默认广告
@ -218,7 +214,7 @@ public class AdvertisementService extends BaseJpaService<WlyyAdvertisement, Adve
                    return  getDefaultList();
                }
                String saasCode = saas.getId();
                return getListBySaasCode(saasCode);
                return getListBySaasId(saasCode);
            }
        } catch (UnsupportedEncodingException e) {//解析ip失败,展示默认广告

+ 3 - 3
web-gateway/src/main/java/com/yihu/jw/feign/wlyy/agreement/WlyyAgreementFeign.java

@ -23,10 +23,10 @@ public interface WlyyAgreementFeign {
    Envelop update(@RequestBody String jsonData);
    @DeleteMapping(value = WlyyRequestMapping.Agreement.api_delete)
    Envelop delete( @RequestParam(value = "code") String code);
    Envelop delete( @RequestParam(value = "id") String id);
    @RequestMapping(value= WlyyRequestMapping.Agreement.api_getByCode,method = RequestMethod.GET)
    Envelop findByCode( @RequestParam(value = "code" ) String code);
    @RequestMapping(value= WlyyRequestMapping.Agreement.api_getById,method = RequestMethod.GET)
    Envelop findByCode( @RequestParam(value = "id" ) String id);
    @RequestMapping(value = WlyyRequestMapping.Agreement.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(

+ 3 - 3
web-gateway/src/main/java/com/yihu/jw/feign/wlyy/agreement/WlyyAgreementKpiFeign.java

@ -23,10 +23,10 @@ public interface WlyyAgreementKpiFeign {
    Envelop update(@RequestBody String jsonData);
    @DeleteMapping(value = WlyyRequestMapping.AgreementKpi.api_delete)
    Envelop delete(@RequestParam(value = "code" ) String code);
    Envelop delete(@RequestParam(value = "id" ) String id);
    @GetMapping(value = WlyyRequestMapping.AgreementKpi.api_getByCode)
    Envelop findByCode(@RequestParam(value = "code" ) String code);
    @GetMapping(value = WlyyRequestMapping.AgreementKpi.api_getById)
    Envelop findByCode(@RequestParam(value = "id" ) String id);
    @RequestMapping(value = WlyyRequestMapping.AgreementKpi.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(

+ 2 - 2
web-gateway/src/main/java/com/yihu/jw/feign/wlyy/agreement/WlyyAgreementKpiLogFeign.java

@ -18,8 +18,8 @@ public interface WlyyAgreementKpiLogFeign {
    @PostMapping(value = WlyyRequestMapping.AgreementKpiLog.api_create)
    Envelop create(@RequestBody String jsonData);
    @GetMapping(value = WlyyRequestMapping.AgreementKpiLog.api_getByCode)
    Envelop findByCode(@RequestParam(value = "code")String code);
    @GetMapping(value = WlyyRequestMapping.AgreementKpiLog.api_getById)
    Envelop findByCode(@RequestParam(value = "id")String id);
    @RequestMapping(value = WlyyRequestMapping.AgreementKpiLog.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(

+ 2 - 2
web-gateway/src/main/java/com/yihu/jw/feign/wlyy/agreement/WlyySignFamilyFeign.java

@ -22,8 +22,8 @@ public interface WlyySignFamilyFeign {
    @PutMapping(value = WlyyRequestMapping.SignFamily.api_update, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Envelop update(@RequestBody String jsonData);
    @RequestMapping(value= WlyyRequestMapping.SignFamily.api_getByCode,method = RequestMethod.GET)
    Envelop findByCode(@RequestParam(value = "code") String code);
    @RequestMapping(value= WlyyRequestMapping.SignFamily.api_getById,method = RequestMethod.GET)
    Envelop findByCode(@RequestParam(value = "id") String id);
    @RequestMapping(value = WlyyRequestMapping.SignFamily.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(

+ 5 - 5
web-gateway/src/main/java/com/yihu/jw/feign/wlyy/patient/AdvertisementFeign.java

@ -25,10 +25,10 @@ public interface AdvertisementFeign {
    Envelop update(@RequestBody String jsonData);
    @DeleteMapping(value = WlyyRequestMapping.Advertisement.api_delete)
    Envelop delete( @RequestParam(value = "code") String code);
    Envelop delete( @RequestParam(value = "id") String id);
    @RequestMapping(value= WlyyRequestMapping.Advertisement.api_getByCode,method = RequestMethod.GET)
    Envelop findByCode( @RequestParam(value = "code" ) String code);
    @RequestMapping(value= WlyyRequestMapping.Advertisement.api_getById,method = RequestMethod.GET)
    Envelop findByCode( @RequestParam(value = "id" ) String id);
    @RequestMapping(value = WlyyRequestMapping.Advertisement.api_queryPage, method = RequestMethod.GET)
    Envelop queryPage(
@ -44,8 +44,8 @@ public interface AdvertisementFeign {
            @RequestParam(value = "filters", required = false) String filters,
            @RequestParam(value = "sorts", required = false) String sorts);
    @GetMapping(value= WlyyRequestMapping.Advertisement.api_getListByPatientCode)
    Envelop getListByPatientCode(@RequestParam(value="patientCode")String patientCode);
    @GetMapping(value= WlyyRequestMapping.Advertisement.api_getListByPatientId)
    Envelop getListByPatientCode(@RequestParam(value="patientId")String patientId);
    @GetMapping(value= WlyyRequestMapping.Advertisement.api_getListByIp)
    Envelop getListByIp(@RequestParam(value="ipAddress") String ipAddress);