Browse Source

基础信息

Progr1mmer 6 years ago
parent
commit
be0aa8cf68
100 changed files with 1855 additions and 1231 deletions
  1. 4 2
      common/common-entity/src/main/java/com/yihu/jw/entity/base/module/ModuleDO.java
  2. 0 33
      common/common-entity/src/main/java/com/yihu/jw/entity/base/role/RoleDO.java
  3. 0 61
      common/common-entity/src/main/java/com/yihu/jw/entity/base/role/RoleModuleFunctionDO.java
  4. 6 17
      common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasDO.java
  5. 10 7
      common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasDefaultModuleFunctionDO.java
  6. 50 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasModuleFunctionDO.java
  7. 18 17
      common/common-entity/src/main/java/com/yihu/jw/entity/base/system/SystemDictDO.java
  8. 1 0
      common/common-entity/src/main/java/com/yihu/jw/entity/base/theme/ThemeDO.java
  9. 0 2
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/BaseRoleMenuDO.java
  10. 0 250
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/EmployDO.java
  11. 1 1
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserDO.java
  12. 12 8
      common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserRoleDO.java
  13. 1 1
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/CommonContants.java
  14. 1 2
      common/common-fegin/src/main/java/com/yihu/jw/fegin/DemoFeign.java
  15. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/archives/ArchivesFeign.java
  16. 0 48
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/FunctionFeign.java
  17. 0 54
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/ModuleFeign.java
  18. 0 26
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SaasFeign.java
  19. 0 45
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SystemDictFeign.java
  20. 0 48
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/base/SystemDictListFeign.java
  21. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/login/LoginFeign.java
  22. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/sms/RegisterSmsFeign.java
  23. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/BaseMenuFeign.java
  24. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/BaseRoleFeign.java
  25. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/user/EmployFeign.java
  26. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/version/UserVersionFeign.java
  27. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/AccessTokenFeign.java
  28. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/GraphicMessageFeign.java
  29. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatFeign.java
  30. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatMenuFeign.java
  31. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/base/wx/WechatTemplateFeign.java
  32. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/common/security/LoginSmsFeign.java
  33. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/common/IotFileUploadFeign.java
  34. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/common/IotSystemDictFeign.java
  35. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/company/IotCompanyFeign.java
  36. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataInputFeign.java
  37. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataSearchFeign.java
  38. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/data_input/DataStandardConvertFeign.java
  39. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceFeign.java
  40. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceOrderFeign.java
  41. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotDeviceQualityFeign.java
  42. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/device/IotPatientDeviceFeign.java
  43. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/iot/product/IotProductFeign.java
  44. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementFeign.java
  45. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementKpiFeign.java
  46. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyyAgreementKpiLogFeign.java
  47. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/agreement/WlyySignFamilyFeign.java
  48. 1 1
      common/common-fegin/src/main/java/com/yihu/jw/fegin/wlyy/patient/AdvertisementFeign.java
  49. 1 0
      common/common-request-mapping/src/main/java/com/yihu/jw/rm/base/BaseRequestMapping.java
  50. 4 0
      common/common-rest-model/pom.xml
  51. 25 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/AssignedIdentityVO.java
  52. 8 62
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/base/FunctionVO.java
  53. 25 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/IntegerIdentityVO.java
  54. 77 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/IntegerIdentityVOWithOperator.java
  55. 29 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/UuidIdentityVO.java
  56. 83 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/UuidIdentityVOWithOperator.java
  57. 0 137
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/base/ModuleVO.java
  58. 0 99
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/base/SaasVO.java
  59. 0 86
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/base/SystemDictListVO.java
  60. 0 70
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/base/SystemDictVO.java
  61. 82 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/function/FunctionVO.java
  62. 78 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/module/ModuleVO.java
  63. 44 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/role/RoleVO.java
  64. 45 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/saas/SaasDefaultModuleFunctionVO.java
  65. 48 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/saas/SaasModuleFunctionVO.java
  66. 106 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/saas/SaasVO.java
  67. 49 34
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsGatewayVO.java
  68. 60 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/sms/SmsTemplateVO.java
  69. 81 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/system/SystemDictEntryVO.java
  70. 71 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/system/SystemDictVO.java
  71. 25 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/theme/ThemeVO.java
  72. 36 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/user/UserRoleVO.java
  73. 160 0
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/user/UserVO.java
  74. 0 24
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/gateway/GatewayContanrts.java
  75. 4 3
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/Envelop.java
  76. 1 1
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/ListEnvelop.java
  77. 6 6
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/MixEnvelop.java
  78. 2 2
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/ObjEnvelop.java
  79. 6 6
      common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/PageEnvelop.java
  80. 0 4
      common/common-web/pom.xml
  81. 23 1
      common/common-web/src/main/java/com/yihu/jw/web/handler/GlobalExceptionHandler.java
  82. 16 0
      gateway/ag-basic/pom.xml
  83. 41 0
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/config/ComplexRouteConfig.java
  84. 82 0
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/config/ComplexRouteEndPoint.java
  85. 251 0
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/config/ComplexRouteLocator.java
  86. 55 0
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/config/JdbcZuulRouteService.java
  87. 1 1
      gateway/ag-basic/src/main/java/com/yihu/jw/gateway/config/WebSecurityConfig.java
  88. 46 5
      gateway/ag-basic/src/main/resources/application.yml
  89. 9 1
      gateway/ag-basic/src/main/resources/bootstrap.yml
  90. 16 0
      server/svr-authentication/pom.xml
  91. 6 8
      server/svr-discovery/src/main/java/com/yihu/jw/endpoint/DiscoveryEndpoint.java
  92. 0 12
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/ModuleFunctionDao.java
  93. 0 13
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/RoleModuleFunctionDao.java
  94. 2 1
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/SaasDefaultModuleFunctionDao.java
  95. 13 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/SaasModuleFunctionDao.java
  96. 1 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/ThemeDao.java
  97. 1 1
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/UserDao.java
  98. 1 0
      svr/svr-base/src/main/java/com/yihu/jw/base/dao/UserRoleDao.java
  99. 2 3
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/function/FunctionEndpoint.java
  100. 0 0
      svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/module/ModuleEndpoint.java

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

