Pārlūkot izejas kodu

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

LiTaohong 6 gadi atpakaļ
vecāks
revīzija
c27cf37c2d
100 mainītis faili ar 3365 papildinājumiem un 468 dzēšanām
  1. 2 1
      common/common-entity/src/main/java/com/yihu/jw/entity/UuidIdentityEntityWithOperator.java
  2. 8 7
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserHideModuleFunctionDO.java
  3. 43 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/ErrorCodeDO.java
  4. 2 3
      common/common-entity/src/main/java/com/yihu/jw/entity/base/message/MqMessageDO.java
  5. 20 7
      common/common-entity/src/main/java/com/yihu/jw/entity/base/message/MqMessageSubscriberDO.java
  6. 117 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/module/InterfaceDO.java
  7. 57 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/module/InterfaceErrorCodeDO.java
  8. 107 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/module/InterfaceParamDO.java
  9. 115 24
      common/common-entity/src/main/java/com/yihu/jw/entity/base/module/ModuleDO.java
  10. 34 29
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/BaseMenuDO.java
  11. 44 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/role/RoleAuthorityDO.java
  12. 11 16
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/BaseRoleMenuDO.java
  13. 8 1
      common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasBusinessCardDO.java
  14. 2 1
      common/common-entity/src/main/java/com/yihu/jw/entity/base/sms/SmsDO.java
  15. 4 3
      common/common-entity/src/main/java/com/yihu/jw/entity/base/sms/SmsGatewayDO.java
  16. 2 1
      common/common-entity/src/main/java/com/yihu/jw/entity/base/sms/SmsTemplateDO.java
  17. 13 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserDO.java
  18. 11 1
      common/common-entity/src/main/java/com/yihu/jw/entity/base/wx/WxWechatDO.java
  19. 24 0
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/HospitalServiceItemDO.java
  20. 9 9
      common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistServiceItemDO.java
  21. 81 0
      common/common-exception/src/main/java/com/yihu/jw/exception/code/BaseErrorCode.java
  22. 35 4
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java
  23. 1 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/WechatRequestMapping.java
  24. 151 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/health/house/HealthyHouseMapping.java
  25. 7 11
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/user/UserHideModuleFunctionVO.java
  26. 44 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/ErrorCodeVO.java
  27. 2 2
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/message/MqMessageSubscriberVO.java
  28. 2 2
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/message/MqMessageVO.java
  29. 54 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/module/InterfaceErrorCodeVO.java
  30. 104 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/module/InterfaceParamVO.java
  31. 113 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/module/InterfaceVO.java
  32. 40 11
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/module/ModuleVO.java
  33. 88 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/role/MenuVO.java
  34. 41 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/role/RoleAuthorityVO.java
  35. 2 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageLogVO.java
  36. 2 2
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsGatewayVO.java
  37. 2 2
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsTemplateVO.java
  38. 2 2
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsVO.java
  39. 10 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/user/UserVO.java
  40. 29 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/wx/WxSaasVO.java
  41. 26 144
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/wx/WxWechatVO.java
  42. 1 1
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/MixEnvelop.java
  43. 1 1
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/PageEnvelop.java
  44. 2 2
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java
  45. 12 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/wlyy/HouseUserContant.java
  46. 5 0
      common/common-util/pom.xml
  47. 1 1
      common/common-util/src/main/java/com/yihu/jw/util/common/IdCardUtil.java
  48. 36 0
      common/common-util/src/main/java/com/yihu/jw/util/date/DateUtil.java
  49. 67 0
      common/common-util/src/main/java/com/yihu/jw/util/excel/AExcelReader.java
  50. 40 0
      common/common-util/src/main/java/com/yihu/jw/util/excel/AExcelWriter.java
  51. 39 0
      common/common-util/src/main/java/com/yihu/jw/util/excel/ExcelUtil.java
  52. 9 0
      common/common-util/src/main/java/com/yihu/jw/util/excel/Validation.java
  53. 13 0
      common/common-util/src/main/java/com/yihu/jw/util/excel/annotation/Child.java
  54. 14 0
      common/common-util/src/main/java/com/yihu/jw/util/excel/annotation/Location.java
  55. 12 0
      common/common-util/src/main/java/com/yihu/jw/util/excel/annotation/Row.java
  56. 12 0
      common/common-util/src/main/java/com/yihu/jw/util/excel/annotation/Sheet.java
  57. 13 0
      common/common-util/src/main/java/com/yihu/jw/util/excel/annotation/Title.java
  58. 12 0
      common/common-util/src/main/java/com/yihu/jw/util/excel/annotation/ValidRepeat.java
  59. 5 0
      gateway/ag-basic/pom.xml
  60. 147 135
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/BasicZuulFilter.java
  61. 232 0
      gateway/ag-basic/src/main/java/com/yihu/jw/security/core/userdetails/SaltUser.java
  62. 17 4
      gateway/ag-basic/src/main/resources/application.yml
  63. 53 0
      server/svr-authentication/readme.md
  64. 19 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/jdbc/WlyyUserDetailsService.java
  65. 8 0
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyAuthorizationEndpoint.java
  66. 18 7
      server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java
  67. 3 3
      server/svr-authentication/src/main/resources/application.yml
  68. 14 1
      server/svr-configuration/src/main/resources/bootstrap.yml
  69. 2 1
      server/svr-zipkin/src/main/java/com/yihu/ZipkinTrackServer.java
  70. 273 0
      sql/init.sql
  71. 8 0
      svr/svr-base/pom.xml
  72. 5 3
      svr/svr-base/src/main/java/com/yihu/jw/base/activemq/MessageManager.java
  73. 4 2
      svr/svr-base/src/main/java/com/yihu/jw/base/config/SwaggerDocs.java
  74. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/contant/CommonContant.java
  75. 5 3
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/user/UserHideModuleFunctionDao.java
  76. 15 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/errorCode/ErrorCodeDao.java
  77. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/module/InterfaceDao.java
  78. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/module/InterfaceErrorCodeDao.java
  79. 14 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/module/InterfaceParamDao.java
  80. 8 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/module/ModuleDao.java
  81. 31 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/role/MenuDao.java
  82. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/role/RoleAuthorityDao.java
  83. 11 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/role/RoleMenuDao.java
  84. 12 11
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/user/UserHideModuleFunctionEndpoint.java
  85. 92 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/errorCode/ErrorCodeEndpoint.java
  86. 61 2
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/module/ModuleEndpoint.java
  87. 163 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/role/MenuEndpoint.java
  88. 97 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/role/RoleAuthorityEndpoint.java
  89. 6 6
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/saas/SaasModuleFunctionEndpoint.java
  90. 1 1
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WeChatQrcodeController.java
  91. 44 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WechatController.java
  92. 7 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WxTemplateController.java
  93. 6 0
      svr/svr-base/src/main/java/com/yihu/jw/base/listener/ApplicationReadyListener.java
  94. 15 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/customize/UserHideModuleFunctionService.java
  95. 69 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/errorCode/ErrorCodeService.java
  96. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/module/InterfaceErrorCodeService.java
  97. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/module/InterfaceParamService.java
  98. 16 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/module/InterfaceService.java
  99. 40 1
      svr/svr-base/src/main/java/com/yihu/jw/base/service/module/ModuleService.java
  100. 0 0
      svr/svr-base/src/main/java/com/yihu/jw/base/service/role/MenuService.java

+ 2 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/UuidIdentityEntityWithOperator.java

@ -5,11 +5,12 @@
 *******************************************************************************/
package com.yihu.jw.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.Column;

+ 8 - 7
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserHideModuleFunctionDO.java

@ -1,4 +1,4 @@
package com.yihu.jw.entity.base.user;
package com.yihu.jw.entity.base.customize;
import com.yihu.jw.entity.IntegerIdentityEntity;
@ -7,6 +7,7 @@ import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Entity - 用户取消订阅的模块或功能
 * @author progr1mmer
 * @date Created on 2018/8/14.
 */