@ -18,7 +18,9 @@ import java.util.List;
public class ModuleDO extends UuidIdentityEntityWithOperator {
	/**
	 * 0-禁用,1-可用,2-不可用
	 * 0 - 禁用
	 * 1 - 可用
	 * 2 - 不可用
	 */
    public enum Status {
		disable,
@ -59,7 +61,7 @@ public class ModuleDO extends UuidIdentityEntityWithOperator {
		this.parentId = parentId;
	}
    @Column(name = "status", precision = 2, scale = 0)
    @Column(name = "status")
    public Status getStatus() {
        return status;
    }

+ 0 - 33
common/common-entity/src/main/java/com/yihu/jw/entity/base/role/RoleDO.java

@ -14,37 +14,13 @@ import javax.persistence.Table;
@Table(name = "base_role")
public class RoleDO extends UuidIdentityEntityWithOperator {
	//saas id
	private String saasId;
	//所属应用
	private String clientId;
	//角色名称
	private String name;
	//角色编码
	private String code;
	//备注
	private String remark;
	//是否系统管理员
	private Boolean isSystem;
	@Column(name = "saas_id", nullable = false, length = 50)
	public String getSaasId() {
		return this.saasId;
	}
	public void setSaasId(String saasId) {
		this.saasId = saasId;
	}
	@Column(name = "client_id", nullable = false, length = 10)
	public String getClientId() {
		return clientId;
	}
	public void setClientId(String clientId) {
		this.clientId = clientId;
	}
	@Column(name = "name", length = 50)
	public String getName() {
		return this.name;
@ -54,15 +30,6 @@ public class RoleDO extends UuidIdentityEntityWithOperator {
		this.name = name;
	}
	@Column(name = "code", length = 8)
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Column(name = "remark")
	public String getRemark() {
		return this.remark;

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

@ -1,61 +0,0 @@
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 - 角色模块功能
 * Created by progr1mmer on 2018/8/14.
 */
@Entity
@Table(name = "base_role_module_function")
public class RoleModuleFunctionDO extends IntegerIdentityEntity {
    //角色ID
    private String roleId;
    //模块ID
    private String moduleId;
    //功能ID
    private String functionId;
    //是否启用
    private Boolean isEnabled;
    @Column(name = "role_id", nullable = false)
    public String getRoleId() {
        return roleId;
    }
    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }
    @Column(name = "module_id", nullable = false)
    public String getModuleId() {
        return moduleId;
    }
    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }
    @Column(name = "function_id", nullable = false)
    public String getFunctionId() {
        return functionId;
    }
    public void setFunctionId(String functionId) {
        this.functionId = functionId;
    }
    @Column(name = "is_enabled", nullable = false)
    public Boolean getEnabled() {
        return isEnabled;
    }
    public void setEnabled(Boolean enabled) {
        isEnabled = enabled;
    }
}

+ 6 - 17
common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasDO.java

@ -40,11 +40,10 @@ public class SaasDO extends UuidIdentityEntityWithOperator {
	private Status status; //状态  0待审核 1审核通过 2审核不通过 3已删除
	private String remark; //备注
	private String logo; //远程fastDFS文件地址
    private Integer theme; //主题ID
    private Type type; //类型
	private String manager; //管理员 - 关联user表id字段
	private String email; //管理员邮箱
	private String phone; //管理员手机号码
	private String mobile; //管理员手机号码
	@Column(name = "org_code", nullable = false)
	public String getOrgCode() {
@ -91,15 +90,6 @@ public class SaasDO extends UuidIdentityEntityWithOperator {
		this.logo = logo;
	}
	@Column(name = "theme")
	public Integer getTheme() {
		return theme;
	}
	public void setTheme(Integer theme) {
		this.theme = theme;
	}
	@Column(name = "type", nullable = false)
	public Type getType() {
		return type;
@ -127,13 +117,12 @@ public class SaasDO extends UuidIdentityEntityWithOperator {
		this.email = email;
	}
	@Column(name = "phone")
	public String getPhone() {
		return phone;
	@Column(name = "mobile")
	public String getMobile() {
		return mobile;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
}

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

@ -7,24 +7,27 @@ import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Entity - Saas初始化的时候分配给Saas管理员角色的模块功能
 * Entity - Saas默认模块功能
 * Created by progr1mmer on 2018/8/14.
 */
@Entity
@Table(name = "base_saas_default_module_function")
public class SaasDefaultModuleFunctionDO extends IntegerIdentityEntity {
    private SaasDO.Type type;
    //Saas类型
    private SaasDO.Type saasType;
    //模块ID
    private String moduleId;
    //功能ID
    private String functionId;
    @Column(name = "type", nullable = false)
    public SaasDO.Type getType() {
        return type;
    @Column(name = "saas_type", nullable = false)
    public SaasDO.Type getSaasType() {
        return saasType;
    }
    public void setType(SaasDO.Type type) {
        this.type = type;
    public void setSaasType(SaasDO.Type saasType) {
        this.saasType = saasType;
    }
    @Column(name = "module_id", nullable = false, length = 50)

+ 50 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/saas/SaasModuleFunctionDO.java

@ -0,0 +1,50 @@
package com.yihu.jw.entity.base.saas;
import com.yihu.jw.entity.IntegerIdentityEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Entity - Saas所分配的模块功能
 * Created by progr1mmer on 2018/8/27.
 */
@Entity
@Table(name = "base_saas_module_function")
public class SaasModuleFunctionDO extends IntegerIdentityEntity {
    //Saas ID
    private String saasId;
    //模块ID
    private String moduleId;
    //功能ID
    private String functionId;
    @Column(name = "saas_id", nullable = false, length = 50)
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    @Column(name = "module_id", nullable = false, length = 50)
    public String getModuleId() {
        return moduleId;
    }
    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }
    @Column(name = "function_id", nullable = false, length = 50)
    public String getFunctionId() {
        return functionId;
    }
    public void setFunctionId(String functionId) {
        this.functionId = functionId;
    }
}

+ 18 - 17
common/common-entity/src/main/java/com/yihu/jw/entity/base/system/SystemDictDO.java

@ -1,10 +1,9 @@
package com.yihu.jw.entity.base.system;// default package
import com.yihu.jw.entity.UuidIdentityEntity;
import org.hibernate.annotations.GenericGenerator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.*;
import java.io.Serializable;
/**
 * Entity - 系统字典
@ -12,7 +11,7 @@ import javax.persistence.Table;
 */
@Entity
@Table(name = "base_system_dict")
public class SystemDictDO extends UuidIdentityEntity {
public class SystemDictDO implements Serializable {
	public enum Type {
		//基础字典
@ -21,11 +20,10 @@ public class SystemDictDO extends UuidIdentityEntity {
		extend
	}
	// Fields
	//saas id 用于租户的自定义字典
	private String saasId;
	//编码(唯一)
	private String code;
	//saas id 用于租户的自定义字典
	private String saasId;
	//拼音码
	private String pyCode;
	//名称
@ -33,15 +31,9 @@ public class SystemDictDO extends UuidIdentityEntity {
	//类型
	private Type type;
	@Column(name = "saas_id")
	public String getSaasId() {
		return saasId;
	}
	public void setSaasId(String saasId) {
		this.saasId = saasId;
	}
	@Id
	@GeneratedValue(generator = "generator")
	@GenericGenerator(name = "generator", strategy = "assigned")
	@Column(name = "code", nullable = false, length = 50)
	public String getCode() {
		return code;
@ -51,6 +43,15 @@ public class SystemDictDO extends UuidIdentityEntity {
		this.code = code;
	}
	@Column(name = "saas_id")
	public String getSaasId() {
		return saasId;
	}
	public void setSaasId(String saasId) {
		this.saasId = saasId;
	}
	@Column(name = "py_code", nullable = false, length = 50)
	public String getPyCode() {
		return pyCode;

+ 1 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/theme/ThemeDO.java

@ -7,6 +7,7 @@ import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * Entity - 主题风格
 * Created by progr1mmer on 2018/8/14.
 */
@Entity

+ 0 - 2
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/BaseRoleMenuDO.java

@ -17,8 +17,6 @@ public class BaseRoleMenuDO extends UuidIdentityEntity implements java.io.Serial
	private String roleId;
	private String menuId;
	// Constructors
	/** default constructor */
	public BaseRoleMenuDO() {
	}

+ 0 - 250
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/EmployDO.java

@ -1,250 +0,0 @@
package com.yihu.jw.entity.base.user;
import com.yihu.jw.entity.UuidIdentityEntityWithOperator;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * BaseEmploy entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "base_employ")
public class EmployDO extends UuidIdentityEntityWithOperator {
	// Fields
	private String saasId; //saasIDF
	private String name; //名字
	private String pyCode; //拼音
	private String ssc;//医保卡号
	private String sex; //性别
	private String photo; //头像
	private String skill;//专长
	private String workPortal;//医生门户首页
	private String email;//邮箱
	private String phone;//联系电话
	private String password;//账户密码
	private String salt;//账户密码的盐
	private String idcard;//身份证号
	private String secondPhone;//备用电话
	private String familyTel;//家庭电话(固)
	private String officeTel;//办公电话(固)
	private String introduction;//简介
	private String jxzc;//教学职称
	private String lczc;//临床职称
	private String xlzc;//学历职称
	private String xzzc;//行政职称
	private Integer status;//-1 删除 0 禁用 1可用
	// Constructors
	/** default constructor */
	public EmployDO() {
	}
	/** minimal constructor */
	public EmployDO(String id, String saasId) {
		this.id = id;
		this.saasId = saasId;
	}
	@Column(name = "saas_id", nullable = false, length = 50)
	public String getSaasId() {
		return this.saasId;
	}
	public void setSaasId(String saasId) {
		this.saasId = saasId;
	}
	@Column(name = "name", length = 50)
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "py_code", length = 50)
	public String getPyCode() {
		return this.pyCode;
	}
	public void setPyCode(String pyCode) {
		this.pyCode = pyCode;
	}
	@Column(name = "sex", length = 10)
	public String getSex() {
		return this.sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	@Column(name = "photo", length = 256)
	public String getPhoto() {
		return this.photo;
	}
	public void setPhoto(String photo) {
		this.photo = photo;
	}
	@Column(name = "skill", length = 100)
	public String getSkill() {
		return this.skill;
	}
	public void setSkill(String skill) {
		this.skill = skill;
	}
	@Column(name = "work_portal", length = 256)
	public String getWorkPortal() {
		return this.workPortal;
	}
	public void setWorkPortal(String workPortal) {
		this.workPortal = workPortal;
	}
	@Column(name = "email", length = 64)
	public String getEmail() {
		return this.email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	@Column(name = "phone", length = 20)
	public String getPhone() {
		return this.phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	@Column(name = "second_phone", length = 20)
	public String getSecondPhone() {
		return this.secondPhone;
	}
	public void setSecondPhone(String secondPhone) {
		this.secondPhone = secondPhone;
	}
	@Column(name = "family_tel", length = 20)
	public String getFamilyTel() {
		return this.familyTel;
	}
	public void setFamilyTel(String familyTel) {
		this.familyTel = familyTel;
	}
	@Column(name = "office_tel", length = 20)
	public String getOfficeTel() {
		return this.officeTel;
	}
	public void setOfficeTel(String officeTel) {
		this.officeTel = officeTel;
	}
	@Column(name = "introduction", length = 256)
	public String getIntroduction() {
		return this.introduction;
	}
	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}
	@Column(name = "jxzc", length = 50)
	public String getJxzc() {
		return this.jxzc;
	}
	public void setJxzc(String jxzc) {
		this.jxzc = jxzc;
	}
	@Column(name = "lczc", length = 50)
	public String getLczc() {
		return this.lczc;
	}
	public void setLczc(String lczc) {
		this.lczc = lczc;
	}
	@Column(name = "xlzc", length = 50)
	public String getXlzc() {
		return this.xlzc;
	}
	public void setXlzc(String xlzc) {
		this.xlzc = xlzc;
	}
	@Column(name = "xzzc", length = 50)
	public String getXzzc() {
		return this.xzzc;
	}
	public void setXzzc(String xzzc) {
		this.xzzc = xzzc;
	}
	@Column(name = "status")
	public Integer getStatus() {
		return this.status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	@Column(name = "password")
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	@Column(name = "salt")
	public String getSalt() {
		return salt;
	}
	public void setSalt(String salt) {
		this.salt = salt;
	}
	@Column(name = "idcard")
	public String getIdcard() {
		return idcard;
	}
	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}
	@Column(name = "ssc")
	public String getSsc() {
		return ssc;
	}
	public void setSsc(String ssc) {
		this.ssc = ssc;
	}
}

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

@ -8,7 +8,7 @@ import javax.persistence.Table;
import java.util.Date;
/**
 * Entity - 用户
 * Entity - 后台管理员
 * Created by progr1mmer on 2018/8/20.
 */
@Entity

+ 12 - 8
common/common-entity/src/main/java/com/yihu/jw/entity/base/user/UserRoleDO.java

@ -7,15 +7,17 @@ import javax.persistence.Entity;
import javax.persistence.Table;
/**
 * BaseEmployRole entity. @author MyEclipse Persistence Tools
 * Entity - 用户角色
 * Created by progr1mmer on 2018/8/27.
 */
@Entity
@Table(name = "base_user_role")
public class UserRoleDO extends IntegerIdentityEntity {
	// Fields
	//用户ID
	private String userId;
	private String roleCode;
	//角色ID
	private String roleId;
	@Column(name = "user_id", length = 50)
	public String getUserId() {
@ -26,12 +28,14 @@ public class UserRoleDO extends IntegerIdentityEntity {
		this.userId = userId;
	}
	@Column(name = "role_code", length = 16)
	public String getRoleCode() {
		return roleCode;
	@Column(name = "role_id", length = 50)
	public String getRoleId() {
		return roleId;
	}
	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}
}

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

@ -1,4 +1,4 @@
package com.yihu.jw.restmodel;
package com.yihu.jw.common;
/**
 * Created by chenweida on 2017/10/24.

+ 1 - 2
common/common-fegin/src/main/java/com/yihu/jw/fegin/DemoFeign.java

@ -1,8 +1,7 @@
package com.yihu.jw.fegin;
import com.yihu.jw.common.Contants;
import com.yihu.jw.fegin.fallbackfactory.DemoFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.archives;
import com.yihu.jw.fegin.fallbackfactory.archives.ArchivesFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.archives.PatientArchivesInfoVO;
import com.yihu.jw.restmodel.archives.PatientArchivesVO;
import com.yihu.jw.restmodel.web.MixEnvelop;

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

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

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

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

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

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

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

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

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

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

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.base.login;
import com.yihu.jw.fegin.fallbackfactory.base.base.LoginFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.rm.base.BaseLoginRequestMapping;

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

@ -1,6 +1,6 @@
package com.yihu.jw.fegin.base.sms;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.rm.base.BaseSmsRequestMapping;
import io.swagger.annotations.ApiParam;

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

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.user.BaseMenuFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.BaseUserRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.user.BaseRoleFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.BaseUserRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.base.user;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.user.EmployeeFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.BaseUserRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.base.version;
import com.yihu.jw.fegin.fallbackfactory.base.version.UserVersionFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.fegin.fallbackfactory.base.wx.AccessTokenFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.wx.GraphicMessageFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.wx.WechatFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.wx.WechatMenuFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -2,7 +2,7 @@ package com.yihu.jw.fegin.base.wx;
import com.yihu.jw.exception.business.JiWeiException;
import com.yihu.jw.fegin.fallbackfactory.base.wx.WechatTemplateFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.base.WechatRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -1,6 +1,6 @@
package com.yihu.jw.fegin.common.security;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.rm.base.BaseLoginRequestMapping;
import com.yihu.jw.rm.base.BaseRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.iot.common;
import com.yihu.jw.fegin.fallbackfactory.iot.common.IotFileUploadFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.common.UploadVO;
import com.yihu.jw.rm.iot.IotRequestMapping;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.iot.common;
import com.yihu.jw.fegin.fallbackfactory.iot.common.IotSystemDictFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.dict.IotSystemDictVO;
import com.yihu.jw.rm.iot.IotRequestMapping;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.iot.company;
import com.yihu.jw.fegin.fallbackfactory.iot.company.IotCompanyFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.company.IotCompanyCertificateVO;
import com.yihu.jw.restmodel.iot.company.IotCompanyVO;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.iot.data_input;
import com.yihu.jw.fegin.fallbackfactory.iot.data_input.DataInputFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.DataRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.iot.data_input;
import com.yihu.jw.fegin.fallbackfactory.iot.data_input.DataSearchFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.DataRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.iot.data_input;
import com.yihu.jw.fegin.fallbackfactory.iot.data_input.DataStandardConvertFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.iot.DataRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.iot.device;
import com.yihu.jw.fegin.fallbackfactory.iot.device.IotDeviceFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.iot.common.ExistVO;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.iot.device;
import com.yihu.jw.fegin.fallbackfactory.iot.device.IotDeviceOrderFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceOrderVO;
import com.yihu.jw.restmodel.iot.device.IotOrderPurchaseVO;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.iot.device;
import com.yihu.jw.fegin.fallbackfactory.iot.device.IotDeviceQualityFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceQualityInspectionPlanVO;
import com.yihu.jw.rm.iot.IotRequestMapping;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.iot.device;
import com.yihu.jw.fegin.fallbackfactory.iot.device.IotPatientDeviceFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.device.IotDeviceVO;
import com.yihu.jw.restmodel.iot.device.IotPatientDeviceVO;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.iot.product;
import com.yihu.jw.fegin.fallbackfactory.iot.product.IotProductFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.restmodel.iot.product.IotMaintenanceUnitVO;
import com.yihu.jw.restmodel.iot.product.IotProductBaseInfoVO;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyyAgreementFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyyAgreementKpiFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyyAgreementKpiLogFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.wlyy.agreement;
import com.yihu.jw.fegin.fallbackfactory.wlyy.agreement.WlyySignFamilyFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -1,7 +1,7 @@
package com.yihu.jw.fegin.wlyy.patient;
import com.yihu.jw.fegin.fallbackfactory.wlyy.patient.AdvertisementFeignFallbackFactory;
import com.yihu.jw.restmodel.CommonContants;
import com.yihu.jw.common.CommonContants;
import com.yihu.jw.restmodel.web.MixEnvelop;
import com.yihu.jw.rm.wlyy.WlyyRequestMapping;
import org.springframework.cloud.netflix.feign.FeignClient;

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

@ -40,6 +40,7 @@ public class BaseRequestMapping {
     */
    public static class Module extends Basic {
        public static final String PREFIX  = "/module";
    }
    /**

+ 4 - 0
common/common-rest-model/pom.xml

@ -35,6 +35,10 @@
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-exception</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-entity</artifactId>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-annotations</artifactId>

+ 25 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/AssignedIdentityVO.java

@ -0,0 +1,25 @@
package com.yihu.jw.restmodel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
 * Basic VO - 自定义主键类型基类
 * Created by progr1mmer on 2018/8/13.
 */
public abstract class AssignedIdentityVO implements Serializable {
    @ApiModelProperty(value = "id", example = "iREOlyuyKfRBIGOHbBGJ" )
    protected String id;
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
}

+ 8 - 62
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/base/FunctionVO.java

@ -1,20 +1,16 @@
package com.yihu.jw.restmodel.base.base;
package com.yihu.jw.restmodel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.*;
import java.util.Date;
/**
 * Created by chenweida on 2017/5/19.
 * Created by progr1mmer on 2018/8/13.
 */
@ApiModel(value = "FunctionVO", description = "功能")
public class FunctionVO implements Serializable {
    @ApiModelProperty(value = "id", example = "1" )
    protected String id;
public abstract class AssignedIdentityVOWithOperator extends AssignedIdentityVO {
    @ApiModelProperty(value = "创建日期", example = "2018-03-14 11:35:34" )
    protected Date createTime;
    @ApiModelProperty(value = "创建者", example = "0dae0003590016e5b3865e377b2f8615" )
@ -27,28 +23,8 @@ public class FunctionVO implements Serializable {
    protected String updateUser;
    @ApiModelProperty(value = "修改者用户名", example = "Progr1mmer" )
    protected String updateUserName;
    //功能名称
    @ApiModelProperty(value = "名称", example = "功能1" )
    private String name;
    //网关url前缀
    @ApiModelProperty(value = "网关url前缀", example = "/base" )
    private String prefix;
    //功能对应的后台url路径
    @ApiModelProperty(value = "功能对应的后台url路径", example = "/function/list" )
    private String url;
    //备注
    @ApiModelProperty(value = "备注", example = "我是备注" )
    private String remark;
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCreateTime() {
        return createTime;
    }
@ -73,7 +49,7 @@ public class FunctionVO implements Serializable {
        this.createUserName = createUserName;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getUpdateTime() {
        return updateTime;
    }
@ -86,6 +62,7 @@ public class FunctionVO implements Serializable {
        return updateUser;
    }
    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }
@ -98,35 +75,4 @@ public class FunctionVO implements Serializable {
        this.updateUserName = updateUserName;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getPrefix() {
        return prefix;
    }
    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }
    public String getUrl() {
        return url;
    }
    public void setUrl(String url) {
        this.url = url;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
}

+ 25 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/IntegerIdentityVO.java

@ -0,0 +1,25 @@
package com.yihu.jw.restmodel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
 * Basic Entity - Integer类型的主键基类
 * Created by progr1mmer on 2018/8/13.
 */
public abstract class IntegerIdentityVO implements Serializable {
    @ApiModelProperty(value = "id", example = "1" )
    protected Integer id;
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
}

+ 77 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/IntegerIdentityVOWithOperator.java

@ -0,0 +1,77 @@
package com.yihu.jw.restmodel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * Created by progr1mmer on 2018/8/13.
 */
public abstract class IntegerIdentityVOWithOperator extends IntegerIdentityVO {
    @ApiModelProperty(value = "创建日期", example = "2018-03-14 11:35:34" )
    protected Date createTime;
    @ApiModelProperty(value = "创建者", example = "0dae0003590016e5b3865e377b2f8615" )
    protected String createUser;
    @ApiModelProperty(value = "创建者用户名", example = "Progr1mmer" )
    protected String createUserName;
    @ApiModelProperty(value = "修改日期", example = "2018-03-14 11:35:34" )
    protected Date updateTime;
    @ApiModelProperty(value = "修改者", example = "0dae0003590016e5b3865e377b2f8615" )
    protected String updateUser;
    @ApiModelProperty(value = "修改者用户名", example = "Progr1mmer" )
    protected String updateUserName;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    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;
    }
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    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;
    }
}

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

@ -0,0 +1,29 @@
/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.jw.restmodel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
 * Basic VO - UUID类型的主键基类
 * Created by progr1mmer on 2018/8/13.
 */
public abstract class UuidIdentityVO implements Serializable {
	@ApiModelProperty(value = "id", example = "402803ee656498890165649ad2da1112" )
	protected String id;  // 非业务主键
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
}

+ 83 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/UuidIdentityVOWithOperator.java

@ -0,0 +1,83 @@
/*******************************************************************************
 * Copyright (c) 2005, 2014 springside.github.io
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package com.yihu.jw.restmodel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * 统一定义id的entity基类.
 * 主键生成策略是UUID
 * 还包含业务表用的 创建人,创建时间 创建人名  修改人,修改时间 修改人名
 * @author calvin
 */
// JPA 基类的标识
public abstract class UuidIdentityVOWithOperator extends UuidIdentityVO {
	@ApiModelProperty(value = "创建日期", example = "2018-03-14 11:35:34" )
	protected Date createTime;
	@ApiModelProperty(value = "创建者", example = "0dae0003590016e5b3865e377b2f8615" )
	protected String createUser;
	@ApiModelProperty(value = "创建者用户名", example = "Progr1mmer" )
	protected String createUserName;
	@ApiModelProperty(value = "修改日期", example = "2018-03-14 11:35:34" )
	protected Date updateTime;
	@ApiModelProperty(value = "修改者", example = "0dae0003590016e5b3865e377b2f8615" )
	protected String updateUser;
	@ApiModelProperty(value = "修改者用户名", example = "Progr1mmer" )
	protected String updateUserName;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	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;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	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;
	}
}

+ 0 - 137
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/base/ModuleVO.java

@ -1,137 +0,0 @@
package com.yihu.jw.restmodel.base.base;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * Created by chenweida on 2017/5/19.
 */
public class ModuleVO{
    private String id;
    private String name; //模块名称
    private String saasId; //关联 Saas code
    private String parentCode;//父id
    private Integer status; //-1 删除 0 禁用 可用
    private String createUser;
    private String createUserName;
    private Date createTime;
    private String updateUser;
    private String updateUserName;
    private Date updateTime;
    private String remark;
    private String state ;   //closed:表示有子节点   open:表示没有子节点
    private List<ModuleVO> children = new ArrayList<>();
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getParentCode() {
        return parentCode;
    }
    public void setParentCode(String parentCode) {
        this.parentCode = parentCode;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    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 String getState() {
        return state;
    }
    public void setState(String state) {
        this.state = state;
    }
    public List<ModuleVO> getChildren() {
        return children;
    }
    public void setChildren(List<ModuleVO> children) {
        this.children = children;
    }
}

+ 0 - 99
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/base/SaasVO.java

@ -1,99 +0,0 @@
package com.yihu.jw.restmodel.base.base;
import java.util.Date;
/**
 * Created by chenweida on 2017/5/19.
 */
public class SaasVO {
    private String id;
    private String name;//名称
    private Integer status;//状态 -1 已删除 0待审核 1审核通过 2 审核不通过
    private String createUser; //创建人code
    private String createUserName;//创建人名称
    private Date createTime;//创建时间
    private String modifyUser;//修改人
    private String modifyUserName;//修改人名称
    private Date modifyTime;//修改时间
    private String remark;//备注
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public Integer getStatus() {
        return status;
    }
    public void setStatus(Integer status) {
        this.status = status;
    }
    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 getModifyUser() {
        return modifyUser;
    }
    public void setModifyUser(String modifyUser) {
        this.modifyUser = modifyUser;
    }
    public String getModifyUserName() {
        return modifyUserName;
    }
    public void setModifyUserName(String modifyUserName) {
        this.modifyUserName = modifyUserName;
    }
    public Date getModifyTime() {
        return modifyTime;
    }
    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
}

+ 0 - 86
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/base/SystemDictListVO.java

@ -1,86 +0,0 @@
package com.yihu.jw.restmodel.base.base;
public class SystemDictListVO {
    private String dictName;
    private String chineseName;
    private String pyCode;
    private String pid;
    private String remark;
    private String relationTable;
    private String relationColCode;
    private String relationColValue;
    private String relationColExtend;
    public String getDictName() {
        return dictName;
    }
    public void setDictName(String dictName) {
        this.dictName = dictName;
    }
    public String getChineseName() {
        return chineseName;
    }
    public void setChineseName(String chineseName) {
        this.chineseName = chineseName;
    }
    public String getPyCode() {
        return pyCode;
    }
    public void setPyCode(String pyCode) {
        this.pyCode = pyCode;
    }
    public String getPid() {
        return pid;
    }
    public void setPid(String pid) {
        this.pid = pid;
    }
    public String getRemark() {
        return remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public String getRelationTable() {
        return relationTable;
    }
    public void setRelationTable(String relationTable) {
        this.relationTable = relationTable;
    }
    public String getRelationColCode() {
        return relationColCode;
    }
    public void setRelationColCode(String relationColCode) {
        this.relationColCode = relationColCode;
    }
    public String getRelationColValue() {
        return relationColValue;
    }
    public void setRelationColValue(String relationColValue) {
        this.relationColValue = relationColValue;
    }
    public String getRelationColExtend() {
        return relationColExtend;
    }
    public void setRelationColExtend(String relationColExtend) {
        this.relationColExtend = relationColExtend;
    }
}

+ 0 - 70
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/base/SystemDictVO.java

@ -1,70 +0,0 @@
package com.yihu.jw.restmodel.base.base;
import java.util.Date;
public class SystemDictVO {
    private String id;
    private String saasId;
    private String dictName;
    private String code;
    private String value;
    private String pyCode;
    private Integer sort;
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getDictName() {
        return dictName;
    }
    public void setDictName(String dictName) {
        this.dictName = dictName;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getValue() {
        return value;
    }
    public void setValue(String value) {
        this.value = value;
    }
    public String getPyCode() {
        return pyCode;
    }
    public void setPyCode(String pyCode) {
        this.pyCode = pyCode;
    }
    public Integer getSort() {
        return sort;
    }
    public void setSort(Integer sort) {
        this.sort = sort;
    }
}

+ 82 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/function/FunctionVO.java

@ -0,0 +1,82 @@
package com.yihu.jw.restmodel.base.function;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * VO - 功能
 * Created by progr1mmer on 2018/8/14.
 */
@ApiModel(value = "FunctionVO", description = "功能")
public class FunctionVO extends UuidIdentityVOWithOperator {
    //关联 base_module ID
    @ApiModelProperty(value = "关联 base_module ID", example = "0dae0003590016e5b3865e377b2f8615")
    private String moduleId;
    //功能名称
    @ApiModelProperty(value = "功能名称", example = "功能1")
    private String name;
    //网关url前缀
    @ApiModelProperty(value = "网关url前缀", example = "/base")
    private String prefix;
    //功能对应的后台url路径
    @ApiModelProperty(value = "功能对应的后台url路径", example = "/function/list")
    private String url;
    //备注
    @ApiModelProperty(value = "备注", example = "我是备注")
    private String remark;
    //用于jstree显示
    @ApiModelProperty(value = "用于jstree显示")
    private String text;
    public String getModuleId() {
        return this.moduleId;
    }
    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }
    public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getPrefix() {
        return prefix;
    }
    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }
    public String getUrl() {
        return url;
    }
    public void setUrl(String url) {
        this.url = url;
    }
    public String getRemark() {
        return this.remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public String getText() {
        return name;
    }
    public void setText(String text) {
        this.text = text;
    }
}

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

@ -0,0 +1,78 @@
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;
import java.util.ArrayList;
import java.util.List;
/**
 * VO - 模块
 * Created by Progr1mmer on 2018/8/24.
 */
@ApiModel(value = "ModuleVO", description = "模块")
public class ModuleVO extends UuidIdentityVOWithOperator {
    @ApiModelProperty(value = "模块名称", example = "模块1")
    private String name;
    @ApiModelProperty(value = "父ID", example = "402803ee656498890165649ad2da0000")
    private String parentId;
    @ApiModelProperty(value = "状态", example = "disable")
    private ModuleDO.Status status;
    @ApiModelProperty(value = "备注", example = "我是备注")
    private String remark;
    @ApiModelProperty(value = "节点信息(closed-表示有子节点,open-表示没有子节点)", example = "open")
    private String state ;
    @ApiModelProperty(value = "子集")
    private List<ModuleVO> children = new ArrayList<>();
    public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getParentId() {
        return parentId;
    }
    public void setParentId(String parentId) {
        this.parentId = parentId;
    }
    public ModuleDO.Status getStatus() {
        return status;
    }
    public void setStatus(ModuleDO.Status status) {
        this.status = status;
    }
    public String getRemark() {
        return this.remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public String getState() {
        return state;
    }
    public void setState(String state) {
        this.state = state;
    }
    public List<ModuleVO> getChildren() {
        return children;
    }
    public void setChildren(List<ModuleVO> children) {
        this.children = children;
    }
}

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

@ -0,0 +1,44 @@
package com.yihu.jw.restmodel.base.role;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * VO - 角色
 * Created by progr1mmer on 2018/8/14.
 */
@ApiModel(value = "RoleVO", description = "角色")
public class RoleVO extends UuidIdentityVOWithOperator {
	@ApiModelProperty(value = "角色名称", example = "超级管理员")
	private String name;
	@ApiModelProperty(value = "备注", example = "我是备注")
	private String remark;
	@ApiModelProperty(value = "是否系统管理员", example = "1")
	private Boolean isSystem;
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getRemark() {
		return this.remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public Boolean getSystem() {
		return isSystem;
	}
	public void setSystem(Boolean system) {
		isSystem = system;
	}
}

+ 45 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/saas/SaasDefaultModuleFunctionVO.java

@ -0,0 +1,45 @@
package com.yihu.jw.restmodel.base.saas;
import com.yihu.jw.entity.base.saas.SaasDO;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * VO - Saas默认模块功能
 * Created by progr1mmer on 2018/8/14.
 */
@ApiModel(value = "SaasDefaultModuleFunctionVO", description = "Saas默认模块功能")
public class SaasDefaultModuleFunctionVO extends IntegerIdentityVO {
    @ApiModelProperty(value = "Saas类型", example = "familyDoctor")
    private SaasDO.Type saasType;
    @ApiModelProperty(value = "模块ID", example = "402303ee656498890234sf9ad2wa00sa")
    private String moduleId;
    @ApiModelProperty(value = "功能ID", example = "402303ee656498890sd24s9ad2wa00sd")
    private String functionId;
    public SaasDO.Type getSaasType() {
        return saasType;
    }
    public void setSaasType(SaasDO.Type saasType) {
        this.saasType = saasType;
    }
    public String getModuleId() {
        return moduleId;
    }
    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }
    public String getFunctionId() {
        return functionId;
    }
    public void setFunctionId(String functionId) {
        this.functionId = functionId;
    }
}

+ 48 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/saas/SaasModuleFunctionVO.java

@ -0,0 +1,48 @@
package com.yihu.jw.restmodel.base.saas;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * VO - Saas所分配的模块功能
 * Created by progr1mmer on 2018/8/27.
 */
@ApiModel(value = "SaasModuleFunctionVO", description = "Saas所分配的模块功能")
public class SaasModuleFunctionVO extends IntegerIdentityVO {
    //Saas ID
    @ApiModelProperty(value = "Saas ID", example = "402303ee65634dfs0234sf9ad2wa00d2")
    private String saasId;
    //模块ID
    @ApiModelProperty(value = "模块ID", example = "402303ee656498890234sf9ad2wa00sa")
    private String moduleId;
    //功能ID
    @ApiModelProperty(value = "功能ID", example = "402303ee656498890sd24s9ad2wa00sd")
    private String functionId;
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getModuleId() {
        return moduleId;
    }
    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }
    public String getFunctionId() {
        return functionId;
    }
    public void setFunctionId(String functionId) {
        this.functionId = functionId;
    }
}

+ 106 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/saas/SaasVO.java

@ -0,0 +1,106 @@
package com.yihu.jw.restmodel.base.saas;// default package
import com.yihu.jw.entity.base.saas.SaasDO;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * VO - SAAS
 * Created by progr1mmer on 2018/8/14.
 */
@ApiModel(value = "SaasVO", description = "SAAS")
public class SaasVO extends UuidIdentityVOWithOperator {
	@ApiModelProperty(value = "机构编码", example = "495323X")
	private String orgCode;
	@ApiModelProperty(value = "系统名称", example = "厦门医疗服务")
	private String name;
	@ApiModelProperty(value = "状态", example = "auditPassed")
	private SaasDO.Status status;
	@ApiModelProperty(value = "备注", example = "我是备注")
	private String remark;
	@ApiModelProperty(value = "远程fastDFS文件地址", example = "group1:M00/97/E9/wKgyJltp1i-AHHf6AAAvRXBaR18423.zip")
	private String logo;
	@ApiModelProperty(value = "类型", example = "familyDoctor")
    private SaasDO.Type type;
	@ApiModelProperty(value = "管理员 - 关联user表id字段", example = "402303ee656498890165649ad2wa00sd")
	private String manager;
	@ApiModelProperty(value = "管理员邮箱", example = "admin@jkzl.com")
	private String email;
	@ApiModelProperty(value = "管理员手机号码", example = "18888888888")
	private String mobile;
	public String getOrgCode() {
		return orgCode;
	}
	public void setOrgCode(String orgCode) {
		this.orgCode = orgCode;
	}
	public String getName() {
		return this.name;
	}
	public void setName(String name) {
		this.name = name;
	}
    public SaasDO.Status getStatus() {
        return status;
    }
    public void setStatus(SaasDO.Status status) {
        this.status = status;
    }
	public String getRemark() {
		return this.remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public String getLogo() {
		return logo;
	}
	public void setLogo(String logo) {
		this.logo = logo;
	}
	public SaasDO.Type getType() {
		return type;
	}
	public void setType(SaasDO.Type type) {
		this.type = type;
	}
	public String getManager() {
		return manager;
	}
	public void setManager(String manager) {
		this.manager = manager;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getMobile() {
		return mobile;
	}
	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
}

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

@ -1,25 +1,33 @@
package com.yihu.jw.restmodel.base.sms;
import com.yihu.jw.entity.base.sms.SmsGatewayDO;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * Created by chenweida on 2017/5/22.
 * VO - 短信网关
 * Created by Progr1mmer on 2018/8/27.
 */
public class SmsGatewayVO {
    private String id;
    private String name;//名称
    private String saasId; //关联 base_saas code
    private String orgCode; //机构code
    private String ip; // 短信接口的ip地址
    private String username;  //短信接口的账号
    private String password;	//短信接口的密码
    private String url;	//短信接口的url
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
@ApiModel(value = "SmsGatewayVO", description = "短信网关")
public class SmsGatewayVO extends UuidIdentityVO {
    @ApiModelProperty(value = "saas id", example = "402803ee656498890165649ad2da0000")
    private String saasId;
    @ApiModelProperty(value = "网关名称", example = "基础短信网关")
    private String name;
    @ApiModelProperty(value = "短信接口的账号", example = "user123")
    private String username;
    @ApiModelProperty(value = "短信接口的密码", example = "password123")
    private String password;
    @ApiModelProperty(value = "官网地址", example = "http://www.smsgateway.com")
    private String website;
    @ApiModelProperty(value = "短信接口调用的地址", example = "http://www.smsgateway.com/api/v1.0")
    private String url;
    @ApiModelProperty(value = "调用凭证(json串)", example = "{\"app_id\":\"EwC0iRSrcS\",\"signature\":\"iREOlyuyKfRBIGOHbBGJ\"}")
    private String certificate;
    @ApiModelProperty(value = "状态", example = "available")
    private SmsGatewayDO.Status status;
    public String getSaasId() {
        return saasId;
@ -29,20 +37,12 @@ public class SmsGatewayVO {
        this.saasId = saasId;
    }
    public String getOrgCode() {
        return orgCode;
    }
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }
    public String getIp() {
        return ip;
    public String getName() {
        return name;
    }
    public void setIp(String ip) {
        this.ip = ip;
    public void setName(String name) {
        this.name = name;
    }
    public String getUsername() {
@ -61,6 +61,14 @@ public class SmsGatewayVO {
        this.password = password;
    }
    public String getWebsite() {
        return website;
    }
    public void setWebsite(String website) {
        this.website = website;
    }
    public String getUrl() {
        return url;
    }
@ -69,12 +77,19 @@ public class SmsGatewayVO {
        this.url = url;
    }
    public String getCertificate() {
        return certificate;
    }
    public void setCertificate(String certificate) {
        this.certificate = certificate;
    }
    public String getName() {
        return name;
    public SmsGatewayDO.Status getStatus() {
        return status;
    }
    public void setName(String name) {
        this.name = name;
    public void setStatus(SmsGatewayDO.Status status) {
        this.status = status;
    }
}

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

@ -0,0 +1,60 @@
package com.yihu.jw.restmodel.base.sms;
import com.yihu.jw.entity.base.sms.SmsTemplateDO;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * VO - 短信模板
 * Created by progr1mmer on 2018/8/14.
 */
@ApiModel(value = "SmsTemplateVO", description = "短信网关")
public class SmsTemplateVO extends UuidIdentityVO {
    //应用ID
    @ApiModelProperty(value = "应用ID", example = "EwC0iRSrcS")
    private String clientId;
    //标签
    @ApiModelProperty(value = "标签", example = "login")
    private SmsTemplateDO.Type type;
    //头部
    @ApiModelProperty(value = "头部", example = "【i健康综合管理平台】")
    private String header;
    //内容
    @ApiModelProperty(value = "内容", example = "您的登陆验证码为:2313")
    private String content;
    public String getClientId() {
        return clientId;
    }
    public void setClientId(String clientId) {
        this.clientId = clientId;
    }
    public SmsTemplateDO.Type getType() {
        return type;
    }
    public void setType(SmsTemplateDO.Type type) {
        this.type = type;
    }
    public String getHeader() {
        return header;
    }
    public void setHeader(String header) {
        this.header = header;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
}

+ 81 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/system/SystemDictEntryVO.java

@ -0,0 +1,81 @@
package com.yihu.jw.restmodel.base.system;
import com.yihu.jw.restmodel.UuidIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * VO - 系统字典项
 * Created by progr1mmer on 2018/8/27.
 */
@ApiModel(value = "SystemDictEntryVO", description = "系统字典项")
public class SystemDictEntryVO extends UuidIdentityVO {
	//所属字典编码
	@ApiModelProperty(value = "所属字典编码", example = "SYSTEM_SETTING")
	private String dictCode;
	//编码
	@ApiModelProperty(value = "编码", example = "CURRENT_CITY")
	private String code;
	//拼音码
	@ApiModelProperty(value = "拼音码", example = "DQCS")
	private String pyCode;
	//值
	@ApiModelProperty(value = "值", example = "厦门")
	private String value;
	//排序
	@ApiModelProperty(value = "排序", example = "1")
	private Integer sort;
	//备注
	@ApiModelProperty(value = "备注", example = "我是备注")
	private String remark;
	public String getDictCode() {
		return dictCode;
	}
	public void setDictCode(String dictCode) {
		this.dictCode = dictCode;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getPyCode() {
		return pyCode;
	}
	public void setPyCode(String pyCode) {
		this.pyCode = pyCode;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	public Integer getSort() {
		return sort;
	}
	public void setSort(Integer sort) {
		this.sort = sort;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
}

+ 71 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/system/SystemDictVO.java

@ -0,0 +1,71 @@
package com.yihu.jw.restmodel.base.system;
import com.yihu.jw.entity.base.system.SystemDictDO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
 * VO - 系统字典
 * Created by progr1mmer on 2018/8/27.
 */
@ApiModel(value = "SystemDictVO", description = "系统字典")
public class SystemDictVO implements Serializable {
    //编码(唯一)
    @ApiModelProperty(value = "编码(唯一)", example = "SYSTEM_SETTING")
    private String code;
    //saas id 用于租户的自定义字典
    @ApiModelProperty(value = "saas id 用于租户的自定义字典")
    private String saasId;
    //拼音码
    @ApiModelProperty(value = "拼音码", example = "XTSZ")
    private String pyCode;
    //名称
    @ApiModelProperty(value = "名称", example = "系统设置")
    private String name;
    //类型
    @ApiModelProperty(value = "类型", example = "basic")
    private SystemDictDO.Type type;
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getSaasId() {
        return saasId;
    }
    public void setSaasId(String saasId) {
        this.saasId = saasId;
    }
    public String getPyCode() {
        return pyCode;
    }
    public void setPyCode(String pyCode) {
        this.pyCode = pyCode;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public SystemDictDO.Type getType() {
        return type;
    }
    public void setType(SystemDictDO.Type type) {
        this.type = type;
    }
}

+ 25 - 0
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/base/theme/ThemeVO.java

@ -0,0 +1,25 @@
package com.yihu.jw.restmodel.base.theme;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * VO - 主题风格
 * Created by progr1mmer on 2018/8/14.
 */
@ApiModel(value = "ThemeVO", description = "主题风格")
public class ThemeVO extends IntegerIdentityVO {
    //主题风格
    @ApiModelProperty(value = "主题风格", example = "dark")
    private String style;
    public String getStyle() {
        return style;
    }
    public void setStyle(String style) {
        this.style = style;
    }
}

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

@ -0,0 +1,36 @@
package com.yihu.jw.restmodel.base.user;
import com.yihu.jw.restmodel.IntegerIdentityVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * VO - 用户角色
 * Created by progr1mmer on 2018/8/27.
 */
@ApiModel(value = "UserRoleVO", description = "用户角色")
public class UserRoleVO extends IntegerIdentityVO {
	@ApiModelProperty(value = "用户ID", example = "402303ee65634dfs0234sf9a324a0023")
	private String userId;
	@ApiModelProperty(value = "角色ID", example = "232303ee65634dfs0234sf9ad2wa00cd")
	private String roleId;
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public String getRoleId() {
		return roleId;
	}
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}
}

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

@ -0,0 +1,160 @@
package com.yihu.jw.restmodel.base.user;
import com.yihu.jw.entity.base.user.UserDO;
import com.yihu.jw.restmodel.UuidIdentityVOWithOperator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/**
 * VO - 后台管理员
 * Created by progr1mmer on 2018/8/20.
 */
@ApiModel(value = "UserVO", description = "角色")
public class UserVO extends UuidIdentityVOWithOperator {
    //用户名
    @ApiModelProperty(value = "用户名", example = "wangxiaoming")
    private String username;
    //密码
    @ApiModelProperty(value = "密码", example = "25f9e794323b453885f5181f1b624d0b")
    private String password;
    //密码散列值
    @ApiModelProperty(value = "密码散列值", example = "Wsd2")
    private String salt;
    //姓名
    @ApiModelProperty(value = "姓名", example = "王小明")
    private String name;
    //性别
    @ApiModelProperty(value = "性别", example = "male")
    private UserDO.Gender gender;
    //身份证号码
    @ApiModelProperty(value = "身份证号码", example = "42210119750809601X")
    private String idcard;
    //手机号码
    @ApiModelProperty(value = "手机号码", example = "18888888888")
    private String phone;
    //邮箱
    @ApiModelProperty(value = "邮箱", example = "wxm@jkzl.com")
    private String email;
    //是否可用
    @ApiModelProperty(value = "是否可用", example = "1")
    private Boolean isEnabled;
    //是否锁定
    @ApiModelProperty(value = "是否锁定", example = "1")
    private Boolean isLocked;
    //锁定时间
    @ApiModelProperty(value = "锁定时间", example = "2018-08-27 13:23:32")
    private Date lockedDate;
    //最后登陆时间
    @ApiModelProperty(value = "最后登陆时间", example = "2018-08-26 12:33:22")
    private Date loginDate;
    //登陆失败次数
    @ApiModelProperty(value = "登陆失败次数", example = "0")
    private Integer loginFailureCount;
    public String getUsername() {
        return username;
    }
    public void setUsername(String username) {
        this.username = username;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public String getSalt() {
        return salt;
    }
    public void setSalt(String salt) {
        this.salt = salt;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public UserDO.Gender getGender() {
        return gender;
    }
    public void setGender(UserDO.Gender gender) {
        this.gender = gender;
    }
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    public Boolean getEnabled() {
        return isEnabled;
    }
    public void setEnabled(Boolean enabled) {
        isEnabled = enabled;
    }
    public Boolean getLocked() {
        return isLocked;
    }
    public void setLocked(Boolean locked) {
        isLocked = locked;
    }
    public Date getLockedDate() {
        return lockedDate;
    }
    public void setLockedDate(Date lockedDate) {
        this.lockedDate = lockedDate;
    }
    public Date getLoginDate() {
        return loginDate;
    }
    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }
    public Integer getLoginFailureCount() {
        return loginFailureCount;
    }
    public void setLoginFailureCount(Integer loginFailureCount) {
        this.loginFailureCount = loginFailureCount;
    }
}

+ 0 - 24
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/gateway/GatewayContanrts.java

@ -1,24 +0,0 @@
package com.yihu.jw.restmodel.gateway;
/**
 * Created by chenweida on 2017/6/19.
 */
public class GatewayContanrts {
    /**
     * 日志切面用的静态类
     */
    public static final class ZipkinElasticKey {
        static public String gateway_input_params = "gateway_input_params";
        static public String gateway_out_params = "gateway_output_params";
        static public String gateway_error_params = "gateway_error_params";
    }
    /**
     * 登陆报错用的静态类
     */
    public static final class LoginErrorMessage {
        static public String account_no_exists = "用户不存在";
        static public String password_error = "密码错误";
    }
}

+ 4 - 3
common/common-rest-model/src/main/java/com/yihu/jw/restmodel/web/Envelop.java

@ -8,16 +8,17 @@ import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
 * Created by chenweida on 2018/1/16.
 * Rest Model - 基类
 * Created by Progr1mmer on 2018/8/24.
 * 快速集成 {@link com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint}
 */
@JsonInclude(JsonInclude.Include.ALWAYS)
@ApiModel(value = "Envelop", description = "基础实体")
public class Envelop implements Serializable {
    @ApiModelProperty("信息")
    @ApiModelProperty(value = "信息", example = "success")
    protected String message;
    @ApiModelProperty("状态(200成功,-1是失败)")
    @ApiModelProperty(value = "状态(200 - 成功)", example = "200")
    protected Integer status = EnvelopStatus.success.code;
    public Integer getStatus() {

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

@ -22,7 +22,7 @@ import java.util.List;
 * @author llh
 */
@JsonInclude(JsonInclude.Include.ALWAYS)
@ApiModel(value = "ListEnvelop<T>", description = "获取实体列表返回")
@ApiModel(value = "ListEnvelop<T>", description = "列表实体")
public class ListEnvelop<T> extends Envelop {
    @ApiModelProperty(value = "列表内容")

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

@ -28,22 +28,22 @@ public class MixEnvelop<T, J> extends Envelop {
    private static final long serialVersionUID = 2076324875575488461L;
    @ApiModelProperty("当前页")
    @ApiModelProperty(value = "当前页", example = "1")
    private int currPage = 1;
    @ApiModelProperty("每页大小 默认10")
    @ApiModelProperty(value = "每页大小 默认10", example = "15")
    private int pageSize = 10;
    @ApiModelProperty("总共多少页")
    @ApiModelProperty(value = "总共多少页", example = "2")
    private int totalPage;
    @ApiModelProperty("总共多少数据")
    @ApiModelProperty(value = "总共多少数据", example = "20")
    private int totalCount;
    @ApiModelProperty("列表内容")
    @ApiModelProperty(value = "列表内容")
    private List<T> detailModelList = new ArrayList<>(0);
    @ApiModelProperty("实体内容")
    @ApiModelProperty(value = "实体内容")
    private J obj = (J)new HashMap<>(0);
    public int getCurrPage() {

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

@ -21,10 +21,10 @@ import java.util.HashMap;
 * @author llh
 */
@JsonInclude(JsonInclude.Include.ALWAYS)
@ApiModel(value = "ObjEnvelop<J>", description = "获取单个实体信息返回")
@ApiModel(value = "ObjEnvelop<J>", description = "单个实体")
public class ObjEnvelop<J> extends Envelop {
    @ApiModelProperty("内容")
    @ApiModelProperty(value = "内容")
    private J obj = (J)new HashMap<>(0);
    public J getObj() {

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

@ -23,24 +23,24 @@ import java.util.List;
 * @author llh
 */
@JsonInclude(JsonInclude.Include.ALWAYS)
@ApiModel(value = "PageEnvelop<T>", description = "分页查询返回")
@ApiModel(value = "PageEnvelop<T>", description = "分页实体")
public class PageEnvelop<T> extends Envelop implements Serializable {
    private static final long serialVersionUID = 2076324875575488461L;
    @ApiModelProperty("当前页")
    @ApiModelProperty(value = "当前页", example = "1")
    private int currPage = 1;
    @ApiModelProperty("每页大小 默认10")
    @ApiModelProperty(value = "每页大小 默认10", example = "15")
    private int pageSize = 10;
    @ApiModelProperty("总共多少页")
    @ApiModelProperty(value = "总共多少页", example = "2")
    private int totalPage;
    @ApiModelProperty("总共多少数据")
    @ApiModelProperty(value = "总共多少数据", example = "20")
    private int totalCount;
    @ApiModelProperty("所有满足条件的实体")
    @ApiModelProperty(value = "列表内容")
    private List<T> detailModelList = new ArrayList<>(0);
    public int getCurrPage() {

+ 0 - 4
common/common-web/pom.xml

@ -33,10 +33,6 @@
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-rest-model</artifactId>
        </dependency>
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-exception</artifactId>

+ 23 - 1
common/common-web/src/main/java/com/yihu/jw/web/handler/GlobalExceptionHandler.java

@ -1,7 +1,6 @@
package com.yihu.jw.web.handler;
import com.yihu.jw.exception.ApiException;
import com.yihu.jw.restmodel.web.Envelop;
import feign.FeignException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -54,4 +53,27 @@ public class GlobalExceptionHandler {
        return envelop;
    }
    private class Envelop {
        private String message;
        private Integer status;
        public String getMessage() {
            return message;
        }
        public void setMessage(String message) {
            this.message = message;
        }
        public Integer getStatus() {
            return status;
        }
        public void setStatus(Integer status) {
            this.status = status;
        }
    }
}

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

@ -80,6 +80,22 @@
        </dependency>
        <!-- Redis  -->
        <!-- JdbcTemplate-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-dbcp2</artifactId>
        </dependency>
        <!-- JdbcTemplate-->
        <dependency>
            <groupId>com.yihu.jw</groupId>
            <artifactId>common-web</artifactId>

+ 41 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/config/ComplexRouteConfig.java

@ -0,0 +1,41 @@
package com.yihu.jw.gateway.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.cloud.netflix.zuul.filters.ZuulProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;
/**
 * Created by progr1mmer on 2018/8/24.
 */
@Configuration
public class ComplexRouteConfig {
    @Value("${zuul.config-priority:false}")
    private Boolean configPriority;
    @Autowired
    private ZuulProperties zuulProperties;
    @Autowired
    private ServerProperties server;
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Bean
    public JdbcZuulRouteService jdbcZuulRouteService(JdbcTemplate jdbcTemplate){
        return new JdbcZuulRouteService(jdbcTemplate);
    }
    @Bean
    public ComplexRouteLocator routeLocator() {
        return new ComplexRouteLocator(
                server.getServletPrefix(),
                zuulProperties,
                jdbcZuulRouteService(jdbcTemplate),
                configPriority);
    }
}

+ 82 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/config/ComplexRouteEndPoint.java

@ -0,0 +1,82 @@
package com.yihu.jw.gateway.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.netflix.zuul.filters.ZuulProperties;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
/**
 * Created by progr1mmer on 2018/8/24.
 */
@RestController
@RequestMapping("/route")
public class ComplexRouteEndPoint {
    @Autowired
    private ComplexRouteLocator complexRouteLocator;
    @Autowired
    private JdbcZuulRouteService jdbcZuulRouteService;
    @PostMapping
    public String save (
            //主键
            @RequestParam(name = "id") String id,
            //网关暴露出去的路径   例:/v1/simple2/**"
            @RequestParam(name = "path") String path,
            //注册到微服务的Id
            @RequestParam(name = "serviceId", required = false) String serviceId,
            //跳转的路径   例:http://localhost:10010/
            @RequestParam(name = "url", required = false) String url,
            //失败是否重试
            @RequestParam(name = "retryable", required = false, defaultValue = "true") Boolean retryable) {
        ZuulProperties.ZuulRoute ruleRoute = new ZuulProperties.ZuulRoute();
        ruleRoute.setId(id);
        // Prepend with slash if not already present.
        if (!path.startsWith("/")) {
            path = "/" + path;
        }
        if (StringUtils.hasText(complexRouteLocator.getProperties().getPrefix())) {
            path = complexRouteLocator.getProperties().getPrefix() + path;
            if (!path.startsWith("/")) {
                path = "/" + path;
            }
        }
        ruleRoute.setPath(path);
        ruleRoute.setServiceId(serviceId);
        ruleRoute.setRetryable(retryable);
        ruleRoute.setUrl(url);
        jdbcZuulRouteService.addZuulRoute(ruleRoute);
        complexRouteLocator.refresh();
        return "success";
    }
    @DeleteMapping
    public String remove (
            @RequestParam(name = "id") String id) {
        jdbcZuulRouteService.removeZuulRoute(id);
        complexRouteLocator.getProperties().getRoutes().remove(id);
        complexRouteLocator.refresh();
        return "success";
    }
    @PutMapping
    public String enable(
            @RequestParam(name = "id") String id,
            @RequestParam(name = "enabled") Integer enabled) {
        jdbcZuulRouteService.updateZuulRouteEnable(id, enabled);
        complexRouteLocator.getProperties().getRoutes().remove(id);
        complexRouteLocator.refresh();
        return "success";
    }
    @GetMapping
    public List<ZuulProperties.ZuulRoute> getRules() {
        List<ZuulProperties.ZuulRoute> zuulRoutes = new ArrayList<>();
        complexRouteLocator.getProperties().getRoutes().forEach((key, val) -> zuulRoutes.add(val));
        return zuulRoutes;
    }
}

+ 251 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/config/ComplexRouteLocator.java

@ -0,0 +1,251 @@
package com.yihu.jw.gateway.config;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.cloud.netflix.zuul.filters.RefreshableRouteLocator;
import org.springframework.cloud.netflix.zuul.filters.Route;
import org.springframework.cloud.netflix.zuul.filters.SimpleRouteLocator;
import org.springframework.cloud.netflix.zuul.filters.ZuulProperties;
import org.springframework.cloud.netflix.zuul.util.RequestUtils;
import org.springframework.core.Ordered;
import org.springframework.util.AntPathMatcher;
import org.springframework.util.PathMatcher;
import org.springframework.util.StringUtils;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
/**
 * Created by progr1mmer on 2018/8/24.
 */
public class ComplexRouteLocator implements RefreshableRouteLocator, Ordered {
    private static final Log log = LogFactory.getLog(SimpleRouteLocator.class);
    private static final int DEFAULT_ORDER = 0;
    private ZuulProperties properties;
    private PathMatcher pathMatcher = new AntPathMatcher();
    private String dispatcherServletPath = "/";
    private String zuulServletPath;
    private AtomicReference<Map<String, ZuulProperties.ZuulRoute>> routes = new AtomicReference<>();
    private int order = DEFAULT_ORDER;
    private final JdbcZuulRouteService jdbcZuulRouteService;
    private final boolean configPriority;
    public ComplexRouteLocator(
            String servletPath,
            ZuulProperties properties,
            JdbcZuulRouteService jdbcZuulRouteService,
            boolean configPriority) {
        this.properties = properties;
        if (StringUtils.hasText(servletPath)) {
            this.dispatcherServletPath = servletPath;
        }
        this.zuulServletPath = properties.getServletPath();
        this.jdbcZuulRouteService = jdbcZuulRouteService;
        this.configPriority = configPriority;
    }
    @Override
    public List<Route> getRoutes() {
        List<Route> values = new ArrayList<>();
        for (Map.Entry<String, ZuulProperties.ZuulRoute> entry : getRoutesMap().entrySet()) {
            ZuulProperties.ZuulRoute route = entry.getValue();
            String path = route.getPath();
            values.add(getRoute(route, path));
        }
        return values;
    }
    @Override
    public Collection<String> getIgnoredPaths() {
        return this.properties.getIgnoredPatterns();
    }
    @Override
    public Route getMatchingRoute(final String path) {
        return getSimpleMatchingRoute(path);
    }
    protected Map<String, ZuulProperties.ZuulRoute> getRoutesMap() {
        if (this.routes.get() == null) {
            this.routes.set(locateRoutes());
        }
        return this.routes.get();
    }
    protected Route getSimpleMatchingRoute(final String path) {
        if (log.isDebugEnabled()) {
            log.debug("Finding route for path: " + path);
        }
        // This is called for the initialization done in getRoutesMap()
        getRoutesMap();
        if (log.isDebugEnabled()) {
            log.debug("servletPath=" + this.dispatcherServletPath);
            log.debug("zuulServletPath=" + this.zuulServletPath);
            log.debug("RequestUtils.isDispatcherServletRequest()="
                    + RequestUtils.isDispatcherServletRequest());
            log.debug("RequestUtils.isZuulServletRequest()="
                    + RequestUtils.isZuulServletRequest());
        }
        String adjustedPath = adjustPath(path);
        ZuulProperties.ZuulRoute route = getZuulRoute(adjustedPath);
        return getRoute(route, adjustedPath);
    }
    protected ZuulProperties.ZuulRoute getZuulRoute(String adjustedPath) {
        if (!matchesIgnoredPatterns(adjustedPath)) {
            for (Map.Entry<String, ZuulProperties.ZuulRoute> entry : getRoutesMap().entrySet()) {
                String pattern = entry.getKey();
                log.debug("Matching pattern:" + pattern);
                if (this.pathMatcher.match(pattern, adjustedPath)) {
                    return entry.getValue();
                }
            }
        }
        return null;
    }
    protected Route getRoute(ZuulProperties.ZuulRoute route, String path) {
        if (route == null) {
            return null;
        }
        if (log.isDebugEnabled()) {
            log.debug("route matched=" + route);
        }
        String targetPath = path;
        String prefix = this.properties.getPrefix();
        if(prefix.endsWith("/")) {
            prefix = prefix.substring(0, prefix.length() - 1);
        }
        if (path.startsWith(prefix + "/") && this.properties.isStripPrefix()) {
            targetPath = path.substring(prefix.length());
        }
        if (route.isStripPrefix()) {
            int index = route.getPath().indexOf("*") - 1;
            if (index > 0) {
                String routePrefix = route.getPath().substring(0, index);
                targetPath = targetPath.replaceFirst(routePrefix, "");
                prefix = prefix + routePrefix;
            }
        }
        Boolean retryable = this.properties.getRetryable();
        if (route.getRetryable() != null) {
            retryable = route.getRetryable();
        }
        return new Route(route.getId(), targetPath, route.getLocation(), prefix,
                retryable,
                route.isCustomSensitiveHeaders() ? route.getSensitiveHeaders() : null,
                route.isStripPrefix());
    }
    /**
     * Calculate all the routes and set up a cache for the values. Subclasses can call
     * this method if they need to implement {@link RefreshableRouteLocator}.
     */
    protected void doRefresh() {
        this.routes.set(locateRoutes());
    }
    /**
     * Compute a map of path pattern to route. The default is just a static map from the
     * {@link ZuulProperties}, but subclasses can add dynamic calculations.
     */
    protected Map<String, ZuulProperties.ZuulRoute> locateRoutes() {
        LinkedHashMap<String, ZuulProperties.ZuulRoute> routesMap = new LinkedHashMap<>();
        List<ZuulProperties.ZuulRoute> zuulRoutes = jdbcZuulRouteService.loadEnabledZuulRoutes();
        zuulRoutes.forEach(item -> {
            if (configPriority) {
                if (properties.getRoutes().containsKey(item.getId())) {
                    return;
                }
            }
            String path = item.getPath();
            if (!path.startsWith("/")) {
                path = "/" + path;
            }
            if (StringUtils.hasText(this.properties.getPrefix())) {
                path = this.properties.getPrefix() + path;
                if (!path.startsWith("/")) {
                    path = "/" + path;
                }
            }
            item.setPath(path);
            this.properties.getRoutes().put(item.getId(), item);
        });
        for (ZuulProperties.ZuulRoute route : this.properties.getRoutes().values()) {
            routesMap.put(route.getPath(), route);
        }
        return routesMap;
    }
    protected boolean matchesIgnoredPatterns(String path) {
        for (String pattern : this.properties.getIgnoredPatterns()) {
            log.debug("Matching ignored pattern:" + pattern);
            if (this.pathMatcher.match(pattern, path)) {
                log.debug("Path " + path + " matches ignored pattern " + pattern);
                return true;
            }
        }
        return false;
    }
    private String adjustPath(final String path) {
        String adjustedPath = path;
        if (RequestUtils.isDispatcherServletRequest()
                && StringUtils.hasText(this.dispatcherServletPath)) {
            if (!this.dispatcherServletPath.equals("/")) {
                adjustedPath = path.substring(this.dispatcherServletPath.length());
                log.debug("Stripped dispatcherServletPath");
            }
        }
        else if (RequestUtils.isZuulServletRequest()) {
            if (StringUtils.hasText(this.zuulServletPath)
                    && !this.zuulServletPath.equals("/")) {
                adjustedPath = path.substring(this.zuulServletPath.length());
                log.debug("Stripped zuulServletPath");
            }
        }
        else {
            // do nothing
        }
        log.debug("adjustedPath=" + adjustedPath);
        return adjustedPath;
    }
    @Override
    public int getOrder() {
        return order;
    }
    public void setOrder(int order) {
        this.order = order;
    }
    @Override
    public void refresh() {
        doRefresh();
    }
    public ZuulProperties getProperties() {
        return properties;
    }
}

+ 55 - 0
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/config/JdbcZuulRouteService.java

@ -0,0 +1,55 @@
package com.yihu.jw.gateway.config;
import org.springframework.cloud.netflix.zuul.filters.ZuulProperties;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import java.util.List;
/**
 * Created by progr1mmer on 2018/8/24.
 */
public class JdbcZuulRouteService {
    private final JdbcTemplate jdbcTemplate;
    public JdbcZuulRouteService(JdbcTemplate jdbcTemplate){
        this.jdbcTemplate = jdbcTemplate;
    }
    public void addZuulRoute(ZuulProperties.ZuulRoute zuulRoute) {
        jdbcTemplate.update("insert into zuul_route (id, path, service_id, url, "
                + "retryable, enabled) values (?, ?, ?, ?, ?, ?)", getFieldsForUpdate(zuulRoute));
    }
    public int removeZuulRoute(String id) {
        return jdbcTemplate.update("delete from zuul_route where id = ?", id);
    }
    public int updateZuulRouteEnable(String id, int enabled) {
        return jdbcTemplate.update("update zuul_route set enabled = ? where id = ?", new Object[]{enabled, id});
    }
    public List<ZuulProperties.ZuulRoute> loadZuulRoutes() {
        List<ZuulProperties.ZuulRoute> zuulRoutes = jdbcTemplate.query("select id, path, service_id, url, "
                + "retryable, enabled from zuul_route", new BeanPropertyRowMapper<>(ZuulProperties.ZuulRoute.class));
        return zuulRoutes;
    }
    public List<ZuulProperties.ZuulRoute> loadEnabledZuulRoutes() {
        List<ZuulProperties.ZuulRoute> zuulRoutes = jdbcTemplate.query("select id, path, service_id, url, "
                + "retryable, enabled from zuul_route where enabled = 1", new BeanPropertyRowMapper<>(ZuulProperties.ZuulRoute.class));
        return zuulRoutes;
    }
    private Object [] getFieldsForUpdate(ZuulProperties.ZuulRoute zuulRoute) {
        return new Object[]{
                zuulRoute.getId(),
                zuulRoute.getPath(),
                zuulRoute.getServiceId(),
                zuulRoute.getUrl(),
                zuulRoute.getRetryable(),
                1
        };
    }
}

+ 1 - 1
gateway/ag-basic/src/main/java/com/yihu/jw/gateway/config/WebSecurityConfig.java

@ -1,4 +1,4 @@
package com.yihu.jw.gateway.config;
package com.yihu.jw.gateway.security;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.context.annotation.Configuration;

+ 46 - 5
gateway/ag-basic/src/main/resources/application.yml

@ -2,6 +2,7 @@ server:
  port: 10001
zuul:
  config-priority: false
  ignored-services: '*'
  sensitive-headers:
  routes:
@ -16,8 +17,48 @@ zuul:
      url: https://www.baidu.com
spring:
  zipkin:
    base-url: http://localhost:9411
  sleuth:
    sampler:
      percentage: 1.0
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    max-active: 50
    max-idle: 50 #最大空闲连接
    min-idle: 10 #最小空闲连接
    validation-query-timeout: 20
    log-validation-errors: true
    validation-interval: 60000 #避免过度验证,保证验证不超过这个频率——以毫秒为单位。如果一个连接应该被验证,但上次验证未达到指定间隔,将不再次验证。
    validation-query: SELECT 1 #SQL 查询, 用来验证从连接池取出的连接, 在将连接返回给调用者之前。 如果指定, 则查询必须是一个SQL SELECT 并且必须返回至少一行记录
    test-on-borrow: true #指明是否在从池中取出连接前进行检验, 如果检验失败, 则从池中去除连接并尝试取出另一个。注意: 设置为true 后如果要生效,validationQuery 参数必须设置为非空字符串
    test-on-return: true #指明是否在归还到池中前进行检验 注意: 设置为true 后如果要生效validationQuery 参数必须设置为非空字符串
    idle-timeout: 30000
    connection-test-query: SELECT 1
    num-tests-per-eviction-run: 50 #在每次空闲连接回收器线程(如果有)运行时检查的连接数量,最好和maxActive
    test-while-idle: true #指明连接是否被空闲连接回收器(如果有)进行检验,如果检测失败,则连接将被从池中去除
    min-evictable-idle-time-millis: 3600000 #连接池中连接,在时间段内一直空闲,被逐出连接池的时间(1000*60*60),以毫秒为单位
    time-between-eviction-runs-millis: 300000 #在空闲连接回收器线程运行期间休眠的时间值,以毫秒为单位,一般比minEvictableIdleTimeMillis小
---
spring:
  profiles: jwdev
  datasource:
    url: jdbc:mysql://172.19.103.77/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: root
    password: 123456
#  zipkin:
#    base-url: http://localhost:9411 #日志追踪的地址
#  sleuth:
#    sampler:
#      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%
---
spring:
  profiles: jwtest
  datasource:
    url: jdbc:mysql://172.19.103.77/base?useUnicode:true&characterEncoding=utf-8&autoReconnect=true
    username: root
    password: 123456
#  zipkin:
#    base-url: http://localhost:9411 #日志追踪的地址
#  sleuth:
#    sampler:
#      percentage: 1.0 #采用需要的请求的百分比 默认是0.1 即 10%

+ 9 - 1
gateway/ag-basic/src/main/resources/bootstrap.yml

@ -21,4 +21,12 @@ spring:
  cloud:
    config:
      uri: ${wlyy-spring.config.uri:http://172.17.110.212:1221}
      label: ${wlyy-spring.config.label:jwdev}
      label: ${wlyy-spring.config.label:jwdev}
---
spring:
  profiles: jwprod
  cloud:
    config:
      uri: ${wlyy.pring.config.uri:http://172.17.110.212:1221}
      label: ${wlyy.spring.config.label:jwprod}

+ 16 - 0
server/svr-authentication/pom.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>wlyy-parent-pom</artifactId>
        <groupId>com.yihu.jw</groupId>
        <version>2.0.0</version>
        <relativePath>../../wlyy-parent-pom/pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>svr-authentication</artifactId>
</project>

+ 6 - 8
server/svr-discovery/src/main/java/com/yihu/jw/endpoint/DiscoveryEndpoint.java

@ -29,7 +29,7 @@ public class DiscoveryEndpoint {
     * 获取发现服务的信息
     * @return
     */
    @GetMapping("eurukaMessage")
    @GetMapping("/eurukaMessage")
    public String eurukaMessage() {
        JSONObject jo = new JSONObject();
@ -74,7 +74,7 @@ public class DiscoveryEndpoint {
     * 获取注册服务的信息
     * @return
     */
    @GetMapping("eurukaApplicationMessage")
    @GetMapping("/eurukaApplicationMessage")
    public String eurukaApplicationMessage() {
        PeerAwareInstanceRegistry peerAwareInstanceRegistry = eurekaServerContext.getRegistry();
        JSONObject jo = new JSONObject();
@ -119,7 +119,7 @@ public class DiscoveryEndpoint {
     * @param asgName
     * @return
     */
    @PostMapping("register")
    @PostMapping("/register")
    public String register(
            @RequestParam("instanceId") String instanceId,
            @RequestParam("app") String appName,
@ -145,8 +145,7 @@ public class DiscoveryEndpoint {
            @RequestParam("lastUpdatedTimestamp") Long lastUpdatedTimestamp,
            @RequestParam("lastDirtyTimestamp") Long lastDirtyTimestamp,
            @RequestParam("actionType") InstanceInfo.ActionType actionType,
            @RequestParam("asgName") String asgName
    ) {
            @RequestParam("asgName") String asgName) {
        try {
            InstanceInfo info = new InstanceInfo(
                    instanceId, appName, appGroupName, ipAddr,
@ -169,12 +168,11 @@ public class DiscoveryEndpoint {
     * @param isReplication
     * @return
     */
    @PostMapping("cancel")
    @PostMapping("/cancel")
    public String cancel(
            @RequestParam("appName") String appName,
            @RequestParam("id") String id,
            @RequestParam("isReplication") boolean isReplication
    ) {
            @RequestParam("isReplication") boolean isReplication) {
        try {
            eurekaServerContext.getRegistry().cancel(appName, id, isReplication);
            return "取消成功";

+ 0 - 12
svr/svr-base/src/main/java/com/yihu/jw/base/dao/ModuleFunctionDao.java

@ -1,12 +0,0 @@
//package com.yihu.jw.base.dao;
//
//import com.yihu.jw.entity.base.module.ModuleFunctionDO;
//import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
//import org.springframework.data.repository.PagingAndSortingRepository;
//
///**
// * Created by chenweida on 2017/5/19.
// */
//public interface ModuleFunctionDao extends PagingAndSortingRepository<ModuleFunctionDO, Integer>, JpaSpecificationExecutor<ModuleFunctionDO> {
//
//}

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

@ -1,13 +0,0 @@
package com.yihu.jw.base.dao;
import com.yihu.jw.entity.base.role.RoleModuleFunctionDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Dao - 角色模块功能
 * Created by progr1mmer on 2018/8/17.
 */
public interface RoleModuleFunctionDao extends PagingAndSortingRepository<RoleModuleFunctionDO, String>, JpaSpecificationExecutor<RoleModuleFunctionDO> {
}

+ 2 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/dao/SaasDefaultModuleFunctionDao.java

@ -8,9 +8,10 @@ import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Dao - Saas默认模块功能
 * Created by progr1mmer on 2018/8/17.
 */
public interface SaasDefaultModuleFunctionDao extends PagingAndSortingRepository<SaasDefaultModuleFunctionDO, Integer>, JpaSpecificationExecutor<SaasDefaultModuleFunctionDO> {
    List<SaasDefaultModuleFunctionDO> findByType(SaasDO.Type type);
    List<SaasDefaultModuleFunctionDO> findBySaasType(SaasDO.Type type);
}

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

@ -0,0 +1,13 @@
package com.yihu.jw.base.dao;
import com.yihu.jw.entity.base.saas.SaasModuleFunctionDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Dao - Saas所分配的模块功能
 * Created by progr1mmer on 2018/8/17.
 */
public interface SaasModuleFunctionDao extends PagingAndSortingRepository<SaasModuleFunctionDO, String>, JpaSpecificationExecutor<SaasModuleFunctionDO> {
}

+ 1 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/ThemeDao.java

@ -4,6 +4,7 @@ import com.yihu.jw.entity.base.theme.ThemeDO;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Dao - 主题风格
 * Created by progr1mmer on 2018/8/16.
 */
public interface ThemeDao extends PagingAndSortingRepository<ThemeDO, Integer> {

+ 1 - 1
svr/svr-base/src/main/java/com/yihu/jw/base/dao/UserDao.java

@ -5,7 +5,7 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Dao - 用户
 * Dao - 后台管理员
 * Created by progr1mmer on 2018/8/20.
 */
public interface UserDao extends PagingAndSortingRepository<UserDO, String>, JpaSpecificationExecutor<UserDO> {

+ 1 - 0
svr/svr-base/src/main/java/com/yihu/jw/base/dao/UserRoleDao.java

@ -5,6 +5,7 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.PagingAndSortingRepository;
/**
 * Dao - 用户角色
 * Created by progr1mmer on 2018/8/20.
 */
public interface UserRoleDao extends PagingAndSortingRepository<UserRoleDO, Integer>, JpaSpecificationExecutor<UserRoleDO> {

+ 2 - 3
svr/svr-base/src/main/java/com/yihu/jw/base/endpoint/function/FunctionEndpoint.java

@ -2,8 +2,7 @@ package com.yihu.jw.base.endpoint.function;
import com.yihu.jw.base.service.FunctionService;
import com.yihu.jw.entity.base.function.FunctionDO;
import com.yihu.jw.exception.ApiException;
import com.yihu.jw.restmodel.base.base.FunctionVO;
import com.yihu.jw.restmodel.base.function.FunctionVO;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
@ -47,7 +46,7 @@ public class FunctionEndpoint extends EnvelopRestEndpoint {
            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true)
            @RequestParam(value = "ids") String ids) {
        functionService.delete(ids);
        throw new ApiException("f", 200);
        return success("success");
    }
    @PostMapping(value = BaseRequestMapping.Function.UPDATE, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)

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


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