@ -15,9 +16,9 @@ import javax.persistence.Table;
public class UserHideModuleFunctionDO extends IntegerIdentityEntity {
    /**
     * 用户ID
     * 对象ID
     */
    private String userId;
    private String objId;
    /**
     * 模块ID
     */
@ -28,12 +29,12 @@ public class UserHideModuleFunctionDO extends IntegerIdentityEntity {
    private Integer functionId;
    @Column(name = "user_id", nullable = false, length = 50)
    public String getUserId() {
        return userId;
    public String getObjId() {
        return objId;
    }
    public void setUserId(String userId) {
        this.userId = userId;
    public void setObjId(String objId) {
        this.objId = objId;
    }
    @Column(name = "module_id", nullable = false)

+ 43 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/dict/ErrorCodeDO.java

@ -0,0 +1,43 @@
package com.yihu.jw.entity.base.dict;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * 错误码
 * @author yeshijie on 2018/9/26.
 */
@Entity
@Table(name = "base_error_code")
public class ErrorCodeDO extends UuidIdentityEntityWithOperator {
    private String model;//模块
    private String errorCode;//提示码
    private String errorMsg;//提示内容
    public String getModel() {
        return model;
    }
    public void setModel(String model) {
        this.model = model;
    }
    public String getErrorCode() {
        return errorCode;
    }
    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }
    public String getErrorMsg() {
        return errorMsg;
    }
    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }
}

+ 2 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/base/message/MqMessageDO.java

@ -1,7 +1,6 @@
package com.yihu.jw.entity.base.message;
import com.yihu.jw.entity.UuidIdentityEntity;
import org.springframework.stereotype.Component;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -13,7 +12,7 @@ import javax.persistence.Table;
 */
@Entity
@Table(name = "base_mq_message")
public class MqMessageDO extends UuidIdentityEntity {
public class MqMessageDO extends UuidIdentityEntityWithOperator {
    //主题
    private String topic;

+ 20 - 7
common/common-entity/src/main/java/com/yihu/jw/entity/base/message/MqMessageSubscriberDO.java

@ -1,6 +1,6 @@
package com.yihu.jw.entity.base.message;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -8,16 +8,29 @@ import javax.persistence.Table;
/**
 * Entity - 基于MQ的消息推送订阅者
 * Created by progr1mmer on 2018/8/14.
 * @author progr1mmer
 * @date Created on 2018/8/14
 */
@Entity
@Table(name = "base_mq_message_subscriber")
public class MqMessageSubscriberDO extends UuidIdentityEntity {
public class MqMessageSubscriberDO extends UuidIdentityEntityWithOperator {
    private String saasId; //saas id
    private String topic; //主题
    private String url; //推送地址
    private String remark; //备注
    /**
     * saas id
     */
    private String saasId;
    /**
     * 主题
     */
    private String topic;
    /**
     * 推送地址
     */
    private String url;
    /**
     * 备注
     */
    private String remark;
    @Column(name = "saas_id", nullable = false, length = 50)
    public String getSaasId() {

+ 117 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/module/InterfaceDO.java

@ -0,0 +1,117 @@
package com.yihu.jw.entity.base.module;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * 接口
 * @author yeshijie on 2018/9/28.
 */
@Entity
@Table(name = "base_interface")
public class InterfaceDO extends UuidIdentityEntity {
    private String name;//接口名称
    private String moduleId;//模块id
    private String moduleName;//模块名称
    private String methodName;//方法名
    private Integer protocolType;//协议类型(2restful,1webservice)
    private Integer openLevel;//开发程度(1公开,2私有)
    private Integer checkLevel;//审计程度(1审计,2不审计)
    private Integer status;//状态(1生效中,0已失效)
    private String remark;//接口说明
    private String url;//https请求地址
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "module_id")
    public String getModuleId() {
        return moduleId;
    }
    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }
    @Column(name = "module_name")
    public String getModuleName() {
        return moduleName;
    }
    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }
    @Column(name = "method_name")
    public String getMethodName() {
        return methodName;
    }
    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }
    @Column(name = "protocol_type")
    public Integer getProtocolType() {
        return protocolType;
    }
    public void setProtocolType(Integer protocolType) {
        this.protocolType = protocolType;
    }
    @Column(name = "open_level")
    public Integer getOpenLevel() {
        return openLevel;
    }
    public void setOpenLevel(Integer openLevel) {
        this.openLevel = openLevel;
    }
    @Column(name = "check_level")
    public Integer getCheckLevel() {
        return checkLevel;
    }
    public void setCheckLevel(Integer checkLevel) {
        this.checkLevel = checkLevel;
    }
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    @Column(name = "url")
    public String getUrl() {
        return url;
    }
    public void setUrl(String url) {
        this.url = url;
    }
}

+ 57 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/module/InterfaceErrorCodeDO.java

@ -0,0 +1,57 @@
package com.yihu.jw.entity.base.module;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * 接口错误说明
 * @author yeshijie on 2018/9/28.
 */
@Entity
@Table(name = "base_interface_error_code")
public class InterfaceErrorCodeDO extends UuidIdentityEntity {
    private String interfaceId;//接口id
    private String name;//错误码名称
    private String describe;//错误码描述
    private String solution;//解决方案
    @Column(name = "interface_id")
    public String getInterfaceId() {
        return interfaceId;
    }
    public void setInterfaceId(String interfaceId) {
        this.interfaceId = interfaceId;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "describe")
    public String getDescribe() {
        return describe;
    }
    public void setDescribe(String describe) {
        this.describe = describe;
    }
    @Column(name = "solution")
    public String getSolution() {
        return solution;
    }
    public void setSolution(String solution) {
        this.solution = solution;
    }
}

+ 107 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/module/InterfaceParamDO.java

@ -0,0 +1,107 @@
package com.yihu.jw.entity.base.module;
import com.yihu.jw.entity.UuidIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * 接口入参出参
 * @author yeshijie on 2018/9/28.
 */
@Entity
@Table(name = "base_interface_param")
public class InterfaceParamDO extends UuidIdentityEntity {
    
    private String interfaceId;//接口id
    private String name;//参数名
    private Integer paramType;//参数类型
    private Integer dataType;//数据类型
    private Integer isRequire;//是否必填(1是,0否)
    private Integer maxLength;//最大长度
    private String describe;//描述
    private String example;//示例
    private Integer type;//类型(1入参,2出参)
    @Column(name = "interface_id")
    public String getInterfaceId() {
        return interfaceId;
    }
    public void setInterfaceId(String interfaceId) {
        this.interfaceId = interfaceId;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "param_type")
    public Integer getParamType() {
        return paramType;
    }
    public void setParamType(Integer paramType) {
        this.paramType = paramType;
    }
    @Column(name = "data_type")
    public Integer getDataType() {
        return dataType;
    }
    public void setDataType(Integer dataType) {
        this.dataType = dataType;
    }
    @Column(name = "is_require")
    public Integer getIsRequire() {
        return isRequire;
    }
    public void setIsRequire(Integer isRequire) {
        this.isRequire = isRequire;
    }
    @Column(name = "max_length")
    public Integer getMaxLength() {
        return maxLength;
    }
    public void setMaxLength(Integer maxLength) {
        this.maxLength = maxLength;
    }
    @Column(name = "describe")
    public String getDescribe() {
        return describe;
    }
    public void setDescribe(String describe) {
        this.describe = describe;
    }
    @Column(name = "example")
    public String getExample() {
        return example;
    }
    public void setExample(String example) {
        this.example = example;
    }
    @Column(name = "type")
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
}

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

@ -17,33 +17,88 @@ import java.util.List;
@Table(name = "base_module")
public class ModuleDO extends UuidIdentityEntityWithOperator {
	/**
	 * 0 - 禁用
	 * 1 - 可用
	 * 2 - 不可用
	 */
    public enum Status {
		disable,
		available,
		delete
    }
	public enum Status {
		unAvailable("不可用", 0),
		available("可用", 1);
		private String name;
		private Integer value;
		Status(String name, Integer value) {
			this.name = name;
			this.value = value;
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public Integer getValue() {
			return value;
		}
		public void setValue(Integer value) {
			this.value = value;
		}
	}
	public enum Type {
		common("通用", 0),
		doctor("医生端", 1),
		patient("居民端", 2);
		private String name;
		private Integer value;
		Type(String name, Integer value) {
			this.name = name;
			this.value = value;
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public Integer getValue() {
			return value;
		}
		public void setValue(Integer value) {
			this.value = value;
		}
	}
	//模块名称
	private String name;
	//模块连接
	private String url;
	//父id
	private String parentId;
	//状态
	private Status status;
	private Integer status;
	//类型
	private Integer type;
	//备注
	private String remark;
	//closed-表示有子节点,open-表示没有子节点
	private String state ;
	//0-表示有子节点,1-表示没有子节点
	private Integer isEnd ;
	//0-表示非必选,1-表示必选
	private Integer isMust ;
	//逻辑删除标志1正常,0删除
	private Integer del ;
	//子集
	private List<ModuleDO> children = new ArrayList<>();
	// Constructors
    @Column(name = "name", length = 200)
    @Column(name = "name")
    public String getName() {
        return this.name;
    }
@ -52,7 +107,7 @@ public class ModuleDO extends UuidIdentityEntityWithOperator {
        this.name = name;
    }
	@Column(name = "parent_id", length = 50)
	@Column(name = "parent_id")
	public String getParentId() {
		return parentId;
	}
@ -62,15 +117,15 @@ public class ModuleDO extends UuidIdentityEntityWithOperator {
	}
    @Column(name = "status")
    public Status getStatus() {
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Status status) {
    public void setStatus(Integer status) {
        this.status = status;
    }
	@Column(name = "remark", length = 1000)
	@Column(name = "remark")
	public String getRemark() {
		return this.remark;
	}
@ -79,16 +134,52 @@ public class ModuleDO extends UuidIdentityEntityWithOperator {
		this.remark = remark;
	}
    @Transient
	public String getState() {
		return state;
	@Column(name = "url")
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	@Column(name = "type")
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	@Column(name = "is_end")
	public Integer getIsEnd() {
		return isEnd;
	}
	public void setIsEnd(Integer isEnd) {
		this.isEnd = isEnd;
	}
	@Column(name = "del")
	public Integer getDel() {
		return del;
	}
	public void setDel(Integer del) {
		this.del = del;
	}
	@Column(name = "is_must")
	public Integer getIsMust() {
		return isMust;
	}
	public void setState(String state) {
		this.state = state;
	public void setIsMust(Integer isMust) {
		this.isMust = isMust;
	}
    @Transient
	@Transient
	public List<ModuleDO> getChildren() {
		return children;
	}

+ 34 - 29
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/BaseMenuDO.java

@ -1,43 +1,48 @@
package com.yihu.jw.entity.base.user;
package com.yihu.jw.entity.base.role;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * BaseMenu entity. @author MyEclipse Persistence Tools
 * @author progr1mmer
 * @date 2018/09/20
 */
@Entity
@Table(name = "base_menu")
public class BaseMenuDO extends UuidIdentityEntityWithOperator implements java.io.Serializable {
public class MenuDO extends UuidIdentityEntityWithOperator {
	private String saasId;
	private String parentId; //父级ID
	private String name; //名称
	private String url; //请求路径
	private String method; //请求方式 get post
	private Integer sort; //排序
	private Integer status; //状态
	private String remark; //备注
	// Constructors
	/** default constructor */
	public BaseMenuDO() {
	}
	/** minimal constructor */
	public BaseMenuDO(String id, Timestamp createTime, Timestamp updateTime) {
		this.id = id;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}
	// Property accessors
	/**
	 * 名称
	 */
	private String name;
	/**
	 * 请求路径
	 */
	private String url;
	/**
	 * 请求方式
	 */
	private String method;
	/**
	 * 排序
	 */
	private Integer sort;
	/**
	 * 父级ID
	 */
	private String parentId;
	/**
	 * 状态
	 */
	private Integer status;
	/**
	 * 备注
	 */
	private String remark;
	@Column(name = "saas_id", length = 50)
	public String getSaasId() {
@ -93,7 +98,7 @@ public class BaseMenuDO extends UuidIdentityEntityWithOperator implements java.i
		this.remark = remark;
	}
	@Column(name = "url", length = 255)
	@Column(name = "url")
	public String getUrl() {
		return url;
	}
@ -102,7 +107,7 @@ public class BaseMenuDO extends UuidIdentityEntityWithOperator implements java.i
		this.url = url;
	}
	@Column(name = "method", length = 255)
	@Column(name = "method")
	public String getMethod() {
		return method;
	}

+ 44 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/role/RoleAuthorityDO.java

@ -0,0 +1,44 @@
package com.yihu.jw.entity.base.role;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Entity - 角色权限
 * @author progr1mmer.
 * @date Created on 2018/9/14.
 */
@Entity
@Table(name = "base_role_authority")
public class RoleAuthorityDO extends IntegerIdentityEntity {
    /**
     * 角色ID
     */
    private String roleId;
    /**
     * 权限
     */
    private String authorities;
    @Column(name = "role_id", length = 50)
    public String getRoleId() {
        return roleId;
    }
    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }
    @Column(name = "authorities")
    public String getAuthorities() {
        return authorities;
    }
    public void setAuthorities(String authorities) {
        this.authorities = authorities;
    }
}

+ 11 - 16
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/BaseRoleMenuDO.java

@ -1,33 +1,28 @@
package com.yihu.jw.entity.base.user;
package com.yihu.jw.entity.base.role;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * BaseRoleMenu entity. @author MyEclipse Persistence Tools
 * @author progr1mmer
 * @date 2018/09/20
 */
@Entity
@Table(name = "base_role_menu")
public class BaseRoleMenuDO extends UuidIdentityEntity implements java.io.Serializable {
public class RoleMenuDO extends IntegerIdentityEntity {
	// Fields
	/**
	 * 角色ID
	 */
	private String roleId;
	/**
	 * 菜单ID
	 */
	private String menuId;
	/** default constructor */
	public BaseRoleMenuDO() {
	}
	/** minimal constructor */
	public BaseRoleMenuDO(String id) {
		this.id = id;
	}
	@Column(name = "role_id", length = 50)
	public String getRoleId() {
		return this.roleId;

+ 8 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasBusinessCardDO.java

@ -13,14 +13,21 @@ import javax.persistence.Table;
 * </p>
 *
 * Entity - SAAS名片
 * Created by progr1mmer on 2018/9/7.
 * @author progr1mmer
 * @date Created on 2018/9/7.
 */
@Entity
@Table(name = "base_saas_business_card")
public class SaasBusinessCardDO extends IntegerIdentityEntity {
    public enum Type {
        /**
         * 医生
         */
        doctor,
        /**
         * 患者
         */
        patient
    }

+ 2 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/sms/SmsDO.java

@ -2,6 +2,7 @@ package com.yihu.jw.entity.base.sms;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.*;
import java.util.Date;
@ -12,7 +13,7 @@ import java.util.Date;
 */
@Entity
@Table(name = "base_sms")
public class SmsDO extends UuidIdentityEntity {
public class SmsDO extends UuidIdentityEntityWithOperator {
	//应用ID
	private String clientId;

+ 4 - 3
common/common-entity/src/main/java/com/yihu/jw/entity/base/sms/SmsGatewayDO.java

@ -1,7 +1,7 @@
package com.yihu.jw.entity.base.sms;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -9,11 +9,12 @@ import javax.persistence.Table;
/**
 * Entity - 短信网关
 * Created by progr1mmer on 2018/8/14.
 * @author progr1mmer
 * @date Created on 2018/8/14.
 */
@Entity
@Table(name = "base_sms_gateway")
public class SmsGatewayDO extends UuidIdentityEntity {
public class SmsGatewayDO extends UuidIdentityEntityWithOperator {
	/**
	 * 0-禁用,1-可用,2-不可用

+ 2 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/sms/SmsTemplateDO.java

@ -1,6 +1,7 @@
package com.yihu.jw.entity.base.sms;
import com.yihu.jw.entity.UuidIdentityEntity;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
@ -12,7 +13,7 @@ import javax.persistence.Table;
 */
@Entity
@Table(name = "base_sms_template")
public class SmsTemplateDO extends UuidIdentityEntity {
public class SmsTemplateDO extends UuidIdentityEntityWithOperator {
    /**
     * 0 - 注册

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

@ -41,6 +41,10 @@ public class UserDO extends UuidIdentityEntityWithOperator {
    private String mobile;
    //邮箱
    private String email;
    /**
     * 简化模式获取token所需要的凭证
     */
    private String ak;
    //是否可用
    private Boolean enabled;
    //是否锁定
@ -124,6 +128,15 @@ public class UserDO extends UuidIdentityEntityWithOperator {
        this.email = email;
    }
    @Column(name = "ak", length = 200)
    public String getAk() {
        return ak;
    }
    public void setAk(String ak) {
        this.ak = ak;
    }
    @Column(name = "enabled", nullable = false)
    public Boolean getEnabled() {
        return enabled;

+ 11 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/base/wx/WxWechatDO.java

@ -23,7 +23,7 @@ public class WxWechatDO extends UuidIdentityEntityWithOperator implements java.i
    private String token;//token
    private String encodingAesKey;//加密密钥
    private Integer encType;//加密方式  0:明文模式   1:兼容模式   2:安全模式
    private Integer status;//'类型 -1 已删除 0待审核 1审核通过 2 审核不通过'
    private Integer status;//'类型 -1 已删除 0未认证 1已认证 2 审核中 3.审核未通过'
    private String type;//'1:服务号 2 订阅号
    private String appId;//'微信app_id'
    private String appSecret;//'微信app_secret'
@ -31,6 +31,7 @@ public class WxWechatDO extends UuidIdentityEntityWithOperator implements java.i
    private String baseUrl;//'微信base_url'
    private String userName;//公总号登录账户
    private String password;//用户密码
    private String publicType;//1.自运营,2.外接
    private String remark;//'备注'
@ -178,4 +179,13 @@ public class WxWechatDO extends UuidIdentityEntityWithOperator implements java.i
    public void setPassword(String password) {
        this.password = password;
    }
    @Column(name = "public_type", length = 200)
    public String getPublicType() {
        return publicType;
    }
    public void setPublicType(String publicType) {
        this.publicType = publicType;
    }
}

+ 24 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/HospitalServiceItemDO.java

@ -41,6 +41,12 @@ public class HospitalServiceItemDO extends UuidIdentityEntityWithOperator implem
    @Column(name = "expense")
    private Integer expense;//价格
    @Transient
    private String title;//服务项目名称
    @Transient
    private String content;//服务项目内容
    @Transient
    private Integer flag;//标识(1:社区,2、医院,3、社区、医院)
@ -139,4 +145,22 @@ public class HospitalServiceItemDO extends UuidIdentityEntityWithOperator implem
    public void setImediate(Integer imediate) {
        this.imediate = imediate;
    }
    @Transient
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    @Transient
    public String getTitle() {
        return title;
    }
    public void setTitle(String title) {
        this.title = title;
    }
}

+ 9 - 9
common/common-entity/src/main/java/com/yihu/jw/entity/specialist/SpecialistServiceItemDO.java

@ -53,13 +53,13 @@ public class SpecialistServiceItemDO extends UuidIdentityEntityWithOperator impl
    private Integer hospitalGrade; //医院等级
    @Column(name = "three_hospitals")
    private Double threeHospitals; //三级医院收费标准
    private Integer threeHospitals; //三级医院收费标准
    @Column(name = "two_hospitals")
    private Double twoHospitals; //二级医院收费标准
    private Integer twoHospitals; //二级医院收费标准
    @Column(name = "one_hospitals")
    private Double oneHospitals;//一级医院以及一级以下的社区医院
    private Integer oneHospitals;//一级医院以及一级以下的社区医院
    @Column(name = "unit")
    private String unit; //计价单位
@ -177,29 +177,29 @@ public class SpecialistServiceItemDO extends UuidIdentityEntityWithOperator impl
    }
    @Column(name = "three_hospitals")
    public Double getThreeHospitals() {
    public Integer getThreeHospitals() {
        return threeHospitals;
    }
    public void setThreeHospitals(Double threeHospitals) {
    public void setThreeHospitals(Integer threeHospitals) {
        this.threeHospitals = threeHospitals;
    }
    @Column(name = "two_hospitals")
    public Double getTwoHospitals() {
    public Integer getTwoHospitals() {
        return twoHospitals;
    }
    public void setTwoHospitals(Double twoHospitals) {
    public void setTwoHospitals(Integer twoHospitals) {
        this.twoHospitals = twoHospitals;
    }
    @Column(name = "one_hospitals")
    public Double getOneHospitals() {
    public Integer getOneHospitals() {
        return oneHospitals;
    }
    public void setOneHospitals(Double oneHospitals) {
    public void setOneHospitals(Integer oneHospitals) {
        this.oneHospitals = oneHospitals;
    }

+ 81 - 0
common/common-exception/src/main/java/com/yihu/jw/exception/code/BaseErrorCode.java

@ -0,0 +1,81 @@
package com.yihu.jw.exception.code;
/**
 * @author yeshijie on 2018/9/26.
 */
public class BaseErrorCode {
    public static final String PREFIX = "error:code:";//定义redis的前缀
    /**
     * 公共模块
     * -1 ~ -9999
     * 每个模块的错误码至少保留分100个值
     */
    public static class Common{
        public static final String FAIL_UPLOAD = "-1";//上传失败
        public static final String FAIL_UPDATE = "-2";//修改失败
        public static final String FAIL_CREATE = "-3";//新增失败
        public static final String FAIL_DELETE = "-4";//删除失败
        public static final String ID_IS_NULL = "-5";//ID不能为空
    }
    /**
     * 错误码模块
     */
    public static class ErrorCode{
        public static final String IS_EXIST = "-10000";
    }
    /**
     * 租户模块
     */
    public static class Saas{
        public static final String SAAS = "-101000";
    }
    /**
     * 菜单模块
     */
    public static class Menu{
        public static final String NAME_IS_EXIST = "-102000";
    }
    /**
     * 业务模块
     */
    public static class Module{
        public static final String FINDDICTBYCODE = "-103000";
        public static final String NAME_IS_EXIST = "-103001";
    }
    /**
     * 字典模块
     */
    public static class Dict{
        public static final String FINDDICTBYCODE = "-104000";
    }
    /**
     * 通知公告模块
     */
    public static class Notice{
        public static final String FINDDICTBYCODE = "-105000";
    }
    /**
     * 接口模块
     */
    public static class Interface{
        public static final String FINDDICTBYCODE = "-106000";
    }
    /**
     * 微信模块
     */
    public static class Wechat{
        public static final String WECHAT = "-1000000";
    }
}

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

@ -35,6 +35,13 @@ public class BaseRequestMapping {
        public static final String PREFIX  = "/saas_default_module_function";
    }
    /**
     * Saas模块功能
     */
    public static class SaasModuleFunction extends Basic {
        public static final String PREFIX  = "/saas_module_function";
    }
    /**
     * SAAS名片
     */
@ -48,7 +55,9 @@ public class BaseRequestMapping {
     */
    public static class Module extends Basic {
        public static final String PREFIX  = "/module";
        public static final String STATUS  = "/status";
        public static final String IS_NAME_EXIST  = "/isNameExist";
        public static final String FIND_ALL  = "/findAll";
    }
    /**
@ -117,10 +126,29 @@ public class BaseRequestMapping {
    }
    /**
     * 角色模块功能
     * 菜单
     */
    public static class Menu extends Basic {
        public static final String PREFIX  = "/menu";
        public static final String STATUS  = "/status";
        public static final String IS_NAME_EXIST  = "/isNameExist";
        public static final String MOVE_UP  = "/moveUp";
        public static final String MOVE_DOWN  = "/moveDown";
        public static final String FIND_ALL  = "/findAll";
    }
    /**
     * 错误码
     */
    public static class ErrorCode extends Basic {
        public static final String PREFIX  = "/error";
    }
    /**
     * 角色权限
     */
    public static class RoleModuleFunction extends Basic {
        public static final String PREFIX  = "/role_module_function";
    public static class RoleAuthority extends Basic {
        public static final String PREFIX  = "/role_authority";
    }
    /**
@ -128,6 +156,9 @@ public class BaseRequestMapping {
     */
    public static class WeChat extends Basic {
        public static final String PREFIX  = "/wechat";
        public static final String wechat_base ="/wechatBase";
        public static final String api_success ="success";
        public static final String getWechatInfos ="/getWechatInfos";
    }
    /**

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

@ -71,6 +71,7 @@ public class WechatRequestMapping {
        public static final String api_getById="/template/{id}";
        public static final String api_sendTemplateMessage="/sendTemplateMessage";
        public static final String api_test_template="/test_template";
        public static final String api_getAllTemplate="/api_getAllTemplate";
        public static final String message_success_create="wxTemplate create success";
        public static final String message_success_update="wxTemplate update success";

+ 151 - 0
common/common-request-mapping/src/main/java/com/yihu/jw/rm/health/house/HealthyHouseMapping.java

@ -0,0 +1,151 @@
package com.yihu.jw.rm.health.house;
/**
 * Created by Trick on 2018/2/7.
 */
public class HealthyHouseMapping {
    public static final String api_healthyHouse_common = "svr-healthy-house";
    public static final String api_success = "succes";
    public static class HealthyHouse {
        //系统字典
        public static class SystemDict {
            public static final String CREATE = "/create/systemDict";
            public static final String DELETE = "/delete/systemDict";
            public static final String UPDATE = "/update/systemDict";
            public static final String PAGE = "/page/systemDicts";
            public static final String LIST = "/list/systemDicts";
            public static final String GETDICTBYID = "/getDictionaryById";
            public static final String GETDICTBYPHONETICCODE = "/getDictionaryByPhoneticCode";
            public static final String ISDICTNAMEEXISTS = "/isDictNameExists";
            public static final String ISDICTCODEEXISTS = "/isDictCodeExists";
        }
        //系统字典项
        public static class SystemDictEntry {
            public static final String CREATE = "/create/systemDictEntry";
            public static final String DELETE = "/delete/systemDictEntry";
            public static final String UPDATE = "/update/systemDictEntry";
            public static final String PAGE = "/page/systemDictEntrys";
            public static final String LIST = "/list/systemDictEntrys";
            public static final String GETDICTENTRYBYDICTIDANDCODE = "/getDictEntryByDictIdAndCode";
            public static final String GETDICTENTRYBYDICTIDANDNAME = "/getDictEntryByDictIdAndName";
            public static final String DELETEBYDICTIDANDCODE = "/deleteByDictIdAndCode";
            public static final String ISEXISTSDICTENTRYBYDICTIDANDCODE = "/isExistsDictEntryByDictIdAndCode";
        }
        //设施
        public static class Facilities {
            public static final String CREATE = "/create/facilities";
            public static final String DELETE = "/delete/facilities";
            public static final String UPDATE = "/update/facilities";
            public static final String PAGE = "/page/facilities";
            public static final String LIST = "/list/facilities";
            public static final String GET_FACILITIES_BY_ID = "/getFacilitiesById";
            public static final String GET_FACILITIES_BY_FIELD = "/getFacilitiesByField";
            public static final String COUNT_FACILITIES = "/count/facilities";
            public static final String UPDATE_FACILITIE_STATE = "/update/facilitieState";
            public static final String COUNT_FACILITIES_BY_TIME = "/count/facilitiesByTime";
            public static final String NEARBY_FACILITY = "/nearbyFacility";
            public static final String GET_FACILITIELIST = "/list/getAppFacilities";
            public static final String GET_ALL_FACILITIELISTS_COUNT = "/list/getAllFacilitiesCount";
            public static final String UPDATE_FACILITIES_AND_RELATION = "/update/facilitieAndRelations";
            public static final String GET_ALL_FACILITIELISTS_BY_CATEGORY_AND_SERVERCODE = "/list/getAllFacilitiesByCategoryAndServerCode";
        }
        //设施服务
        public static class FacilitiesServer {
            public static final String CREATE = "/create/facilitieServers";
            public static final String DELETE = "/delete/facilitieServers";
            public static final String UPDATE = "/update/facilitieServers";
            public static final String PAGE = "/page/facilitieServers";
            public static final String LIST = "/list/facilitieServers";
            public static final String GET_FACILITIESERVERS_BY_ID = "/getFacilitieServersById";
            public static final String GET_FACILITIESERVERS_BY_FIELD = "/getFacilitieServersByField";
            public static final String LIST_FACILITIESERVERS = "/list/listFacilitieServers";
        }
        //意见反馈
        public static class FeedBack {
            public static final String CREATE = "/create/feedBacks";
            public static final String DELETE = "/delete/feedBacks";
            public static final String UPDATE = "/update/feedBacks";
            public static final String PAGE = "/page/feedBacks";
            public static final String LIST = "/list/feedBacks";
            public static final String GET_FEEDBACK_BY_ID = "/getFeedBackById";
            public static final String GET_FEEDBACKS_BY_FIELD = "/getFeedBacksByField";
            public static final String UPDATE_FEEDBACKS_BY_ID = "/updateFeedBacksById";
            public static final String EXPORT_EXCEL = "/exportExcel/feedBacks";
        }
        //用户使用导航记录
        public static class FacilityUsedRecord {
            public static final String CREATE = "/create/facilityUsedRecords";
            public static final String DELETE = "/delete/facilityUsedRecords";
            public static final String UPDATE = "/update/facilityUsedRecords";
            public static final String PAGE = "/page/facilityUsedRecords";
            public static final String LIST = "/list/facilityUsedRecords";
            public static final String GET_FACILITY_USED_RECORD_BY_ID = "/getFacilityUsedRecordById";
            public static final String GET_FACILITY_USED_RECORD_BY_FIELD = "/getFacilityUsedRecordByField";
            public static final String UPDATE_FACILITY_USED_RECORD_BY_ID = "/updateFacilityUsedRecordById";
            public static final String GET_FACILITY_USED_RECORD_AND_COUNT_BY_ID = "/getFacilityUsedRecordAndCountById";
            public static final String COUNT_FACILITY_USED_RECORD_BY_USERID = "/countFacilityUsedRecordByUserId";
            public static final String GET_FACILITY_USED_RECORD_DETAIL = "/getUsedRecordDetail";
            public static final String PAGE_FACILITY_USED_RECORD_BY_USERID = "/page/facilityUsedRecordsByUserId";
        }
        //服务评价
        public static class NavigationServiceEvaluation {
            public static final String CREATE = "/create/navigationServiceEvaluation";
            public static final String DELETE = "/delete/navigationServiceEvaluation";
            public static final String UPDATE = "/update/navigationServiceEvaluation";
            public static final String PAGE = "/page/navigationServiceEvaluation";
            public static final String LIST = "/list/navigationServiceEvaluation";
            public static final String GET_NAVIGATION_SERVICE_EVALUATION_BY_ID = "/getNavigationServiceEvaluationById";
            public static final String GET_NAVIGATION_SERVICE_EVALUATION_BY_FIELD = "/getNavigationServiceEvaluationByField";
            public static final String UPDATE_NAVIGATION_SERVICE_EVALUATION_BY_ID = "/updateNavigationServiceEvaluationById";
        }
        /**
         * 城市
         */
        public static class Town {
            public static final String LIST = "/list/city";
        }
        public static class FastDFS{
            public static final String UPLOAD="/dfs/upload";
            public static final String UPLOADJSON="/dfs/jsonUpload";
            public static final String DOWN="/dfs/down";
            public static final String DELETE_BY_ID="/dfs/deleteById";
            public static final String DELETE_BY_PATH="/dfs/deleteByPath";
            public static final String GET_FILE_INFO ="/dfs/getFileInfo";
            public static final String DOWNLOAD_BY_ID="/dfs/downloadById";
            public static final String DOWNLOAD_BY_PATH="/dfs/downloadByPath";
        }
        //账号申诉
        public static class Appeal {
            public static final String CREATE = "/create/appeals";
            public static final String DELETE = "/delete/appeals";
            public static final String UPDATE = "/update/appeals";
            public static final String PAGE = "/page/appeals";
            public static final String LIST = "/list/appeals";
            public static final String GET_APPEAL_BY_ID = "/getAppealById";
            public static final String GET_APPEALS_BY_FIELD = "/getAppealsByField";
            public static final String UPDATE_APPEAL_BY_ID = "/updateAppealById";
        }
    }
}

+ 7 - 11
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/user/UserHideModuleFunctionVO.java

@ -1,13 +1,12 @@
package com.yihu.jw.restmodel.base.user;
package com.yihu.jw.restmodel.base.customize;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.Column;
/**
 * VO - 用户取消订阅的模块或功能
 * @author progr1mmer
 * @date Created on 2018/9/11.
 */
@ -18,7 +17,7 @@ public class UserHideModuleFunctionVO extends IntegerIdentityVO {
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID", example = "402303ee65634dfs0234sf9a324a0023")
    private String userId;
    private String objId;
    /**
     * 模块ID
     */
@ -30,16 +29,14 @@ public class UserHideModuleFunctionVO extends IntegerIdentityVO {
    @ApiModelProperty(value = "功能ID", example = "402303ee65634dfs0234sf9a324a0025")
    private Integer functionId;
    @Column(name = "user_id", nullable = false, length = 50)
    public String getUserId() {
        return userId;
    public String getObjId() {
        return objId;
    }
    public void setUserId(String userId) {
        this.userId = userId;
    public void setObjId(String objId) {
        this.objId = objId;
    }
    @Column(name = "module_id", nullable = false)
    public Integer getModuleId() {
        return moduleId;
    }
@ -48,7 +45,6 @@ public class UserHideModuleFunctionVO extends IntegerIdentityVO {
        this.moduleId = moduleId;
    }
    @Column(name = "function_id")
    public Integer getFunctionId() {
        return functionId;
    }

+ 44 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/dict/ErrorCodeVO.java

@ -0,0 +1,44 @@
package com.yihu.jw.restmodel.base.dict;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * 错误码
 * @author yeshijie on 2018/9/26.
 */
@ApiModel(value = "ErrorCodeVO", description = "错误码")
public class ErrorCodeVO extends UuidIdentityEntityWithOperator {
    @ApiModelProperty(value = "模块", example = "common")
    private String model;
    @ApiModelProperty(value = "错误码", example = "-1")
    private String errorCode;
    @ApiModelProperty(value = "提示内容", example = "模块")
    private String errorMsg;
    public String getModel() {
        return model;
    }
    public void setModel(String model) {
        this.model = model;
    }
    public String getErrorCode() {
        return errorCode;
    }
    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }
    public String getErrorMsg() {
        return errorMsg;
    }
    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }
}

+ 2 - 2
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/message/MqMessageSubscriberVO.java

@ -1,6 +1,6 @@
package com.yihu.jw.restmodel.base.message;
import com.yihu.jw.restmodel.UuidIdentityVO;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
 * Created by progr1mmer on 2018/8/14.
 */
@ApiModel(value = "MqMessageSubscriberVO", description = "基于MQ的消息推送订阅者")
public class MqMessageSubscriberVO extends UuidIdentityVO {
public class MqMessageSubscriberVO extends UuidIdentityVOWithOperator {
    @ApiModelProperty(value = "SAAS ID", example = "402803ee656498890165649ad2xaaba2")
    private String saasId;

+ 2 - 2
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/message/MqMessageVO.java

@ -1,6 +1,6 @@
package com.yihu.jw.restmodel.base.message;
import com.yihu.jw.restmodel.UuidIdentityVO;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
 * Created by progr1mmer on 2018/9/3.
 */
@ApiModel(value = "MqMessageVO", description = "基于MQ的消息推送")
public class MqMessageVO extends UuidIdentityVO {
public class MqMessageVO extends UuidIdentityVOWithOperator {
    //主题
    @ApiModelProperty(value = "主题", example = "dailyReport")

+ 54 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/module/InterfaceErrorCodeVO.java

@ -0,0 +1,54 @@
package com.yihu.jw.restmodel.base.module;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import javax.persistence.Column;
/**
 * @author yeshijie on 2018/9/28.
 */
@ApiModel(value = "InterfaceVO", description = "接口错误说明")
public class InterfaceErrorCodeVO extends UuidIdentityVO {
    private String interfaceId;//接口id
    private String name;//错误码名称
    private String describe;//错误码描述
    private String solution;//解决方案
    @Column(name = "interface_id")
    public String getInterfaceId() {
        return interfaceId;
    }
    public void setInterfaceId(String interfaceId) {
        this.interfaceId = interfaceId;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "describe")
    public String getDescribe() {
        return describe;
    }
    public void setDescribe(String describe) {
        this.describe = describe;
    }
    @Column(name = "solution")
    public String getSolution() {
        return solution;
    }
    public void setSolution(String solution) {
        this.solution = solution;
    }
}

+ 104 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/module/InterfaceParamVO.java

@ -0,0 +1,104 @@
package com.yihu.jw.restmodel.base.module;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import javax.persistence.Column;
/**
 * @author yeshijie on 2018/9/28.
 */
@ApiModel(value = "InterfaceVO", description = "接口入参出参")
public class InterfaceParamVO extends UuidIdentityVO {
    
    private String interfaceId;//接口id
    private String name;//参数名
    private Integer paramType;//参数类型
    private Integer dataType;//数据类型
    private Integer isRequire;//是否必填(1是,0否)
    private Integer maxLength;//最大长度
    private String describe;//描述
    private String example;//示例
    private Integer type;//类型(1入参,2出参)
    @Column(name = "interface_id")
    public String getInterfaceId() {
        return interfaceId;
    }
    public void setInterfaceId(String interfaceId) {
        this.interfaceId = interfaceId;
    }
    @Column(name = "name")
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Column(name = "param_type")
    public Integer getParamType() {
        return paramType;
    }
    public void setParamType(Integer paramType) {
        this.paramType = paramType;
    }
    @Column(name = "data_type")
    public Integer getDataType() {
        return dataType;
    }
    public void setDataType(Integer dataType) {
        this.dataType = dataType;
    }
    @Column(name = "is_require")
    public Integer getIsRequire() {
        return isRequire;
    }
    public void setIsRequire(Integer isRequire) {
        this.isRequire = isRequire;
    }
    @Column(name = "max_length")
    public Integer getMaxLength() {
        return maxLength;
    }
    public void setMaxLength(Integer maxLength) {
        this.maxLength = maxLength;
    }
    @Column(name = "describe")
    public String getDescribe() {
        return describe;
    }
    public void setDescribe(String describe) {
        this.describe = describe;
    }
    @Column(name = "example")
    public String getExample() {
        return example;
    }
    public void setExample(String example) {
        this.example = example;
    }
    @Column(name = "type")
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }
}

+ 113 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/module/InterfaceVO.java

@ -0,0 +1,113 @@
package com.yihu.jw.restmodel.base.module;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * @author yeshijie on 2018/9/28.
 */
@ApiModel(value = "InterfaceVO", description = "接口")
public class InterfaceVO extends UuidIdentityVO {
    @ApiModelProperty(value = "接口名称", example = "接口1")
    private String name;
    @ApiModelProperty(value = "模块id", example = "模块1d")
    private String moduleId;
    @ApiModelProperty(value = "模块名称", example = "模块名称")
    private String moduleName;
    @ApiModelProperty(value = "方法名", example = "方法1")
    private String methodName;
    @ApiModelProperty(value = "协议类型(2restful,1webservice)", example = "1")
    private Integer protocolType;
    @ApiModelProperty(value = "开发程度(1公开,2私有)", example = "1")
    private Integer openLevel;
    @ApiModelProperty(value = "审计程度(1审计,2不审计)", example = "1")
    private Integer checkLevel;
    @ApiModelProperty(value = "状态(1生效中,0已失效)", example = "1")
    private Integer status;
    @ApiModelProperty(value = "接口说明", example = "明")
    private String remark;
    @ApiModelProperty(value = "https请求地址", example = "https://")
    private String url;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getModuleId() {
        return moduleId;
    }
    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }
    public String getModuleName() {
        return moduleName;
    }
    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }
    public String getMethodName() {
        return methodName;
    }
    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }
    public Integer getProtocolType() {
        return protocolType;
    }
    public void setProtocolType(Integer protocolType) {
        this.protocolType = protocolType;
    }
    public Integer getOpenLevel() {
        return openLevel;
    }
    public void setOpenLevel(Integer openLevel) {
        this.openLevel = openLevel;
    }
    public Integer getCheckLevel() {
        return checkLevel;
    }
    public void setCheckLevel(Integer checkLevel) {
        this.checkLevel = checkLevel;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public String getUrl() {
        return url;
    }
    public void setUrl(String url) {
        this.url = url;
    }
}

+ 40 - 11
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/module/ModuleVO.java

@ -1,6 +1,5 @@
package com.yihu.jw.restmodel.base.module;
import com.yihu.jw.entity.base.module.ModuleDO;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -19,12 +18,18 @@ public class ModuleVO extends UuidIdentityVOWithOperator {
    private String name;
    @ApiModelProperty(value = "父ID", example = "402803ee656498890165649ad2da0000")
    private String parentId;
    @ApiModelProperty(value = "状态", example = "disable")
    private ModuleDO.Status status;
    @ApiModelProperty(value = "url", example = "/doctor/*")
    private String url;
    @ApiModelProperty(value = "类型", example = "0通用,1医生端你,2居民端")
    private String type;
    @ApiModelProperty(value = "状态", example = "1有效,0失效")
    private Integer status;
    @ApiModelProperty(value = "备注", example = "我是备注")
    private String remark;
    @ApiModelProperty(value = "节点信息(closed-表示有子节点,open-表示没有子节点)", example = "open")
    private String state ;
    @ApiModelProperty(value = "节点信息(0-表示有子节点,1-表示没有子节点)", example = "1")
    private Integer isEnd ;
    @ApiModelProperty(value = "节点信息(0-表示非必选,1-表示必选)", example = "1")
    private Integer isMust ;
    @ApiModelProperty(value = "子集")
    private List<ModuleVO> children = new ArrayList<>();
@ -44,11 +49,11 @@ public class ModuleVO extends UuidIdentityVOWithOperator {
        this.parentId = parentId;
    }
    public ModuleDO.Status getStatus() {
    public Integer getStatus() {
        return status;
    }
    public void setStatus(ModuleDO.Status status) {
    public void setStatus(Integer status) {
        this.status = status;
    }
@ -60,12 +65,36 @@ public class ModuleVO extends UuidIdentityVOWithOperator {
        this.remark = remark;
    }
    public String getState() {
        return state;
    public String getUrl() {
        return url;
    }
    public void setState(String state) {
        this.state = state;
    public void setUrl(String url) {
        this.url = url;
    }
    public Integer getIsEnd() {
        return isEnd;
    }
    public void setIsEnd(Integer isEnd) {
        this.isEnd = isEnd;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public Integer getIsMust() {
        return isMust;
    }
    public void setIsMust(Integer isMust) {
        this.isMust = isMust;
    }
    public List<ModuleVO> getChildren() {

+ 88 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/role/MenuVO.java

@ -0,0 +1,88 @@
package com.yihu.jw.restmodel.base.role;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
/**
 * @author yeshijie on 2018/9/26.
 */
@ApiModel(value = "MenuVO", description = "菜单")
public class MenuVO extends UuidIdentityVOWithOperator {
    @ApiModelProperty(value = "名称", example = "预约挂号")
    private String name;
    @ApiModelProperty(value = "请求路径", example = "/usr/var")
    private String url;
//    @ApiModelProperty(value = "请求方式", example = "get,post")
//    private String method;
    @ApiModelProperty(value = "排序", example = "1")
    private Integer sort;
    @ApiModelProperty(value = "父级ID", example = "父级ID")
    private String parentId;
    @ApiModelProperty(value = "状态", example = "1生效,0失效")
    private Integer status;
    @ApiModelProperty(value = "备注", example = "说明")
    private String remark;
    @ApiModelProperty(value = "子集")
    private List<MenuVO> children = new ArrayList<>();
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getUrl() {
        return url;
    }
    public void setUrl(String url) {
        this.url = url;
    }
    public Integer getSort() {
        return sort;
    }
    public void setSort(Integer sort) {
        this.sort = sort;
    }
    public String getParentId() {
        return parentId;
    }
    public void setParentId(String parentId) {
        this.parentId = parentId;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public List<MenuVO> getChildren() {
        return children;
    }
    public void setChildren(List<MenuVO> children) {
        this.children = children;
    }
}

+ 41 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/role/RoleAuthorityVO.java

@ -0,0 +1,41 @@
package com.yihu.jw.restmodel.base.role;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * VO - 角色权限
 * @author progr1mmer.
 * @date Created on 2018/9/14.
 */
@ApiModel(value = "RoleVO", description = "角色")
public class RoleAuthorityVO extends IntegerIdentityVO {
    /**
     * 角色ID
     */
    @ApiModelProperty(value = "角色ID", example = "402803ee656498890165649ad2da1112")
    private String roleId;
    /**
     * 权限
     */
    @ApiModelProperty(value = "权限", example = "/path/**")
    private String authorities;
    public String getRoleId() {
        return roleId;
    }
    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }
    public String getAuthorities() {
        return authorities;
    }
    public void setAuthorities(String authorities) {
        this.authorities = authorities;
    }
}

+ 2 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/servicePackage/ServicePackageLogVO.java

@ -1,5 +1,6 @@
package com.yihu.jw.restmodel.base.servicePackage;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -105,6 +106,7 @@ public class ServicePackageLogVO implements Serializable {
        this.id = id;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCreateTime() {
        return createTime;
    }

+ 2 - 2
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsGatewayVO.java

@ -1,7 +1,7 @@
package com.yihu.jw.restmodel.base.sms;
import com.yihu.jw.entity.base.sms.SmsGatewayDO;
import com.yihu.jw.restmodel.UuidIdentityVO;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
 * Created by Progr1mmer on 2018/8/27.
 */
@ApiModel(value = "SmsGatewayVO", description = "短信网关")
public class SmsGatewayVO extends UuidIdentityVO {
public class SmsGatewayVO extends UuidIdentityVOWithOperator {
    @ApiModelProperty(value = "client id", example = "EwC0iRSrcS")
    private String clientId;

+ 2 - 2
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsTemplateVO.java

@ -1,7 +1,7 @@
package com.yihu.jw.restmodel.base.sms;
import com.yihu.jw.entity.base.sms.SmsTemplateDO;
import com.yihu.jw.restmodel.UuidIdentityVO;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -11,7 +11,7 @@ import io.swagger.annotations.ApiModelProperty;
 * Created by progr1mmer on 2018/8/14.
 */
@ApiModel(value = "SmsTemplateVO", description = "短信网关")
public class SmsTemplateVO extends UuidIdentityVO {
public class SmsTemplateVO extends UuidIdentityVOWithOperator {
    //应用ID
    @ApiModelProperty(value = "应用ID", example = "EwC0iRSrcS")

+ 2 - 2
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsVO.java

@ -2,7 +2,7 @@ package com.yihu.jw.restmodel.base.sms;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yihu.jw.entity.base.sms.SmsTemplateDO;
import com.yihu.jw.restmodel.UuidIdentityVO;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -14,7 +14,7 @@ import java.util.Date;
 * Created by progr1mmer on 2018/8/28.
 */
@ApiModel(value = "SmsVO", description = "短信记录")
public class SmsVO extends UuidIdentityVO {
public class SmsVO extends UuidIdentityVOWithOperator {
    //应用ID
    @ApiModelProperty(value = "应用ID", example = "EwC0iRSrcS")

+ 10 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/user/UserVO.java

@ -39,6 +39,8 @@ public class UserVO extends UuidIdentityVOWithOperator {
    //邮箱
    @ApiModelProperty(value = "邮箱", example = "wxm@jkzl.com")
    private String email;
    @ApiModelProperty(value = "简化模式获取token所需要的凭证", example = "25f9e794323b453885f5181f1b624d0b")
    private String ak;
    //是否可用
    @ApiModelProperty(value = "是否可用", example = "1")
    private Boolean enabled;
@ -119,6 +121,14 @@ public class UserVO extends UuidIdentityVOWithOperator {
        this.email = email;
    }
    public String getAk() {
        return ak;
    }
    public void setAk(String ak) {
        this.ak = ak;
    }
    public Boolean getEnabled() {
        return enabled;
    }

+ 29 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/wx/WxSaasVO.java

@ -0,0 +1,29 @@
package com.yihu.jw.restmodel.base.wx;
import io.swagger.annotations.ApiModelProperty;
/**
 * Created by Trick on 2018/9/26.
 */
public class WxSaasVO {
    @ApiModelProperty(value = "saasid")
    private String saasid;
    @ApiModelProperty(value = "saas名称")
    private String saasName;
    public String getSaasid() {
        return saasid;
    }
    public void setSaasid(String saasid) {
        this.saasid = saasid;
    }
    public String getSaasName() {
        return saasName;
    }
    public void setSaasName(String saasName) {
        this.saasName = saasName;
    }
}

+ 26 - 144
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/wx/WxWechatVO.java

@ -1,5 +1,7 @@
package com.yihu.jw.restmodel.base.wx;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -10,26 +12,18 @@ import java.util.Map;
 */
public class WxWechatVO {
    private String id;
    private String saasId;//'saas配置id'
    private String name;//名称
    private String token;//token
    private String encodingAesKey;//加密密钥
    private Integer encType;//加密方式  0:明文模式   1:兼容模式   2:安全模式
    private Integer status;//'类型 -1 已删除 0待审核 1审核通过 2 审核不通过'
    private String type;//'1:服务号 2 订阅号
    private String appId;//'微信app_id'
    private String appSecret;//'微信app_secret'
    private String baseUrl;//'微信base_url'
    private String createUser;//'创建人'
    private String createUserName;//'创建人名'
    private Date createTime;//'创建时间'
    private String updateUser;//'修改人
    private String updateUserName;//'修改人名'
    private Date updateTime;//'修改时间'
    private String remark;//'备注'
    private List<Map<String,Object>> children = new ArrayList<>();
    private String state;
    @ApiModelProperty(value = "id")
    private String id ;
    @ApiModelProperty(value = "名称")
    private String name;
    @ApiModelProperty(value = "备注")
    private String remark;
    @ApiModelProperty(value = "状态")
    private Integer status;
    @ApiModelProperty(value = "对接类型")
    private Integer publicType;
    @ApiModelProperty(value = "租户")
    private List<WxSaasVO> saas;
    public String getId() {
        return id;
@ -39,14 +33,6 @@ public class WxWechatVO {
        this.id = id;
    }
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getName() {
        return name;
    }
@ -55,28 +41,12 @@ public class WxWechatVO {
        this.name = name;
    }
    public String getToken() {
        return token;
    }
    public void setToken(String token) {
        this.token = token;
    }
    public String getEncodingAesKey() {
        return encodingAesKey;
    }
    public void setEncodingAesKey(String encodingAesKey) {
        this.encodingAesKey = encodingAesKey;
    }
    public Integer getEncType() {
        return encType;
    public String getRemark() {
        return remark;
    }
    public void setEncType(Integer encType) {
        this.encType = encType;
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public Integer getStatus() {
@ -87,107 +57,19 @@ public class WxWechatVO {
        this.status = status;
    }
    public String getType() {
        return type;
    }
    public void setType(String type) {
        this.type = type;
    }
    public String getAppId() {
        return appId;
    }
    public void setAppId(String appId) {
        this.appId = appId;
    }
    public String getAppSecret() {
        return appSecret;
    }
    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }
    public String getBaseUrl() {
        return baseUrl;
    }
    public void setBaseUrl(String baseUrl) {
        this.baseUrl = baseUrl;
    }
    public String getCreateUser() {
        return createUser;
    }
    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }
    public String getCreateUserName() {
        return createUserName;
    }
    public void setCreateUserName(String createUserName) {
        this.createUserName = createUserName;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public String getUpdateUser() {
        return updateUser;
    }
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }
    public String getUpdateUserName() {
        return updateUserName;
    }
    public void setUpdateUserName(String updateUserName) {
        this.updateUserName = updateUserName;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public List<Map<String, Object>> getChildren() {
        return children;
    public Integer getPublicType() {
        return publicType;
    }
    public void setChildren(List<Map<String, Object>> children) {
        this.children = children;
    public void setPublicType(Integer publicType) {
        this.publicType = publicType;
    }
    public String getState() {
        return state;
    public List<WxSaasVO> getSaas() {
        return saas;
    }
    public void setState(String state) {
        this.state = state;
    public void setSaas(List<WxSaasVO> saas) {
        this.saas = saas;
    }
}

+ 1 - 1
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/MixEnvelop.java

@ -32,7 +32,7 @@ public class MixEnvelop<T, J> extends Envelop {
    private int currPage = 1;
    @ApiModelProperty(value = "每页大小 默认10", example = "15")
    private int pageSize = 10;
    private int pageSize = 15;
    @ApiModelProperty(value = "总共多少页", example = "2")
    private int totalPage;

+ 1 - 1
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/PageEnvelop.java

@ -32,7 +32,7 @@ public class PageEnvelop<T> extends Envelop implements Serializable {
    private int currPage = 1;
    @ApiModelProperty(value = "每页大小 默认10", example = "15")
    private int pageSize = 10;
    private int pageSize = 15;
    @ApiModelProperty(value = "总共多少页", example = "2")
    private int totalPage;

+ 2 - 2
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/endpoint/EnvelopRestEndpoint.java

@ -161,13 +161,13 @@ public abstract class EnvelopRestEndpoint {
    }
    protected <T, J> MixEnvelop<T, J> success(String message, int status, List<T> contents, J obj) {
        return success(message, status, contents, obj, contents.size(), 1, contents.size());
        return success(message, status, contents, obj, contents.size(), 1, contents.size() != 0 ? contents.size() : 15);
    }
    protected <T, J, _T, _J> MixEnvelop<_T, _J> success(String message, int status, List<T> contents, J obj, Class<_T> targetContents, Class<_J> targetObj) {
        List<_T> _contents = convertToModels(contents, new ArrayList<>(contents.size()), targetContents);
        _J _obj = convertToModel(obj, targetObj);
        return success(message, status, _contents, _obj, _contents.size(), 1, _contents.size());
        return success(message, status, _contents, _obj, _contents.size(), 1, _contents.size() != 0 ? _contents.size() : 15);
    }
    protected <T, J> MixEnvelop<T, J> success(String message, int status, List<T> contents, J obj, int totalCount, int currPage, int pageSize) {

+ 12 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/wlyy/HouseUserContant.java

@ -0,0 +1,12 @@
package com.yihu.jw.restmodel.wlyy;
/**
 * @author HZY
 * @created 2018/9/18 20:19
 */
public class HouseUserContant {
    public static Integer activated_del = -1;//删除
    public static Integer activated_lock = 0;//冻结
    public static Integer activated_active = 1;//在线
    public static Integer activated_offline = 2;//离线
}

+ 5 - 0
common/common-util/pom.xml

@ -57,5 +57,10 @@
            <groupId>com.yihu</groupId>
            <artifactId>utils</artifactId> <!-- 此依赖包含大部分常用工具类 -->
        </dependency>
        <dependency>
            <groupId>net.sourceforge.jexcelapi</groupId>
            <artifactId>jxl</artifactId>
        </dependency>
    </dependencies>
</project>

+ 1 - 1
common/common-util/src/main/java/com/yihu/jw/util/common/IdCardUtil.java

@ -140,7 +140,7 @@ public class IdCardUtil {
//        error.put("cardId", "身份证号码长度必须等于15或18位");
//    }
    private boolean cardCodeVerifySimple(String cardcode) {
    public static boolean cardCodeVerifySimple(String cardcode) {
        //第一代身份证正则表达式(15位)
        String isIDCard1 = "^[1-9]\\d{7}((0\\d)|(1[0-2]))(([0|1|2]\\d)|3[0-1])\\d{3}$";
        //第二代身份证正则表达式(18位)

+ 36 - 0
common/common-util/src/main/java/com/yihu/jw/util/date/DateUtil.java

@ -1026,4 +1026,40 @@ public class DateUtil {
        int week = c.get(Calendar.DAY_OF_WEEK);
        return week;
    }
    /**
     * 获取当天0点
     * @return
     */
    public static Date getDateStart(){
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date());
        calendar.set(Calendar.HOUR_OF_DAY, 0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.SECOND, 0);
        Date zero = calendar.getTime();
        return zero;
    }
    /**
     * 获取当天23:59:59
     * @return
     */
    public static Date getDateEnd(){
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date());
        calendar.set(Calendar.HOUR_OF_DAY, 23);
        calendar.set(Calendar.MINUTE, 59);
        calendar.set(Calendar.SECOND, 59);
        Date zero = calendar.getTime();
        return zero;
    }
    public static void main(String[] args) {
        Date dateStart = getDateStart();
        Date dateEnd = getDateEnd();
        System.out.println(dateStart );
        System.out.println(dateEnd);
    }
}

+ 67 - 0
common/common-util/src/main/java/com/yihu/jw/util/excel/AExcelReader.java

@ -0,0 +1,67 @@
package com.yihu.jw.util.excel;
import jxl.Sheet;
import jxl.Workbook;
import java.io.File;
import java.io.InputStream;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public abstract class AExcelReader {
    protected List errorLs = new ArrayList<>();
    protected List correctLs = new ArrayList<>();
    protected Map<String, Set> repeat = new HashMap<>();
    public abstract void read(Workbook rwb) throws Exception;
    public void read(File file) throws Exception {
        read(Workbook.getWorkbook(file));
    }
    public void read(InputStream is) throws Exception {
        read(Workbook.getWorkbook(is));
    }
    public static String replaceBlank(String str) {
        String dest = "";
        if (str!=null) {
            str = str.replaceAll("\\u00A0" ," ");
            //去除字符串中的空格、回车、换行符、制表符
            Pattern p = Pattern.compile("\\s*|\t|\r|\n");
            Matcher m = p.matcher(str);
            dest = m.replaceAll("");
        }
        return dest;
    }
    protected String getCellCont(Sheet sheet, int row, int col){
        return sheet.getCell(col, row).getContents();
    }
    public List getErrorLs() {
        return errorLs;
    }
    public void setErrorLs(List errorLs) {
        this.errorLs = errorLs;
    }
    public List getCorrectLs() {
        return correctLs;
    }
    public void setCorrectLs(List correctLs) {
        this.correctLs = correctLs;
    }
    public Map<String, Set> getRepeat() {
        return repeat;
    }
    public void setRepeat(Map<String, Set> repeat) {
        this.repeat = repeat;
    }
}

+ 40 - 0
common/common-util/src/main/java/com/yihu/jw/util/excel/AExcelWriter.java

@ -0,0 +1,40 @@
package com.yihu.jw.util.excel;
import jxl.Workbook;
import jxl.write.*;
import org.apache.commons.lang3.StringUtils;
import java.io.File;
import java.io.OutputStream;
import java.util.List;
public abstract class AExcelWriter {
    public abstract void write(WritableWorkbook wwb, List ls) throws Exception;
    public void write(OutputStream os, List ls) throws Exception{
        write(Workbook.createWorkbook(os), ls);
    };
    public void write(File file, List ls) throws Exception{
        write(Workbook.createWorkbook(file), ls);
    };
    //添加单元格内容
    public void addCell(WritableSheet ws, int row, int column, String data) throws WriteException {
        Label label = new Label(column ,row, data);
        ws.addCell(label);
    }
    //添加单元格内容
    public void addCell(WritableSheet ws, int row, int column, String data, String memo) throws WriteException {
        Label label = new Label(column ,row, data);
        if(!StringUtils.isEmpty(memo)){
            WritableCellFeatures cellFeatures = new WritableCellFeatures();
            cellFeatures.setComment(memo);
            label.setCellFeatures(cellFeatures);
        }
        ws.addCell(label);
    }
}

+ 39 - 0
common/common-util/src/main/java/com/yihu/jw/util/excel/ExcelUtil.java

@ -0,0 +1,39 @@
package com.yihu.jw.util.excel;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
public abstract class ExcelUtil implements Serializable {
    public int excelSeq;
    public Map<String, String> errorMsg = new HashMap<>();
    public int getExcelSeq() {
        return excelSeq;
    }
    public void setExcelSeq(int excelSeq) {
        this.excelSeq = excelSeq;
    }
    public void addErrorMsg(String field, String msg){
        errorMsg.put(field, msg);
    };
    public String findErrorMsg(String field){
        return errorMsg.get(field);
    };
    public void clearErrorMsg(){
        errorMsg.clear();
    };
    public void removeErrorMsg(String field){
        errorMsg.remove(field);
    };
    @Override
    public boolean equals(Object obj) {
        return getExcelSeq() == ((ExcelUtil) obj).getExcelSeq();
    }
}

+ 9 - 0
common/common-util/src/main/java/com/yihu/jw/util/excel/Validation.java

@ -0,0 +1,9 @@
package com.yihu.jw.util.excel;
import java.util.Map;
import java.util.Set;
public interface Validation {
    public int validate(Map<String, Set> repeatMap) throws Exception;
}

+ 13 - 0
common/common-util/src/main/java/com/yihu/jw/util/excel/annotation/Child.java

@ -0,0 +1,13 @@
package com.yihu.jw.util.excel.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Child {
    String one() default "";
    String many() default "";
}

+ 14 - 0
common/common-util/src/main/java/com/yihu/jw/util/excel/annotation/Location.java

@ -0,0 +1,14 @@
package com.yihu.jw.util.excel.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface Location {
    int x() default -1;
    int y() default -1;
}

+ 12 - 0
common/common-util/src/main/java/com/yihu/jw/util/excel/annotation/Row.java

@ -0,0 +1,12 @@
package com.yihu.jw.util.excel.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Row {
    int start() default 0;
}

+ 12 - 0
common/common-util/src/main/java/com/yihu/jw/util/excel/annotation/Sheet.java

@ -0,0 +1,12 @@
package com.yihu.jw.util.excel.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Sheet {
    String name();
}

+ 13 - 0
common/common-util/src/main/java/com/yihu/jw/util/excel/annotation/Title.java

@ -0,0 +1,13 @@
package com.yihu.jw.util.excel.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Title {
    int type() default 0;
    String names() default "";
}

+ 12 - 0
common/common-util/src/main/java/com/yihu/jw/util/excel/annotation/ValidRepeat.java

@ -0,0 +1,12 @@
package com.yihu.jw.util.excel.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface ValidRepeat {
}

+ 5 - 0
gateway/ag-basic/pom.xml

@ -100,6 +100,11 @@
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-web</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model</artifactId>
        </dependency>
    </dependencies>
    <build>

+ 147 - 135
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/filter/BasicZuulFilter.java

@ -1,135 +1,147 @@
//package com.yihu.jw.gateway.filter;
//
//import com.fasterxml.jackson.databind.ObjectMapper;
//import com.netflix.zuul.ZuulFilter;
//import com.netflix.zuul.context.RequestContext;
//import com.yihu.jw.restmodel.web.Envelop;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Primary;
//import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
//import org.springframework.http.HttpStatus;
//import org.springframework.security.oauth2.common.OAuth2AccessToken;
//import org.springframework.security.oauth2.provider.token.TokenStore;
//import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore;
//import org.springframework.stereotype.Component;
//
//import javax.servlet.http.HttpServletRequest;
//import java.io.IOException;
//
///**
// * Created by progr1mmer on 2017/12/27
// */
//@Component
//public class BasicZuulFilter extends ZuulFilter {
//
//    private static final Logger logger = LoggerFactory.getLogger(BasicZuulFilter.class);
//    private static final String ACCESS_TOKEN_PARAMETER = "token";
//
//    @Autowired
//    private ObjectMapper objectMapper;
//    @Autowired
//    private TokenStore tokenStore;
//
//    @Override
//    public String filterType() {
//        return "pre";
//    }
//
//    @Override
//    public int filterOrder() {
//        return 0;
//    }
//
//    @Override
//    public boolean shouldFilter() {
//        return true;
//    }
//
//    @Override
//    public Object run() {
//        RequestContext ctx = RequestContext.getCurrentContext();
//        HttpServletRequest request = ctx.getRequest();
//        String url = request.getRequestURI();
//        //内部微服务有不需要认证的地址请在URL上追加/open/来进行过滤,如/api/v1.0/open/**,不要在此继续追加!!!
//        if (url.contains("/authentication/")
//                || url.contains("/file/")
//                || url.contains("/open/")
//                || url.contains("/jkzl/")
//                || url.contains("/fzGateway/")
//                || url.contains("/usersOfApp")
//                || url.contains("/users/h5/handshake")
//                || url.contains("/appVersion/getAppVersion")
//                || url.contains("/messageTemplate/messageOrderPush")
//                || url.contains("/account/")) {
//            return true;
//        }
//        return this.authenticate(ctx, request, url);
//    }
//
//    private Object authenticate(RequestContext ctx, HttpServletRequest request, String path) {
//        String accessToken = this.extractToken(request);
//        if (null == accessToken) {
//            return this.forbidden(ctx, HttpStatus.FORBIDDEN.value(), "token can not be null");
//        }
//        OAuth2AccessToken oAuth2AccessToken = tokenStore.readAccessToken(accessToken);
//        if (null == oAuth2AccessToken) {
//            return this.forbidden(ctx, HttpStatus.FORBIDDEN.value(), "invalid token");
//        }
//        if (oAuth2AccessToken.isExpired()) {
//            return this.forbidden(ctx, HttpStatus.PAYMENT_REQUIRED.value(), "expired token"); //返回402 登陆过期
//        }
//        //将token的认证信息附加到请求中,转发给下游微服务
//        /*OAuth2Authentication auth = tokenStore.readAuthentication(accessToken);
//        ctx.addZuulRequestHeader("x-auth-name", auth.getName());*/
//        //以下代码取消注释可开启Oauth2应用资源授权验证
//        /*Set<String> resourceIds = auth.getOAuth2Request().getResourceIds();
//        for (String resourceId : resourceIds) {
//            if (resourceId.equals("*")) {
//                return true;
//            }
//            if (!resourceId.startsWith("/")) {
//                resourceId = "/" + resourceId;
//            }
//            path = path.toLowerCase();
//            if (path.startsWith(resourceId)
//                    && (path.length() == resourceId.length() || path.charAt(resourceId.length()) == '/')) {
//                return true;
//            }
//        }
//        return this.forbidden(ctx, HttpStatus.FORBIDDEN.value(), "invalid token does not contain request resource " + path);*/
//        return true;
//    }
//
//    private String extractToken(HttpServletRequest request) {
//        String accessToken = request.getHeader(ACCESS_TOKEN_PARAMETER);
//        if (null == accessToken) {
//            accessToken = request.getParameter(ACCESS_TOKEN_PARAMETER);
//        }
//        return accessToken;
//    }
//
//    private Object forbidden(RequestContext requestContext, int status, String errorMsg) {
//        requestContext.setSendZuulResponse(false);
//        Envelop envelop = new Envelop();
//        envelop.setMessage(errorMsg);
//        envelop.setStatus(status);
//        try {
//            //requestContext.setResponseStatusCode(status);
//            requestContext.getResponse().getWriter().write(objectMapper.writeValueAsString(envelop));
//        } catch (IOException e) {
//            requestContext.setResponseStatusCode(HttpStatus.INTERNAL_SERVER_ERROR.value());
//            logger.error(e.getMessage());
//        }
//        return false;
//    }
//
//    @Bean
//    @Primary
//    public RedisTokenStore redisTokenStore(JedisConnectionFactory jedisConnectionFactory) {
//        return new RedisTokenStore(jedisConnectionFactory);
//    }
//
//}
package com.yihu.jw.gateway.filter;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.netflix.zuul.ZuulFilter;
import com.netflix.zuul.context.RequestContext;
import com.yihu.jw.restmodel.web.Envelop;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.http.HttpStatus;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.security.oauth2.provider.OAuth2Authentication;
import org.springframework.security.oauth2.provider.token.TokenStore;
import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.Set;
/**
 * Created by progr1mmer on 2017/12/27
 */
@Component
public class BasicZuulFilter extends ZuulFilter {
    private static final Logger logger = LoggerFactory.getLogger(BasicZuulFilter.class);
    private static final String ACCESS_TOKEN_PARAMETER = "token";
    @Autowired
    private ObjectMapper objectMapper;
    @Autowired
    private TokenStore tokenStore;
    @Autowired
    private StringRedisTemplate redisTemplate;
    @Override
    public String filterType() {
        return "pre";
    }
    @Override
    public int filterOrder() {
        return 0;
    }
    @Override
    public boolean shouldFilter() {
        return true;
    }
    @Override
    public Object run() {
        RequestContext ctx = RequestContext.getCurrentContext();
        HttpServletRequest request = ctx.getRequest();
        String url = request.getRequestURI();
        //内部微服务有不需要认证的地址请在URL上追加/open/来进行过滤,如/api/v1.0/open/**,不要在此继续追加!!!
        if (url.contains("/auth/")//验证服务
                || url.contains("/wechat/")//微信
                || url.contains("/open/")) {//开发接口
            return true;
        }
        return this.authenticate(ctx, request, url);
    }
    /**
     * 验证token 权限地址
     * @param ctx
     * @param request
     * @param path
     * @return
     */
    private Object authenticate(RequestContext ctx, HttpServletRequest request, String path) {
        String accessToken = this.extractToken(request);
        if (null == accessToken) {
            return this.forbidden(ctx, HttpStatus.FORBIDDEN.value(), "token can not be null");
        }
        OAuth2AccessToken oAuth2AccessToken = tokenStore.readAccessToken(accessToken);
        if (null == oAuth2AccessToken) {
            return this.forbidden(ctx, HttpStatus.FORBIDDEN.value(), "invalid token");
        }
        if (oAuth2AccessToken.isExpired()) {
            return this.forbidden(ctx, HttpStatus.PAYMENT_REQUIRED.value(), "expired token"); //返回402 登陆过期
        }
        //将token的认证信息附加到请求中,转发给下游微服务
        OAuth2Authentication auth = tokenStore.readAuthentication(accessToken);
        ctx.addZuulRequestHeader("x-auth-name", auth.getName());
        //以下代码取消注释可开启Oauth2应用资源授权验证
//        Set<String> resourceIds = auth.getOAuth2Request().getResourceIds();
        String urls = redisTemplate.opsForValue().get("wlyy2:auth:token:"+accessToken);
        if(StringUtils.isEmpty(urls)){
           return this.forbidden(ctx, HttpStatus.FORBIDDEN.value(), "invalid token does not contain request resource " + path);
        }
        //获取所有token资源
        String resourceIds[] = urls.split(",");
        for (String resourceId : resourceIds) {
            if (resourceId.equals("/**")) {
                return true;
            }
            if (!resourceId.startsWith("/")) {
                resourceId = "/" + resourceId;
            }
            path = path.toLowerCase();
            if (path.startsWith(resourceId)
                    && (path.length() == resourceId.length() || path.charAt(resourceId.length()) == '/')) {
                return true;
            }
        }
        return this.forbidden(ctx, HttpStatus.FORBIDDEN.value(), "invalid token does not contain request resource " + path);
    }
    private String extractToken(HttpServletRequest request) {
        String accessToken = request.getHeader(ACCESS_TOKEN_PARAMETER);
        if (null == accessToken) {
            accessToken = request.getParameter(ACCESS_TOKEN_PARAMETER);
        }
        return accessToken;
    }
    private Object forbidden(RequestContext requestContext, int status, String errorMsg) {
        requestContext.setSendZuulResponse(false);
        Envelop envelop = new Envelop();
        envelop.setMessage(errorMsg);
        envelop.setStatus(status);
        try {
            //requestContext.setResponseStatusCode(status);
            requestContext.getResponse().getWriter().write(objectMapper.writeValueAsString(envelop));
        } catch (IOException e) {
            requestContext.setResponseStatusCode(HttpStatus.INTERNAL_SERVER_ERROR.value());
            logger.error(e.getMessage());
        }
        return false;
    }
    @Bean
    @Primary
    public RedisTokenStore redisTokenStore(JedisConnectionFactory jedisConnectionFactory) {
        return new RedisTokenStore(jedisConnectionFactory);
    }
}

+ 232 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/security/core/userdetails/SaltUser.java

@ -0,0 +1,232 @@
package com.yihu.jw.security.core.userdetails;
import org.springframework.security.core.CredentialsContainer;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.util.Assert;
import java.io.Serializable;
import java.util.*;
/**
 * Created by progr1mmer on 2018/8/29.
 */
public class SaltUser implements UserDetails, CredentialsContainer {
    private static final long serialVersionUID = 420L;
    private String password;
    private final String username;
    private final Set<GrantedAuthority> authorities;
    private final boolean accountNonExpired;
    private final boolean accountNonLocked;
    private final boolean credentialsNonExpired;
    private final boolean enabled;
    private final String salt;
    public SaltUser(String username, String password, String salt, Collection<? extends GrantedAuthority> authorities) {
        this(username, password, salt, true, true, true, true, authorities);
    }
    public SaltUser(String username, String password, String salt, boolean enabled, boolean locked, Collection<? extends GrantedAuthority> authorities) {
        this(username, password, salt, enabled, true, true, !locked, authorities);
    }
    public SaltUser(String username, String password, String salt, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities) {
        if(username != null && !"".equals(username) && password != null) {
            this.username = username;
            this.password = password;
            this.salt = salt;
            this.enabled = enabled;
            this.accountNonExpired = accountNonExpired;
            this.credentialsNonExpired = credentialsNonExpired;
            this.accountNonLocked = accountNonLocked;
            this.authorities = Collections.unmodifiableSet(sortAuthorities(authorities));
        } else {
            throw new IllegalArgumentException("Cannot pass null or empty values to constructor");
        }
    }
    public Collection<GrantedAuthority> getAuthorities() {
        return this.authorities;
    }
    public String getPassword() {
        return this.password;
    }
    public String getUsername() {
        return this.username;
    }
    public String getSalt() {
        return salt;
    }
    public boolean isEnabled() {
        return this.enabled;
    }
    public boolean isAccountNonExpired() {
        return this.accountNonExpired;
    }
    public boolean isAccountNonLocked() {
        return this.accountNonLocked;
    }
    public boolean isCredentialsNonExpired() {
        return this.credentialsNonExpired;
    }
    public void eraseCredentials() {
        this.password = null;
    }
    private static SortedSet<GrantedAuthority> sortAuthorities(Collection<? extends GrantedAuthority> authorities) {
        Assert.notNull(authorities, "Cannot pass a null GrantedAuthority collection");
        SortedSet<GrantedAuthority> sortedAuthorities = new TreeSet(new SaltUser.AuthorityComparator());
        Iterator var2 = authorities.iterator();
        while(var2.hasNext()) {
            GrantedAuthority grantedAuthority = (GrantedAuthority)var2.next();
            Assert.notNull(grantedAuthority, "GrantedAuthority list cannot contain any null elements");
            sortedAuthorities.add(grantedAuthority);
        }
        return sortedAuthorities;
    }
    public boolean equals(Object rhs) {
        return rhs instanceof SaltUser ?this.username.equals(((SaltUser)rhs).username):false;
    }
    public int hashCode() {
        return this.username.hashCode();
    }
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(super.toString()).append(": ");
        sb.append("Username: ").append(this.username).append("; ");
        sb.append("Password: [PROTECTED]; ");
        sb.append("Enabled: ").append(this.enabled).append("; ");
        sb.append("AccountNonExpired: ").append(this.accountNonExpired).append("; ");
        sb.append("credentialsNonExpired: ").append(this.credentialsNonExpired).append("; ");
        sb.append("AccountNonLocked: ").append(this.accountNonLocked).append("; ");
        if(!this.authorities.isEmpty()) {
            sb.append("Granted Authorities: ");
            boolean first = true;
            Iterator var3 = this.authorities.iterator();
            while(var3.hasNext()) {
                GrantedAuthority auth = (GrantedAuthority)var3.next();
                if(!first) {
                    sb.append(",");
                }
                first = false;
                sb.append(auth);
            }
        } else {
            sb.append("Not granted any authorities");
        }
        return sb.toString();
    }
    public static SaltUser.UserBuilder withUsername(String username) {
        return (new SaltUser.UserBuilder()).username(username);
    }
    public static class UserBuilder {
        private String username;
        private String password;
        private List<GrantedAuthority> authorities;
        private boolean accountExpired;
        private boolean accountLocked;
        private boolean credentialsExpired;
        private boolean disabled;
        private UserBuilder() {
        }
        private SaltUser.UserBuilder username(String username) {
            Assert.notNull(username, "username cannot be null");
            this.username = username;
            return this;
        }
        public SaltUser.UserBuilder password(String password) {
            Assert.notNull(password, "password cannot be null");
            this.password = password;
            return this;
        }
        public SaltUser.UserBuilder roles(String... roles) {
            List<GrantedAuthority> authorities = new ArrayList(roles.length);
            String[] var3 = roles;
            int var4 = roles.length;
            for(int var5 = 0; var5 < var4; ++var5) {
                String role = var3[var5];
                Assert.isTrue(!role.startsWith("ROLE_"), role + " cannot start with ROLE_ (it is automatically added)");
                authorities.add(new SimpleGrantedAuthority("ROLE_" + role));
            }
            return this.authorities((List)authorities);
        }
        public SaltUser.UserBuilder authorities(GrantedAuthority... authorities) {
            return this.authorities(Arrays.asList(authorities));
        }
        public SaltUser.UserBuilder authorities(List<? extends GrantedAuthority> authorities) {
            this.authorities = new ArrayList(authorities);
            return this;
        }
        public SaltUser.UserBuilder authorities(String... authorities) {
            return this.authorities(AuthorityUtils.createAuthorityList(authorities));
        }
        public SaltUser.UserBuilder accountExpired(boolean accountExpired) {
            this.accountExpired = accountExpired;
            return this;
        }
        public SaltUser.UserBuilder accountLocked(boolean accountLocked) {
            this.accountLocked = accountLocked;
            return this;
        }
        public SaltUser.UserBuilder credentialsExpired(boolean credentialsExpired) {
            this.credentialsExpired = credentialsExpired;
            return this;
        }
        public SaltUser.UserBuilder disabled(boolean disabled) {
            this.disabled = disabled;
            return this;
        }
        public UserDetails build() {
            return new User(this.username, this.password, !this.disabled, !this.accountExpired, !this.credentialsExpired, !this.accountLocked, this.authorities);
        }
    }
    private static class AuthorityComparator implements Comparator<GrantedAuthority>, Serializable {
        private static final long serialVersionUID = 420L;
        private AuthorityComparator() {
        }
        public int compare(GrantedAuthority g1, GrantedAuthority g2) {
            return g2.getAuthority() == null?-1:(g1.getAuthority() == null?1:g1.getAuthority().compareTo(g2.getAuthority()));
        }
    }
}

+ 17 - 4
gateway/ag-basic/src/main/resources/application.yml

@ -19,6 +19,15 @@ spring:
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
  redis:
    database: 0 # Database index used by the connection factory.
    timeout: 0 # Connection timeout in milliseconds.
    pool:
      max-active: 8 # Max number of connections that can be allocated by the pool at a given time. Use a negative value for no limit.
      max-idle: 8 # Max number of "idle" connections in the pool. Use a negative value to indicate an unlimited number of idle connections.
      max-wait: -1 # Maximum amount of time (in milliseconds) a connection allocation should block before throwing an exception when the pool is exhausted. Use a negative value to block indefinitely.
      min-idle: 1 # Target for the minimum number of idle connections to maintain in the pool. This setting only has an effect if it is positive.
#  sleuth:
#    sampler:
#      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
@ -33,10 +42,10 @@ zuul:
      serviceId: svr-iot
    svr-base:
      path: /base/**
      serviceId: svr-base
    demo:
      path: /baidu/**
      url: https://www.baidu.com
      serviceId: svr-base-lyx
    svr-authentication:
      path: /auth/**
      serviceId: svr-authentication-lyx
---
spring:
@ -45,6 +54,10 @@ spring:
    url: jdbc:mysql://172.19.103.77/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: root
    password: 123456
  redis:
    host: 172.19.103.88 # Redis server host.
    port: 6379 # Redis server port.
#    password: jkzl_ehr
#  zipkin:
#    base-url: http://localhost:9411 #日志追踪的地址

+ 53 - 0
server/svr-authentication/readme.md

@ -0,0 +1,53 @@
授权码模式 authorization_code
1.GET http://localhost:10260/oauth/authorize?response_type=code&client_id=uzs5G0HgTp&state=sxy&scope=read&redirect_uri=http://192.168.1.221:8010/ehr/browser/common/login/signin&ak=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjgKCe2zFmYSjHZz93cO17A0Hj6H5XdfwP2I5Qu1UJbmhGG/wPu409r9TABXblcxC9uPVR3PJ5dPrWPLuQ/r7tq16vSa5GF4iCcSlLyx/IDA5bq8ZnafS/RjPiKDtdZAx5uCNLog9GkVHNZIhK9cS9MI4QNuOJzOXaAVwnP2wIDAQAB
    HTTP/1.1 302 Found
    Location: http://localhost:9000/info?code=Ar0mp5&state=sxy
2.POST  http://localhost:10260/oauth/token
    
    HTTP/1.1 200 OK
    Content-Type: application/json;charset=UTF-8
    Cache-Control: no-store
    Pragma: no-cache
    {
      "accessToken":"4c5c7f4f-158a-4f73-9c14-ecbe78671872",
      "tokenType":"bearer",
      "expiresIn":3600,
      "refreshToken":"4c5c7f4f-158a-4f73-9c14-ecbe78671873",
      "state":"example_value"
    }
简化模式 implicit
1.GET http://localhost:10260/oauth/authorize?response_type=token&client_id=EwC0iRSrc4&state=sxy&scope=read&ak=xxxxxxxxxxxxxxxxxxxxxxxxxxx
    HTTP/1.1 302 Found
    Location: https://www.baidu.com/#access_token=4c5c7f4f-158a-4f73-9c14-ecbe78671872&token_type=bearer&state=sxy&expires_in=2418755
   
密码模式 password
1.POST http://localhost:10260/oauth/token
    grant_type=password&username=admin&password=123456789&scope=read&client_id=uzs5G0HgTp
    HTTP/1.1 200 OK
    Content-Type: application/json;charset=UTF-8
    Cache-Control: no-store
    Pragma: no-cache
    {
      "accessToken":"8ce77011-87c9-48f3-8e4f-5cf945f047c7",
      "tokenType":"example",
      "expiresIn":3600,
      "refreshToken":"6b010e33-8bc3-4f3f-8123-66df589dc82f",
      "state":"example_value",
      "user":"admin"
     }
更新令牌 refresh_token
1.POST http://localhost:10260/oauth/token
    grant_type=refresh_token&refresh_token=6b010e33-8bc3-4f3f-8123-66df589dc82f&client_id=uzs5G0HgTp
单点登陆 sso
//A 应用发起请求
1.GET http://localhost:10260/oauth/sso?response_type=token&client_id=EwC0iRSrcS&state=sxy&scope=read&redirect_uri=https://www.jd.com?idCardNo=362321200108017313&access_token=40db969a-5fa0-444e-a0e0-36ba86e7a9ed
//B应用 验证token
2.post http://localhost:10260/oauth/sso?client_id=EwC0iRSrcS&access_token=26502c29-6ba8-4986-8feb-723b8288356d

+ 19 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/jdbc/WlyyUserDetailsService.java

@ -5,6 +5,7 @@ import com.yihu.jw.security.model.WlyyUserDetails;
import com.yihu.jw.security.model.WlyyUserSimple;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateUtils;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
import org.springframework.security.core.GrantedAuthority;
@ -12,6 +13,7 @@ import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
@ -21,6 +23,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
/**
 * Service - 用户信息
@ -241,4 +244,20 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
        return loginType;
    }
    public boolean setRolePhth(String loginType, OAuth2AccessToken token, String id, StringRedisTemplate redisTemplate){
        if(org.apache.commons.lang.StringUtils.isBlank(loginType)||"1".equals(loginType)){ //1或默认查找user表,为平台管理员账号
            String key = "wlyy2:auth:token:"+token.getValue();
            redisTemplate.opsForValue().set(key,"/**");
            redisTemplate.expire(key,token.getExpiresIn(), TimeUnit.SECONDS);
        }else if("2".equals(loginType)){//2.为医生账号
        }else if("3".equals(loginType)){ //3.患者账号
        }else{
            return false;
        }
        return true;
    }
}

+ 8 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyAuthorizationEndpoint.java

@ -120,6 +120,14 @@ public class WlyyAuthorizationEndpoint extends AbstractEndpoint {
        this.errorPage = errorPage;
    }
    /**
     *
     * @param model
     * @param parameters
     * @param sessionStatus
     * @param principal
     * @return
     */
    @RequestMapping(value = "/oauth/authorize", method = RequestMethod.GET)
    public ModelAndView authorize(Map<String, Object> model, @RequestParam Map<String, String> parameters,
                                  SessionStatus sessionStatus, Principal principal) {

+ 18 - 7
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -1,23 +1,27 @@
package com.yihu.jw.security.oauth2.provider.endpoint;
import com.yihu.jw.security.core.userdetails.jdbc.WlyyUserDetailsService;
import com.yihu.jw.security.model.Captcha;
import com.yihu.jw.security.model.Oauth2Envelop;
import com.yihu.jw.security.model.PublicKey;
import com.yihu.jw.security.model.WlyyUserSimple;
import com.yihu.jw.security.oauth2.core.redis.WlyyRedisVerifyCodeService;
import com.yihu.jw.security.oauth2.provider.error.WlyyOAuth2ExceptionTranslator;
import com.yihu.jw.security.oauth2.provider.WlyyTokenGranter;
import com.yihu.jw.security.core.userdetails.jdbc.WlyyUserDetailsService;
import com.yihu.jw.security.model.Oauth2Envelop;
import com.yihu.jw.security.model.WlyyUserSimple;
import com.yihu.jw.security.oauth2.provider.error.WlyyOAuth2ExceptionTranslator;
import com.yihu.utils.security.RSAUtils;
import org.apache.commons.codec.binary.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.http.*;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.oauth2.common.OAuth2AccessToken;
import org.springframework.security.oauth2.common.exceptions.*;
import org.springframework.security.oauth2.common.exceptions.InvalidGrantException;
import org.springframework.security.oauth2.common.exceptions.InvalidRequestException;
import org.springframework.security.oauth2.common.exceptions.InvalidTokenException;
import org.springframework.security.oauth2.common.exceptions.UnsupportedGrantTypeException;
import org.springframework.security.oauth2.provider.*;
import org.springframework.security.oauth2.provider.endpoint.AbstractEndpoint;
import org.springframework.security.oauth2.provider.error.WebResponseExceptionTranslator;
@ -80,6 +84,8 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
    private RestTemplate restTemplate;
    @Autowired
    private WlyyRedisVerifyCodeService wlyyRedisVerifyCodeService;
    @Autowired
    private StringRedisTemplate redisTemplate;
    @PostConstruct
    private void init() {
@ -111,6 +117,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        }
        if (StringUtils.isEmpty(parameters.get("captcha"))) {
            parameters.put("grant_type", "password");
            //解密密码
//            if (parameters.get("password") != null) {
//                RSAPrivateKey rsaPrivateKey = (RSAPrivateKey)httpSession.getAttribute("privateKey");
//                parameters.put("password", RSAUtils.decryptByPrivateKey(new String(Base64.decodeBase64(parameters.get("password"))), rsaPrivateKey));
@ -148,6 +155,11 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        wlyyUserSimple.setRefreshToken(token.getRefreshToken().getValue());
        wlyyUserSimple.setUser(parameters.get("username"));
        wlyyUserSimple.setState(parameters.get("state"));
        String loginType = parameters.get("login_type");
        userDetailsService.setRolePhth(loginType,token,wlyyUserSimple.getId(),redisTemplate);
        return getResponse(wlyyUserSimple);
    }
@ -280,7 +292,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
            Map<String, Object> sms =  (Map)result.get("obj");
            String captcha = (String) sms.get("captcha");
            Date deadline = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse((String) sms.get("deadline"));
            Long expire = (deadline.getTime() - new Date().getTime()) / 1000;
            Long expire = (deadline.getTime() - System.currentTimeMillis()) / 1000;
            Captcha _captcha = new Captcha();
            _captcha.setCode(captcha);
            _captcha.setExpiresIn(expire.intValue());
@ -403,5 +415,4 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        ResponseEntity<Oauth2Envelop> response = new ResponseEntity<>(authenticationFailed, headers, HttpStatus.OK);
        return response;
    }
}

+ 3 - 3
server/svr-authentication/src/main/resources/application.yml

@ -32,7 +32,7 @@ spring:
    username: root
    password: 123456
  redis:
    host: 172.19.103.47
    port: 6379
    password: redis!@456
    host: 172.19.103.88 # Redis server host.
    port: 6379 # Redis server port.
#    password: jkzl_ehr

+ 14 - 1
server/svr-configuration/src/main/resources/bootstrap.yml

@ -38,4 +38,17 @@ spring:
        git:
          uri: ${wlyy.spring.config.git.uri:http://192.168.120.153:3000/jiwei/wlyy2.0.config.git}
          basedir: /usr/local/wlyy2.0-config
        default-label: ${wlyy.spring.config.git.label:prod}
        default-label: ${wlyy.spring.config.git.label:prod}
---
spring:
  profiles: local
##git配置
  cloud:
    config:
      failFast: true #启动快速失败 即链接不到配置服务就启动失败
      server:
        git:
          uri: ${wlyy.spring.config.git.uri:http://10.95.22.168:3000/jiwei/wlyy2.0.config.git}
          basedir: /usr/local/wlyy2.0-config
        default-label: ${wlyy.spring.config.git.label:local}

+ 2 - 1
server/svr-zipkin/src/main/java/com/yihu/ZipkinTrackServer.java

@ -6,7 +6,8 @@ import zipkin.server.internal.EnableZipkinServer;
/**
 * Created by chenweida on 2017/5/18.
 * @author chenweida
 * @date Created on 2017/5/18.
 */
@SpringBootApplication
@EnableZipkinServer

+ 273 - 0
sql/init.sql

@ -423,6 +423,279 @@ create table `dict_hospital_dept`
)
  ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医院科室字典';
-- 模块
Drop table IF EXISTS `base_module`;
CREATE TABLE `base_module` (
  `id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '模块id',
  `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL COMMENT '名称',
  `parent_id` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '父业务id',
  `status` int(11) NOT NULL COMMENT '状态(0-不可用,1-可用,2-删除)',
  `create_user` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '创建人',
  `create_user_name` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '创建人名',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_user` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '修改人',
  `update_user_name` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '修改人名',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  `remark` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='模块';
-- 功能
Drop table IF EXISTS `base_function`;
CREATE TABLE `base_function` (
  `id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '功能id',
  `module_id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '模块ID',
  `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL COMMENT '功能名称',
  `prefix` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '使用网关转发时的url前缀',
  `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '功能对应的后台url',
  `create_user` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '创建人',
  `create_user_name` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '创建人名',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_user` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '修改人',
  `update_user_name` varchar(200) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '修改人名',
  `update_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '修改时间',
  `remark` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='功能';
-- SAAS
Drop table IF EXISTS `base_saas`;
CREATE TABLE `base_saas` (
  `id` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'saas业务标识',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '创建者',
  `create_user_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '创建者',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '更新者',
  `update_user_name` datetime DEFAULT NULL COMMENT '更新者',
  `org_code` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '机构编码',
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '系统名称',
  `status` int(11) NOT NULL COMMENT '状态(0-待审核 1-审核通过 2-审核不通过 3-已删除)',
  `remark` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '备注',
  `logo` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '远程fastDFS文件地址',
  `type` int(11) NOT NULL COMMENT '类型',
  `manager` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '管理员 - 关联user表id字段',
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '管理员邮箱',
  `mobile` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '管理员手机号码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='SAAS';
-- Saas模块功能
Drop table IF EXISTS `base_saas_module_function`;
CREATE TABLE `base_saas_module_function` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `saas_id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '角色ID',
  `module_id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '模块ID',
  `function_id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '功能ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Saas模块功能';
-- Saas类型默认的模块功能
Drop table IF EXISTS `base_saas_default_module_function`;
CREATE TABLE `base_saas_default_module_function` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `saas_type` int(11) NOT NULL COMMENT 'saas类型',
  `module_id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '模块ID',
  `function_id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '功能ID',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Saas类型默认的模块功能';
-- Saas名片
Drop table IF EXISTS `base_saas_business_card`;
CREATE TABLE `base_saas_business_card` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
  `saas_id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT 'SAAS ID',
  `field` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '所要生成的目标名片的字段,如医生的name、age等',
  `type` int(11) NOT NULL COMMENT '名片类型 (0 - 医生, 1-居民)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Saas名片';
-- 短信网关
Drop table IF EXISTS `base_sms_gateway`;
CREATE TABLE `base_sms_gateway` (
  `id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `client_id` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'saas_id 关联 base_saas',
  `name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '网关名称',
  `username` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '网关用户名',
  `password` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '网关密码',
  `website` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '官网地址',
  `expire_min` int(11) NOT NULL COMMENT '超时时间(分钟)',
  `request_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '网关接口访问URL',
  `request_certificate` varchar(2550) CHARACTER SET utf8 NOT NULL COMMENT '调用凭证(json串)',
  `response_code` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '短信接口调用状态标识',
  `success_value` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '调用成功的状态码',
  `status` int(11) NOT NULL COMMENT '0-禁用,1-可用,2-不可用',
  `create_user` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_user_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人名',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_user` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '修改人',
  `update_user_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '修改人名',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='短信网关';
-- 短信模板
Drop table IF EXISTS `base_sms_template`;
CREATE TABLE `base_sms_template` (
  `id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '主键',
  `client_id` varchar(10) CHARACTER SET utf8 NOT NULL COMMENT '应用ID',
  `type` int(11) NOT NULL COMMENT '短信标签',
  `header` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '【短信抬头】',
  `content` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '正文',
  `create_user` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_user_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人名',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_user` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '修改人',
  `update_user_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '修改人名',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='短信模板';
-- 短信记录
Drop table IF EXISTS `base_sms`;
CREATE TABLE `base_sms` (
  `id` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '业务无关主键',
  `client_id` varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT '应用ID',
  `sms_gateway_id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '使用的网关ID',
  `request_ip` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '请求的ip地址',
  `mobile` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '接收手机号',
  `content` varchar(500) COLLATE utf8_unicode_ci NOT NULL COMMENT '消息内容',
  `deadline` datetime NOT NULL COMMENT '过期时间',
  `captcha` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '验证码',
  `type` int(11) NOT NULL COMMENT '消息类型:1微信端注册,2微信端找回密码,3医生端找回密码,4患者登录,5医生登录',
  `create_user` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_user_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人名',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_user` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '修改人',
  `update_user_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '修改人名',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`),
  KEY `idx_wlyy_sms_1` (`mobile`),
  KEY `idx_wlyy_sms_2` (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='短信记录';
-- 系统字典
Drop table IF EXISTS `base_system_dict`;
CREATE TABLE `base_system_dict` (
  `saas_id` varchar(50) DEFAULT NULL COMMENT 'SaasId',
  `code` varchar(50) NOT NULL COMMENT '字典代码',
  `py_code` varchar(50) NOT NULL COMMENT '拼音码',
  `name` varchar(50) NOT NULL COMMENT '字典名称',
  `type` int(11) NOT NULL COMMENT '字典类型(0-基础字典,1-扩展字典)',
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统字典';
-- 系统字典项
Drop table IF EXISTS `base_system_dict_entry`;
CREATE TABLE `base_system_dict_entry` (
  `id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '主键',
  `dict_code` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '所属字典代码',
  `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '字典项代码',
  `py_code` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '字典项拼音码',
  `value` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '字典项值',
  `sort` int(11) DEFAULT NULL,
  `remark` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '说明',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='系统字典项';
-- 后台管理员
Drop table IF EXISTS `base_user`;
CREATE TABLE `base_user` (
  `id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '主键',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `create_user` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建用户的ID',
  `create_user_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建用户的用户名',
  `update_time` datetime NOT NULL COMMENT '更新时间',
  `update_user` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新用户的ID',
  `update_user_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '更新用户的用户名',
  `username` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '用户名',
  `password` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '密码',
  `salt` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '密码散列值',
  `name` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '真实名字',
  `gender` int(11) DEFAULT NULL COMMENT '性别(0-男,1-女)',
  `idcard` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '身份证号码',
  `mobile` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '手机号码',
  `ak` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '简化模式获取token所需要的凭证',
  `email` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '邮箱',
  `enabled` int(1) DEFAULT NULL COMMENT '账号是否可用1为可用',
  `locked` int(1) DEFAULT NULL COMMENT '账号是否被锁',
  `locked_date` datetime DEFAULT NULL COMMENT '账号被锁时间',
  `login_date` datetime DEFAULT NULL COMMENT '最后登陆时间',
  `login_failure_count` int(11) DEFAULT NULL COMMENT '用户名密码验证失败次数'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='后台管理员';
-- 角色
Drop table IF EXISTS `base_role`;
CREATE TABLE `base_role` (
  `id` varchar(50) NOT NULL COMMENT '主键',
  `saas_id` varchar(50) DEFAULT NULL COMMENT 'saas_id',
  `client_id` varchar(10) NOT NULL COMMENT '所属应用',
  `name` varchar(50) DEFAULT NULL COMMENT '角色名称',
  `code` varchar(16) NOT NULL COMMENT '角色代码',
  `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '备注',
  `create_user` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '创建人',
  `create_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '创建人名',
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_user` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '修改人',
  `update_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '修改人名',
  `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `system` bit(1) NOT NULL COMMENT '是否系统角色',
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色';
-- 角色权限
Drop table IF EXISTS `base_role_authority`;
CREATE TABLE `base_role_authority` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键,无关业务',
  `role_id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '角色ID',
  `authorities` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '权限',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='角色权限';
-- 用户角色
Drop table IF EXISTS `base_user_role`;
CREATE TABLE `base_user_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `user_id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '用户ID',
  `role_id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '角色编码',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='用户角色';
-- 基于MQ的消息推送
Drop table IF EXISTS `base_mq_message`;
CREATE TABLE `base_mq_message` (
  `id` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '主键',
  `topic` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '主题',
  `name` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '名称',
  `remark` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '备注',
  `template` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '模板',
  `create_user` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_user_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人名',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_user` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '修改人',
  `update_user_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '修改人名',
  `update_time` datetime NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='基于MQ的消息推送';
-- 基于MQ的消息推送订阅者
Drop table IF EXISTS `base_mq_message_subscriber`;
CREATE TABLE `base_mq_message_subscriber` (
  `id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '主键',
  `saas_id` varchar(50) CHARACTER SET utf8 NOT NULL COMMENT '所属SAAS',
  `topic` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '主题',
  `url` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '推送地址',
  `remark` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '备注',
  `create_user` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人',
  `create_user_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '创建人名',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_user` varchar(50) CHARACTER SET utf8 DEFAULT NULL COMMENT '修改人',
  `update_user_name` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '修改人名',
  `update_time` datetime NOT NULL COMMENT '修改时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='基于MQ的消息推送订阅者';
-- 消息管理模块
drop table IF EXISTS `base_message`;
CREATE TABLE `base_message` (

+ 8 - 0
svr/svr-base/pom.xml

@ -46,10 +46,15 @@
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
        </dependency>
        <!--注释掉就不会读取git的配置,只会读取yml中的配置-->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-config</artifactId>
@ -133,6 +138,9 @@
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>com.yihu.SvrBaseApplication</mainClass>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>

+ 5 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/activemq/MessageManager.java

@ -47,9 +47,11 @@ public class MessageManager {
                });
                groups.put(mqMessageDo.getTopic(), subUrl);
            }
            executorService = Executors.newFixedThreadPool(groups.size());
            for (String key : groups.keySet()) {
                executorService.execute(new ConsumerRunner(key, groups.get(key)));
            if(groups.size()>0){
                executorService = Executors.newFixedThreadPool(groups.size());
                for (String key : groups.keySet()) {
                    executorService.execute(new ConsumerRunner(key, groups.get(key)));
                }
            }
        } catch (Exception e) {
            LOGGER.error(e.getMessage(), e);

+ 4 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/config/SwaggerDocs.java

@ -19,10 +19,12 @@ public class SwaggerDocs {
        //1.请求 http://ip:port/swagger-resources获取group
        String group = "Default";
        //2.定义请求地址 new URL("http://ip:port/v2/api-docs?group=" + groupName)
        URL remoteSwaggerFile = new URL("http://127.0.0.1:10020/v2/api-docs?group=" + group); //项目的swagger-ui地址
        //项目的swagger-ui地址
        URL remoteSwaggerFile = new URL("http://127.0.0.1:10020/v2/api-docs?group=" + group);
        //3.定义文件输出路径
        String prefix = Thread.currentThread().getContextClassLoader().getResource("").getPath();
        Path outputFile = Paths.get(prefix.substring(prefix.lastIndexOf(":") + 1, prefix.indexOf("target") - 1) + "/build/" + group); //文档输出地址
        //文档输出地址
        Path outputFile = Paths.get(prefix.substring(prefix.lastIndexOf(":") + 1, prefix.indexOf("target") - 1) + "/build/" + group);
        Swagger2MarkupConfig config = new Swagger2MarkupConfigBuilder()
                .withMarkupLanguage(MarkupLanguage.ASCIIDOC)

+ 13 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/contant/CommonContant.java

@ -0,0 +1,13 @@
package com.yihu.jw.base.contant;
/**
 * 常量
 * @author yeshijie on 2018/9/27.
 */
public class CommonContant {
    /**
     * 默认父类id 0
     */
    public static final String DEFAULT_PARENTID = "0";
}

+ 5 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/dao/user/UserHideModuleFunctionDao.java

@ -1,11 +1,13 @@
package com.yihu.jw.base.dao.user;
package com.yihu.jw.base.dao.customize;
import com.yihu.jw.entity.base.user.UserHideModuleFunctionDO;
import com.yihu.jw.entity.base.customize.UserHideModuleFunctionDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Created by progr1mmer on 2018/8/20.
 * Dao - 用户取消订阅的模块或功能
 * @author progr1mmer.
 * @date Created on 2018/8/20.
 */
public interface UserHideModuleFunctionDao extends PagingAndSortingRepository<UserHideModuleFunctionDO, Integer>, JpaSpecificationExecutor<UserHideModuleFunctionDO> {
}

+ 15 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/errorCode/ErrorCodeDao.java

@ -0,0 +1,15 @@
package com.yihu.jw.base.dao.errorCode;
import com.yihu.jw.entity.base.dict.ErrorCodeDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * @author yeshijie on 2018/9/26.
 */
public interface ErrorCodeDao extends PagingAndSortingRepository<ErrorCodeDO, String>, JpaSpecificationExecutor<ErrorCodeDO> {
    @Query("select count(*) from ErrorCodeDO a where a.errorCode = ?1 ")
    int isExistsErrorCode(String errorCode);
}

+ 14 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/module/InterfaceDao.java

@ -0,0 +1,14 @@
package com.yihu.jw.base.dao.module;
import com.yihu.jw.entity.base.module.InterfaceDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * 接口
 * @author yeshijie on 2018/9/28.
 */
public interface InterfaceDao extends PagingAndSortingRepository<InterfaceDO, String>, JpaSpecificationExecutor<InterfaceDO> {
}

+ 14 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/module/InterfaceErrorCodeDao.java

@ -0,0 +1,14 @@
package com.yihu.jw.base.dao.module;
import com.yihu.jw.entity.base.module.InterfaceErrorCodeDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * 接口错误说明
 * @author yeshijie on 2018/9/28.
 */
public interface InterfaceErrorCodeDao extends PagingAndSortingRepository<InterfaceErrorCodeDO, String>, JpaSpecificationExecutor<InterfaceErrorCodeDO> {
}

+ 14 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/module/InterfaceParamDao.java

@ -0,0 +1,14 @@
package com.yihu.jw.base.dao.module;
import com.yihu.jw.entity.base.module.InterfaceParamDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * 接口入参出参
 * @author yeshijie on 2018/9/28.
 */
public interface InterfaceParamDao extends PagingAndSortingRepository<InterfaceParamDO, String>, JpaSpecificationExecutor<InterfaceParamDO> {
    
}

+ 8 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/module/ModuleDao.java

@ -2,6 +2,8 @@ package com.yihu.jw.base.dao.module;
import com.yihu.jw.entity.base.module.ModuleDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
@ -10,4 +12,10 @@ import org.springframework.data.repository.PagingAndSortingRepository;
 */
public interface ModuleDao extends PagingAndSortingRepository<ModuleDO, String>, JpaSpecificationExecutor<ModuleDO> {
    @Modifying
    @Query("update ModuleDO p set p.status=?2 where p.id=?1")
    void updateStatus(String id,Integer status);
    @Query("select count(*) from ModuleDO a where a.name = ?1 ")
    int isExistName(String name);
}

+ 31 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/role/MenuDao.java

@ -0,0 +1,31 @@
package com.yihu.jw.base.dao.role;
import com.yihu.jw.entity.base.role.MenuDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * @author yeshijie on 2018/9/26.
 */
public interface MenuDao extends PagingAndSortingRepository<MenuDO, String>, JpaSpecificationExecutor<MenuDO> {
    @Modifying
    @Query("update MenuDO p set p.status=?2 where p.id=?1")
    void updateStatus(String id,Integer status);
    @Modifying
    @Query("update MenuDO p set p.sort=p.sort+1 where p.parentId=?1 and p.sort=?2")
    void addSort(String parentId,Integer sort);
    @Modifying
    @Query("update MenuDO p set p.sort=p.sort-1 where p.parentId=?1 and p.sort=?2")
    void subSort(String parentId,Integer sort);
    @Query("select count(*) from MenuDO a where a.name = ?1 ")
    int isExistName(String name);
    @Query("select count(*) from MenuDO a where a.parentId = ?1 ")
    int countMenuByParentId(String parentId);
}

+ 13 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/role/RoleAuthorityDao.java

@ -0,0 +1,13 @@
package com.yihu.jw.base.dao.role;
import com.yihu.jw.entity.base.role.RoleAuthorityDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Dao - 角色权限
 * @author progr1mmer.
 * @date Created on 2018/9/14.
 */
public interface RoleAuthorityDao extends PagingAndSortingRepository<RoleAuthorityDO, Integer>, JpaSpecificationExecutor<RoleAuthorityDO> {
}

+ 11 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/role/RoleMenuDao.java

@ -0,0 +1,11 @@
package com.yihu.jw.base.dao.role;
import com.yihu.jw.entity.base.role.RoleMenuDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * @author yeshijie on 2018/9/26.
 */
public interface RoleMenuDao extends PagingAndSortingRepository<RoleMenuDO, String>, JpaSpecificationExecutor<RoleMenuDO> {
}

+ 12 - 11
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/user/UserHideModuleFunctionEndpoint.java

@ -1,7 +1,8 @@
package com.yihu.jw.base.endpoint.user;
package com.yihu.jw.base.endpoint.customize;
import com.yihu.jw.base.service.user.UserHideModuleFunctionService;
import com.yihu.jw.entity.base.user.UserHideModuleFunctionDO;
import com.yihu.jw.base.service.customize.UserHideModuleFunctionService;
import com.yihu.jw.entity.base.customize.UserHideModuleFunctionDO;
import com.yihu.jw.restmodel.base.customize.UserHideModuleFunctionVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
@ -18,12 +19,12 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * Endpoint - 用户模块功能管理
 * Endpoint - 用户取消订阅的模块或功能
 * Created by progr1mmer on 2018/8/16.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.UserHideModuleFunction.PREFIX)
@Api(value = "用户模块功能管理", description = "用户模块功能管理服务接口", tags = {"wlyy基础服务 - 用户模块功能管理服务接口"})
@Api(value = "用户取消订阅的模块或功能(用户自定义)", description = "用户取消订阅的模块或功能(用户自定义)服务接口", tags = {"wlyy基础服务 - 用户取消订阅的模块或功能(用户自定义)服务接口"})
public class UserHideModuleFunctionEndpoint extends EnvelopRestEndpoint {
    @Autowired
@ -31,12 +32,12 @@ public class UserHideModuleFunctionEndpoint extends EnvelopRestEndpoint {
    @PostMapping(value = BaseRequestMapping.UserHideModuleFunction.CREATE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<UserHideModuleFunctionDO> create (
    public ObjEnvelop<UserHideModuleFunctionVO> create (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        UserHideModuleFunctionDO userHideModuleFunctionDO = toEntity(jsonData, UserHideModuleFunctionDO.class);
        userHideModuleFunctionDO = userHideModuleFunctionService.save(userHideModuleFunctionDO);
        return success(userHideModuleFunctionDO);
        return success(userHideModuleFunctionDO, UserHideModuleFunctionVO.class);
    }
    @PostMapping(value = BaseRequestMapping.UserHideModuleFunction.DELETE)
@ -63,7 +64,7 @@ public class UserHideModuleFunctionEndpoint extends EnvelopRestEndpoint {
    @GetMapping(value = BaseRequestMapping.UserHideModuleFunction.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<UserHideModuleFunctionDO> page (
    public PageEnvelop<UserHideModuleFunctionVO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
@ -76,12 +77,12 @@ public class UserHideModuleFunctionEndpoint extends EnvelopRestEndpoint {
            @RequestParam(value = "size") int size) throws Exception {
        List<UserHideModuleFunctionDO> userHideModuleFunctionDOS = userHideModuleFunctionService.search(fields, filters, sorts, page, size);
        int count = (int)userHideModuleFunctionService.getCount(filters);
        return success(userHideModuleFunctionDOS, count, page, size);
        return success(userHideModuleFunctionDOS, count, page, size, UserHideModuleFunctionVO.class);
    }
    @GetMapping(value = BaseRequestMapping.UserHideModuleFunction.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<UserHideModuleFunctionDO> list (
    public ListEnvelop<UserHideModuleFunctionVO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
@ -89,7 +90,7 @@ public class UserHideModuleFunctionEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<UserHideModuleFunctionDO> userHideModuleFunctionDOS = userHideModuleFunctionService.search(fields, filters, sorts);
        return success(userHideModuleFunctionDOS);
        return success(userHideModuleFunctionDOS, UserHideModuleFunctionVO.class);
    }
}

+ 92 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/errorCode/ErrorCodeEndpoint.java

@ -0,0 +1,92 @@
package com.yihu.jw.base.endpoint.errorCode;
import com.yihu.jw.base.service.errorCode.ErrorCodeService;
import com.yihu.jw.base.util.ErrorCodeUtil;
import com.yihu.jw.entity.base.dict.ErrorCodeDO;
import com.yihu.jw.exception.code.BaseErrorCode;
import com.yihu.jw.restmodel.base.dict.ErrorCodeVO;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * @author yeshijie on 2018/9/26.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.ErrorCode.PREFIX)
@Api(value = "错误码管理", description = "错误码管理服务接口", tags = {"基础服务 - 错误码管理服务接口"})
public class ErrorCodeEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private ErrorCodeService errorCodeService;
    @Autowired
    private ErrorCodeUtil errorCodeUtil;
    @PostMapping(value = BaseRequestMapping.Menu.CREATE,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<ErrorCodeVO> create (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        ErrorCodeDO errorCodeDO = toEntity(jsonData, ErrorCodeDO.class);
        if(errorCodeService.isExistsErrorCode(errorCodeDO.getErrorCode())>0){
            return failed(errorCodeUtil.getErrorMsg(BaseErrorCode.ErrorCode.IS_EXIST), ObjEnvelop.class);
        }
        errorCodeDO = errorCodeService.addErrorCode(errorCodeDO);
        return success(errorCodeDO, ErrorCodeVO.class);
    }
    @PostMapping(value = BaseRequestMapping.Menu.UPDATE)
    @ApiOperation(value = "更新")
    public ObjEnvelop<ErrorCodeVO> update (
            @ApiParam(name = "id", value = "id")
            @RequestParam(value = "id", required = true) String id,
            @ApiParam(name = "errorMsg", value = "错误码")
            @RequestParam(value = "errorMsg", required = true) String errorMsg) throws Exception {
        if (null == id) {
            return failed(errorCodeUtil.getErrorMsg(BaseErrorCode.Common.ID_IS_NULL), ObjEnvelop.class);
        }
        ErrorCodeDO errorCodeDO = errorCodeService.updateMsg(id, errorMsg);
        return success(errorCodeDO, ErrorCodeVO.class);
    }
    @GetMapping(value = BaseRequestMapping.Menu.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<ErrorCodeVO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<ErrorCodeDO> errorCodeDOS = errorCodeService.search(fields, filters, sorts, page, size);
        int count = (int)errorCodeService.getCount(filters);
        return success(errorCodeDOS, count, page, size, ErrorCodeVO.class);
    }
    @GetMapping(value = BaseRequestMapping.Menu.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<ErrorCodeVO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<ErrorCodeDO> errorCodeDOS = errorCodeService.search(fields, filters, sorts);
        return success(errorCodeDOS, ErrorCodeVO.class);
    }
}

+ 61 - 2
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/module/ModuleEndpoint.java

@ -1,7 +1,10 @@
package com.yihu.jw.base.endpoint.module;
import com.yihu.jw.base.contant.CommonContant;
import com.yihu.jw.base.service.module.ModuleService;
import com.yihu.jw.base.util.ErrorCodeUtil;
import com.yihu.jw.entity.base.module.ModuleDO;
import com.yihu.jw.exception.code.BaseErrorCode;
import com.yihu.jw.restmodel.base.module.ModuleVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
@ -12,11 +15,15 @@ import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
 * Endpoint - 模块
@ -29,6 +36,8 @@ public class ModuleEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private ModuleService moduleService;
    @Autowired
    private ErrorCodeUtil errorCodeUtil;
    @PostMapping(value = BaseRequestMapping.Module.CREATE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "创建")
@ -36,10 +45,33 @@ public class ModuleEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        ModuleDO module = toEntity(jsonData, ModuleDO.class);
        module = moduleService.save(module);
        int count = moduleService.isExistName(module.getName());
        if(count>0){
            return failed(errorCodeUtil.getErrorMsg(BaseErrorCode.Module.NAME_IS_EXIST), ObjEnvelop.class);
        }
        module = moduleService.addModule(module);
        return success(module, ModuleVO.class);
    }
    @PostMapping(value = BaseRequestMapping.Module.STATUS)
    @ApiOperation(value = "生效/失效")
    public Envelop status(
            @ApiParam(name = "id", value = "id", required = true)
            @RequestParam(value = "id") String id,
            @ApiParam(name = "status", value = "1生效,0失效", required = true)
            @RequestParam(value = "status") Integer status) {
        moduleService.updateStatus(id, status);
        return success("修改成功");
    }
    @GetMapping(value = BaseRequestMapping.Module.IS_NAME_EXIST)
    @ApiOperation(value = "名称是否存在",notes = "返回值中的obj=1表示名称已经存在,0表示名称不存在")
    public ObjEnvelop isNameExist(
            @ApiParam(name = "name", value = "名称", required = true)
            @RequestParam(value = "name") String name) {
        return success(moduleService.isExistName(name));
    }
    @PostMapping(value = BaseRequestMapping.Module.DELETE)
    @ApiOperation(value = "删除")
    public Envelop delete(
@ -56,7 +88,11 @@ public class ModuleEndpoint extends EnvelopRestEndpoint {
            @RequestBody String jsonData) throws Exception {
        ModuleDO module = toEntity(jsonData, ModuleDO.class);
        if (null == module.getId()) {
            return failed("ID不能为空", ObjEnvelop.class);
            return failed(errorCodeUtil.getErrorMsg(BaseErrorCode.Common.ID_IS_NULL), ObjEnvelop.class);
        }
        int count = moduleService.isExistName(module.getName());
        if(count > 1){
            return failed(errorCodeUtil.getErrorMsg(BaseErrorCode.Module.NAME_IS_EXIST), ObjEnvelop.class);
        }
        module = moduleService.save(module);
        return success(module, ModuleVO.class);
@ -93,4 +129,27 @@ public class ModuleEndpoint extends EnvelopRestEndpoint {
        return success(modules, ModuleVO.class);
    }
    @GetMapping(value = BaseRequestMapping.Module.FIND_ALL)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<ModuleVO> findAll (
            @ApiParam(name = "status", value = "状态")
            @RequestParam(value = "status", required = false) String status) throws Exception {
        String filters = null;
        if(StringUtils.isNotBlank(status)){
            filters = "status="+status;
        }
        List<ModuleDO> modules = moduleService.search(null, filters, null);
        List<ModuleVO> moduleVOs = convertToModels(modules,new ArrayList<>(modules.size()),ModuleVO.class);
        Map<String,List<ModuleVO>> map = moduleVOs.stream().collect(Collectors.groupingBy(ModuleVO::getParentId));
        moduleVOs.forEach(module->{
            List<ModuleVO> tmp = map.get(module.getId());
            module.setChildren(tmp);
        });
        moduleVOs = moduleVOs.stream()
                .filter(module -> CommonContant.DEFAULT_PARENTID.equals(module.getParentId()))
                .collect(Collectors.toList());
        return success(moduleVOs);
    }
}

+ 163 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/role/MenuEndpoint.java

@ -0,0 +1,163 @@
package com.yihu.jw.base.endpoint.role;
import com.yihu.jw.base.contant.CommonContant;
import com.yihu.jw.base.service.role.MenuService;
import com.yihu.jw.base.util.ErrorCodeUtil;
import com.yihu.jw.entity.base.role.MenuDO;
import com.yihu.jw.exception.code.BaseErrorCode;
import com.yihu.jw.restmodel.base.role.MenuVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
 * @author yeshijie on 2018/9/26.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.Menu.PREFIX)
@Api(value = "菜单管理", description = "菜单管理服务接口", tags = {"基础服务 - 菜单管理服务接口"})
public class MenuEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private MenuService menuService;
    @Autowired
    private ErrorCodeUtil errorCodeUtil;
    @PostMapping(value = BaseRequestMapping.Menu.CREATE,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<MenuVO> create (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        MenuDO menuDO = toEntity(jsonData, MenuDO.class);
        int count = menuService.isExistName(menuDO.getName());
        if(count>0){
            return failed(errorCodeUtil.getErrorMsg(BaseErrorCode.Menu.NAME_IS_EXIST), ObjEnvelop.class);
        }
        menuDO = menuService.addMenu(menuDO);
        return success(menuDO, MenuVO.class);
    }
    @PostMapping(value = BaseRequestMapping.Menu.MOVE_DOWN)
    @ApiOperation(value = "下移")
    public Envelop moveDown(
            @ApiParam(name = "id", value = "id", required = true)
            @RequestParam(value = "id") String id) {
        menuService.moveDown(id);
        return success("修改成功");
    }
    @PostMapping(value = BaseRequestMapping.Menu.MOVE_UP)
    @ApiOperation(value = "上移")
    public Envelop moveUp(
            @ApiParam(name = "id", value = "id", required = true)
            @RequestParam(value = "id") String id) {
        menuService.moveUp(id);
        return success("修改成功");
    }
    @PostMapping(value = BaseRequestMapping.Menu.STATUS)
    @ApiOperation(value = "生效/失效")
    public Envelop status(
            @ApiParam(name = "id", value = "id", required = true)
            @RequestParam(value = "id") String id,
            @ApiParam(name = "status", value = "1生效,0失效", required = true)
            @RequestParam(value = "status") Integer status) {
        menuService.updateStatus(id, status);
        return success("修改成功");
    }
    @GetMapping(value = BaseRequestMapping.Menu.IS_NAME_EXIST)
    @ApiOperation(value = "名称是否存在",notes = "返回值中的obj=1表示名称已经存在,0表示名称不存在")
    public ObjEnvelop isNameExist(
            @ApiParam(name = "name", value = "菜单名称", required = true)
            @RequestParam(value = "name") String name) {
        return success(menuService.isExistName(name));
    }
    @PostMapping(value = BaseRequestMapping.Menu.UPDATE,consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "更新")
    public Envelop update (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        MenuDO menuDO = toEntity(jsonData, MenuDO.class);
        if (null == menuDO.getId()) {
            return failed(errorCodeUtil.getErrorMsg(BaseErrorCode.Common.ID_IS_NULL), Envelop.class);
        }
        int count = menuService.isExistName(menuDO.getName());
        if(count>1){
            return failed(errorCodeUtil.getErrorMsg(BaseErrorCode.Menu.NAME_IS_EXIST), ObjEnvelop.class);
        }
        menuDO = menuService.save(menuDO);
        return success(menuDO);
    }
    @GetMapping(value = BaseRequestMapping.Menu.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<MenuVO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<MenuDO> menuDOS = menuService.search(fields, filters, sorts, page, size);
        int count = (int)menuService.getCount(filters);
        return success(menuDOS, count, page, size, MenuVO.class);
    }
    @GetMapping(value = BaseRequestMapping.Menu.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<MenuVO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<MenuDO> menuDOS = menuService.search(fields, filters, sorts);
        return success(menuDOS, MenuVO.class);
    }
    @GetMapping(value = BaseRequestMapping.Module.FIND_ALL)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<MenuVO> findAll (
            @ApiParam(name = "status", value = "状态")
            @RequestParam(value = "status", required = false) String status) throws Exception {
        String filters = null;
        if(StringUtils.isNotBlank(status)){
            filters = "status="+status;
        }
        List<MenuDO> menuDOs = menuService.search(null, filters, null);
        List<MenuVO> menuVOs = convertToModels(menuDOs,new ArrayList<>(menuDOs.size()),MenuVO.class);
        Map<String,List<MenuVO>> map = menuVOs.stream().collect(Collectors.groupingBy(MenuVO::getParentId));
        menuVOs.forEach(menu->{
            List<MenuVO> tmp = map.get(menu.getId());
            menu.setChildren(tmp);
        });
        menuVOs = menuVOs.stream()
                .filter(menu -> CommonContant.DEFAULT_PARENTID.equals(menu.getParentId()))
                .collect(Collectors.toList());
        return success(menuVOs);
    }
}

+ 97 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/role/RoleAuthorityEndpoint.java

@ -0,0 +1,97 @@
package com.yihu.jw.base.endpoint.role;
import com.yihu.jw.base.service.role.RoleAuthorityService;
import com.yihu.jw.entity.base.role.RoleAuthorityDO;
import com.yihu.jw.restmodel.base.role.RoleAuthorityVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.PageEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * Endpoint - 角色权限
 * @author progr1mmer 
 * @date Created on 2018/8/16.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.RoleAuthority.PREFIX)
@Api(value = "角色权限管理", description = "角色权限管理服务接口", tags = {"wlyy基础服务 - 角色权限管理服务接口"})
public class RoleAuthorityEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private RoleAuthorityService roleAuthorityService;
    @PostMapping(value = BaseRequestMapping.RoleAuthority.CREATE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<RoleAuthorityVO> create (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        RoleAuthorityDO roleAuthorityDO = toEntity(jsonData, RoleAuthorityDO.class);
        roleAuthorityDO = roleAuthorityService.save(roleAuthorityDO);
        return success(roleAuthorityDO, RoleAuthorityVO.class);
    }
    @PostMapping(value = BaseRequestMapping.RoleAuthority.DELETE)
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        roleAuthorityService.delete(ids.split(","));
        return success("删除成功");
    }
    @PostMapping(value = BaseRequestMapping.RoleAuthority.UPDATE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "更新")
    public Envelop update (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
            @RequestBody String jsonData) throws Exception {
        RoleAuthorityDO roleAuthorityDO = toEntity(jsonData, RoleAuthorityDO.class);
        if (null == roleAuthorityDO.getId()) {
            return failed("ID不能为空", Envelop.class);
        }
        roleAuthorityDO = roleAuthorityService.save(roleAuthorityDO);
        return success(roleAuthorityDO);
    }
    @GetMapping(value = BaseRequestMapping.RoleAuthority.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<RoleAuthorityVO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts,
            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1")
            @RequestParam(value = "page") int page,
            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15")
            @RequestParam(value = "size") int size) throws Exception {
        List<RoleAuthorityDO> roleAuthorityDOS = roleAuthorityService.search(fields, filters, sorts, page, size);
        int count = (int)roleAuthorityService.getCount(filters);
        return success(roleAuthorityDOS, count, page, size, RoleAuthorityVO.class);
    }
    @GetMapping(value = BaseRequestMapping.RoleAuthority.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<RoleAuthorityVO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
            @RequestParam(value = "fields", required = false) String fields,
            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件")
            @RequestParam(value = "filters", required = false) String filters,
            @ApiParam(name = "sorts", value = "排序,规则参见说明文档")
            @RequestParam(value = "sorts", required = false) String sorts) throws Exception {
        List<RoleAuthorityDO> roleAuthorityDOS = roleAuthorityService.search(fields, filters, sorts);
        return success(roleAuthorityDOS, RoleAuthorityVO.class);
    }
}

+ 6 - 6
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/saas/SaasModuleFunctionEndpoint.java

@ -23,14 +23,14 @@ import java.util.List;
 * Created by progr1mmer on 2018/8/16.
 */
@RestController
@RequestMapping(value = BaseRequestMapping.RoleModuleFunction.PREFIX)
@RequestMapping(value = BaseRequestMapping.SaasModuleFunction.PREFIX)
@Api(value = "Saas模块功能管理", description = "Saas模块功能管理服务接口", tags = {"wlyy基础服务 - Saas模块功能管理服务接口"})
public class SaasModuleFunctionEndpoint extends EnvelopRestEndpoint {
    @Autowired
    private SaasModuleFunctionService saasModuleFunctionService;
    @PostMapping(value = BaseRequestMapping.RoleModuleFunction.CREATE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @PostMapping(value = BaseRequestMapping.SaasModuleFunction.CREATE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "创建")
    public ObjEnvelop<SaasModuleFunctionVO> create (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
@ -40,7 +40,7 @@ public class SaasModuleFunctionEndpoint extends EnvelopRestEndpoint {
        return success(saasModuleFunctionDO, SaasModuleFunctionVO.class);
    }
    @PostMapping(value = BaseRequestMapping.RoleModuleFunction.DELETE)
    @PostMapping(value = BaseRequestMapping.SaasModuleFunction.DELETE)
    @ApiOperation(value = "删除")
    public Envelop delete(
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
@ -49,7 +49,7 @@ public class SaasModuleFunctionEndpoint extends EnvelopRestEndpoint {
        return success("删除成功");
    }
    @PostMapping(value = BaseRequestMapping.RoleModuleFunction.UPDATE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @PostMapping(value = BaseRequestMapping.SaasModuleFunction.UPDATE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "更新")
    public Envelop update (
            @ApiParam(name = "json_data", value = "Json数据", required = true)
@ -62,7 +62,7 @@ public class SaasModuleFunctionEndpoint extends EnvelopRestEndpoint {
        return success(saasModuleFunctionDO);
    }
    @GetMapping(value = BaseRequestMapping.RoleModuleFunction.PAGE)
    @GetMapping(value = BaseRequestMapping.SaasModuleFunction.PAGE)
    @ApiOperation(value = "获取分页")
    public PageEnvelop<SaasModuleFunctionVO> page (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")
@ -80,7 +80,7 @@ public class SaasModuleFunctionEndpoint extends EnvelopRestEndpoint {
        return success(saasModuleFunctionDOS, count, page, size, SaasModuleFunctionVO.class);
    }
    @GetMapping(value = BaseRequestMapping.RoleModuleFunction.LIST)
    @GetMapping(value = BaseRequestMapping.SaasModuleFunction.LIST)
    @ApiOperation(value = "获取列表")
    public ListEnvelop<SaasModuleFunctionVO> list (
            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段")

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WeChatQrcodeController.java

@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
 * Created by Trick on 2018/9/7.
 */
@RestController
@RequestMapping(BaseRequestMapping.WeChat.PREFIX)
@RequestMapping(BaseRequestMapping.WeChat.wechat_base)
@Api(value = "微信二维码", description = "微信二维码", tags = {"微信二维码服务 - 微信二维码"})
public class WeChatQrcodeController extends EnvelopRestEndpoint {

+ 44 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WechatController.java

@ -0,0 +1,44 @@
package com.yihu.jw.base.endpoint.wx;
import com.yihu.jw.base.service.wx.WechatService;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.base.BaseRequestMapping;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
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;
import org.springframework.web.bind.annotation.RestController;
/**
 * Created by Trick on 2018/9/26.
 */
@RestController
@RequestMapping(BaseRequestMapping.WeChat.wechat_base)
@Api(value = "微信基础信息管理", description = "微信基础信息管理", tags = {"微信基础 - 微信基础信息管理"})
public class WechatController extends EnvelopRestEndpoint {
    @Autowired
    private WechatService wechatService;
    @GetMapping(value = BaseRequestMapping.WeChat.getWechatInfos)
    @ApiOperation(value = "获取微信基本信息列表", notes = "获取微信基本信息列表")
    public MixEnvelop getWxWechatList(@ApiParam(name = "name", value = "微信名称")
                                      @RequestParam(value = "name", required = false) String name,
                                      @ApiParam(name = "saasName", value = "租户名称")
                                      @RequestParam(value = "saasName", required = false) String saasName,
                                      @ApiParam(name = "status", value = "状态")
                                      @RequestParam(value = "status", required = false) Integer status,
                                      @ApiParam(name = "publicType", value = "微信类型")
                                      @RequestParam(value = "publicType", required = false) Integer publicType,
                                      @ApiParam(name = "page", value = "页码")
                                      @RequestParam(value = "page", required = true) Integer page,
                                      @ApiParam(name = "size", value = "每页大小")
                                      @RequestParam(value = "size", required = true) Integer size) {
        return wechatService.getWxWechatList(name, saasName, status, publicType, page, size);
    }
}

+ 7 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/wx/WxTemplateController.java

@ -28,6 +28,13 @@ public class WxTemplateController extends EnvelopRestEndpoint {
        return wxTemplateService.sendWeTempMesTest(wechatId,openid);
    }
    @PostMapping(value = WechatRequestMapping.WxTemplate.api_getAllTemplate, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ApiOperation(value = "获取所有微信模板", notes = "获取所有微信模板")
    public String  getAllTemp(String wechatId) {
        return wxTemplateService.getAllTemp(wechatId);
    }
//    @PostMapping(value = WechatRequestMapping.WxTemplate.api_create, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
//    @ApiOperation(value = "创建微信模版", notes = "创建微信模版")

+ 6 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/listener/ApplicationReadyListener.java

@ -1,6 +1,7 @@
package com.yihu.jw.base.listener;
import com.yihu.jw.base.activemq.MessageManager;
import com.yihu.jw.base.service.errorCode.ErrorCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
@ -15,10 +16,15 @@ public class ApplicationReadyListener implements ApplicationListener<Application
    @Autowired
    private MessageManager messageManager;
    @Autowired
    private ErrorCodeService errorCodeService;
    @Override
    public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
        //mq消息队列
        messageManager.initConsumer();
        //初始化错误码
        errorCodeService.initErrorCode();
    }
}

+ 15 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/customize/UserHideModuleFunctionService.java

@ -0,0 +1,15 @@
package com.yihu.jw.base.service.customize;
import com.yihu.jw.base.dao.customize.UserHideModuleFunctionDao;
import com.yihu.jw.entity.base.customize.UserHideModuleFunctionDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 * Service - 用户取消订阅的模块或功能
 * @author progr1mmer.
 * @date Created on 2018/9/14.
 */
@Service
public class UserHideModuleFunctionService extends BaseJpaService<UserHideModuleFunctionDO, UserHideModuleFunctionDao> {
}

+ 69 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/errorCode/ErrorCodeService.java

@ -0,0 +1,69 @@
package com.yihu.jw.base.service.errorCode;
import com.yihu.jw.base.dao.errorCode.ErrorCodeDao;
import com.yihu.jw.entity.base.dict.ErrorCodeDO;
import com.yihu.jw.exception.code.BaseErrorCode;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
/**
 * @author yeshijie on 2018/9/26.
 */
@Service
public class ErrorCodeService extends BaseJpaService<ErrorCodeDO, ErrorCodeDao> {
    @Autowired
    private StringRedisTemplate redisTemplate;
    @Autowired
    private ErrorCodeDao errorCodeDao;
    /**
     * 初始化错误码,如果redis没有则查询数据库导入到redis中
     */
    public void initErrorCode(){
        String msg = redisTemplate.opsForValue().get(BaseErrorCode.PREFIX + BaseErrorCode.Common.FAIL_CREATE);
        if(StringUtils.isBlank(msg)){
            Iterable<ErrorCodeDO> list = errorCodeDao.findAll();
            list.forEach(code->{
                redisTemplate.opsForValue().set(BaseErrorCode.PREFIX + code.getErrorCode(),code.getErrorMsg());
            });
        }
    }
    /**
     * 新增
     * @param errorCodeDO
     */
    public ErrorCodeDO addErrorCode(ErrorCodeDO errorCodeDO){
        errorCodeDao.save(errorCodeDO);
        redisTemplate.opsForValue().set(BaseErrorCode.PREFIX + errorCodeDO.getErrorCode(),errorCodeDO.getErrorMsg());
        return errorCodeDO;
    }
    /**
     * 修改
     * @param id
     * @param msg
     */
    public ErrorCodeDO updateMsg(String id,String msg){
        ErrorCodeDO errorCodeDO = errorCodeDao.findOne(id);
        errorCodeDO.setErrorMsg(msg);
        errorCodeDao.save(errorCodeDO);
        redisTemplate.opsForValue().set(BaseErrorCode.PREFIX + errorCodeDO.getErrorCode(),msg);
        return errorCodeDO;
    }
    /**
     * 错误码是否存在
     * @param errorCode
     * @return
     */
    public int isExistsErrorCode(String errorCode){
        return errorCodeDao.isExistsErrorCode(errorCode);
    }
}

+ 16 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/module/InterfaceErrorCodeService.java

@ -0,0 +1,16 @@
package com.yihu.jw.base.service.module;
import com.yihu.jw.base.dao.module.InterfaceErrorCodeDao;
import com.yihu.jw.entity.base.module.InterfaceErrorCodeDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 * 接口错误说明
 * @author yeshijie on 2018/9/28.
 */
@Service
public class InterfaceErrorCodeService extends BaseJpaService<InterfaceErrorCodeDO, InterfaceErrorCodeDao> {
}

+ 16 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/module/InterfaceParamService.java

@ -0,0 +1,16 @@
package com.yihu.jw.base.service.module;
import com.yihu.jw.base.dao.module.InterfaceParamDao;
import com.yihu.jw.entity.base.module.InterfaceParamDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 * 接口入参出参
 * @author yeshijie on 2018/9/28.
 */
@Service
public class InterfaceParamService extends BaseJpaService<InterfaceParamDO, InterfaceParamDao> {
    
}

+ 16 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/module/InterfaceService.java

@ -0,0 +1,16 @@
package com.yihu.jw.base.service.module;
import com.yihu.jw.base.dao.module.InterfaceDao;
import com.yihu.jw.entity.base.module.InterfaceDO;
import com.yihu.mysql.query.BaseJpaService;
import org.springframework.stereotype.Service;
/**
 * 接口
 * @author yeshijie on 2018/9/28.
 */
@Service
public class InterfaceService extends BaseJpaService<InterfaceDO, InterfaceDao> {
}

+ 40 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/service/module/ModuleService.java

@ -1,10 +1,13 @@
package com.yihu.jw.base.service.module;
import com.yihu.jw.entity.base.module.ModuleDO;
import com.yihu.jw.base.contant.CommonContant;
import com.yihu.jw.base.dao.module.ModuleDao;
import com.yihu.jw.entity.base.module.ModuleDO;
import com.yihu.mysql.query.BaseJpaService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
 * Service - 模块
@ -16,4 +19,40 @@ public class ModuleService extends BaseJpaService<ModuleDO, ModuleDao> {
    @Autowired
    private ModuleDao moduleDao;
    /**
     * 新增模块
     * @param moduleDO
     * @return
     */
    public ModuleDO addModule(ModuleDO moduleDO){
        if(StringUtils.isBlank(moduleDO.getParentId())){
            moduleDO.setParentId(CommonContant.DEFAULT_PARENTID);
        }
        moduleDao.save(moduleDO);
        //若新增某必选业务模块,则需为所有已创建的租户和租户类型添加此业务模块
        return moduleDO;
    }
    /**
     * 设置生效和失效
     * @param id
     * @param status
     */
    @Transactional(rollbackFor = Exception.class)
    public void updateStatus(String id,Integer status){
        moduleDao.updateStatus(id,status);
        //若原业务模块为失效/生效,操作生效/失效后的变更逻辑如以下流程图所示
    }
    /**
     * 名称是否存在
     * @param name
     * @return
     */
    public int isExistName(String name){
        return moduleDao.isExistName(name);
    }
}

+ 0 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/service/role/MenuService.java


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels