mirror of
https://gitee.com/ChinaLym/shoulder-platform.git
synced 2025-12-30 11:02:26 +00:00
feat(uaa): 调整模块名
This commit is contained in:
@@ -1,5 +1,26 @@
|
|||||||
# shoulder-user-center
|
# shoulder-user-center
|
||||||
|
|
||||||
工程目录结构:
|
基于 Spring Security 的 Oauth2 认证授权中心,可作为单点登录服务器。
|
||||||
|
|
||||||
|
|
||||||
|
## 工程目录结构:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 扩展
|
||||||
|
|
||||||
|
### 单点登录 SSO
|
||||||
|
|
||||||
|
`SSO` 是一种思想,或者说是一种抽象的解决方案,可以通过它实现:用户可以无感知地在不同系统间访问受保护资源,而不必因访问不同系统而登录不同的账号。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
(图片来源于网络,侵删)
|
||||||
|
|
||||||
|
由于 `SSO` 并没有强制要求使用者如何实现认证,因此,可以通过不同的手段来达到该墓地,比如可以通过 Oauth2、JWT、Session 等。
|
||||||
|
|
||||||
|
### Oauth2
|
||||||
|
|
||||||
|
|
||||||

|
|
||||||
@@ -4,28 +4,28 @@
|
|||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-platform-parent</artifactId>
|
<artifactId>shoulder-platform-parent</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version><!-- shoulder-platform-version -->
|
<version>1.0-SNAPSHOT</version><!-- shoulder-platform-version -->
|
||||||
<relativePath>../shoulder-platform-common/shoulder-platform-parent/pom.xml</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<name>uaa</name>
|
<name>shoulder-user-center</name>
|
||||||
<artifactId>shoulder-user-center</artifactId>
|
<artifactId>shoulder-user-center</artifactId>
|
||||||
<description>用户认证授权中心</description>
|
<description>用户认证授权中心</description>
|
||||||
|
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>1.0-SNAPSHOT</version><!-- shoulder-user-center.version -->
|
<version>1.0-SNAPSHOT</version><!-- uaa.version -->
|
||||||
|
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>shoulder-user-center-api</module>
|
<module>uaa-api</module>
|
||||||
<module>shoulder-user-center-infrastructure</module>
|
<module>uaa-infrastructure</module>
|
||||||
<module>shoulder-user-center-core</module>
|
<module>uaa-core</module>
|
||||||
<module>shoulder-user-center-reference</module>
|
<module>uaa-reference</module>
|
||||||
<module>shoulder-user-center-modules</module>
|
<module>uaa-modules</module>
|
||||||
<module>shoulder-user-center-provider</module>
|
<module>uaa-provider</module>
|
||||||
<module>shoulder-user-center-web</module>
|
<module>uaa-web</module>
|
||||||
<module>shoulder-user-center-start</module>
|
<module>uaa-start</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
@@ -34,34 +34,34 @@
|
|||||||
<!-- ======================= 基础设施层 ======================= -->
|
<!-- ======================= 基础设施层 ======================= -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-infrastructure</artifactId>
|
<artifactId>uaa-infrastructure</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-storage</artifactId>
|
<artifactId>uaa-storage</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-storage-mysql</artifactId>
|
<artifactId>uaa-storage-mysql</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-cache</artifactId>
|
<artifactId>uaa-cache</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-cache-memory</artifactId>
|
<artifactId>uaa-cache-memory</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-cache-redis</artifactId>
|
<artifactId>uaa-cache-redis</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -70,17 +70,17 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-reference</artifactId>
|
<artifactId>uaa-reference</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-reference-adaptor</artifactId>
|
<artifactId>uaa-reference-adaptor</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-reference-xxx</artifactId>
|
<artifactId>uaa-reference-xxx</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-core</artifactId>
|
<artifactId>uaa-core</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -97,12 +97,12 @@
|
|||||||
<!-- ======================= 具体业务 ======================= -->
|
<!-- ======================= 具体业务 ======================= -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-modules</artifactId>
|
<artifactId>uaa-modules</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-xxx</artifactId>
|
<artifactId>uaa-xxx</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -110,13 +110,13 @@
|
|||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-api</artifactId>
|
<artifactId>uaa-api</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-provider</artifactId>
|
<artifactId>uaa-provider</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
<!-- ======================= web 层,如自带的管理界面 ======================= -->
|
<!-- ======================= web 层,如自带的管理界面 ======================= -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-web</artifactId>
|
<artifactId>uaa-web</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|||||||
@@ -1,61 +0,0 @@
|
|||||||
package cn.itlym.platform.uaa.storage.po;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 租户信息
|
|
||||||
*
|
|
||||||
* @author lym
|
|
||||||
* @date 2020-10-30 00:10:57
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class TenantPO implements Serializable {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
|
|
||||||
private String tenantId;
|
|
||||||
|
|
||||||
private String tenantCode;
|
|
||||||
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
private String desc;
|
|
||||||
|
|
||||||
private String logoUrl;
|
|
||||||
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
private Long creator;
|
|
||||||
|
|
||||||
private Date createTime;
|
|
||||||
|
|
||||||
private Long modifier;
|
|
||||||
|
|
||||||
private Date updateTime;
|
|
||||||
|
|
||||||
private String province;
|
|
||||||
|
|
||||||
private String city;
|
|
||||||
|
|
||||||
private String district;
|
|
||||||
|
|
||||||
private String address;
|
|
||||||
|
|
||||||
private String linkMan;
|
|
||||||
|
|
||||||
private String linkPhone;
|
|
||||||
|
|
||||||
private BigDecimal longitude;
|
|
||||||
|
|
||||||
private BigDecimal latitude;
|
|
||||||
|
|
||||||
private String adcode;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-api</artifactId>
|
<artifactId>uaa-api</artifactId>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-core</artifactId>
|
<artifactId>uaa-core</artifactId>
|
||||||
|
|
||||||
<description>共性业务放这里</description>
|
<description>共性业务放这里</description>
|
||||||
|
|
||||||
@@ -21,19 +21,19 @@
|
|||||||
<!-- 持久层接口 -->
|
<!-- 持久层接口 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-storage</artifactId>
|
<artifactId>uaa-storage</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 缓存层接口 -->
|
<!-- 缓存层接口 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-cache</artifactId>
|
<artifactId>uaa-cache</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 外部调用适配层 -->
|
<!-- 外部调用适配层 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-reference-adaptor</artifactId>
|
<artifactId>uaa-reference-adaptor</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package cn.itlym.platform.uaa.core.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户组、部门表
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class UserGroup implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private String initials;
|
||||||
|
|
||||||
|
private String spellings;
|
||||||
|
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
private Integer level;
|
||||||
|
|
||||||
|
private String path;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
private Integer weight;
|
||||||
|
|
||||||
|
private Integer displayOrder;
|
||||||
|
|
||||||
|
private Long creator;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package cn.itlym.platform.uaa.core.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户信息表
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class UserInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private Integer sex;
|
||||||
|
|
||||||
|
private Integer age;
|
||||||
|
|
||||||
|
private Date birth;
|
||||||
|
|
||||||
|
private Integer level;
|
||||||
|
|
||||||
|
private String idCard;
|
||||||
|
|
||||||
|
private String realName;
|
||||||
|
|
||||||
|
private String initials;
|
||||||
|
|
||||||
|
private String spellings;
|
||||||
|
|
||||||
|
private String phoneNum;
|
||||||
|
|
||||||
|
private String email;
|
||||||
|
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
private Integer groupAuth;
|
||||||
|
|
||||||
|
private Integer groupId;
|
||||||
|
|
||||||
|
private String groupName;
|
||||||
|
|
||||||
|
private String groupPath;
|
||||||
|
|
||||||
|
private Long creator;
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package cn.itlym.platform.uaa.core.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户登录信息表
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
* @date 2020-10-30 00:10:57
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class UserLoginInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
private String identifier;
|
||||||
|
|
||||||
|
private Integer identityType;
|
||||||
|
|
||||||
|
private String credential;
|
||||||
|
|
||||||
|
private Date lastPwdModifiedTime;
|
||||||
|
|
||||||
|
private Integer pwdLevel;
|
||||||
|
|
||||||
|
private Integer pwdExpireStrategy;
|
||||||
|
|
||||||
|
private Integer loginStrategyConfig;
|
||||||
|
|
||||||
|
private Integer onlineNumber;
|
||||||
|
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
private String ipSegment;
|
||||||
|
|
||||||
|
private String mac;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package cn.itlym.platform.uaa.core.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录失败记录表
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
* @date 2020-10-30 00:10:57
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class UserLoginRecordFail implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
private String mac;
|
||||||
|
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
private String identifier;
|
||||||
|
|
||||||
|
private Integer identityType;
|
||||||
|
|
||||||
|
private Integer failTimes;
|
||||||
|
|
||||||
|
private Date unlockTime;
|
||||||
|
|
||||||
|
private Date loginTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package cn.itlym.platform.uaa.core.model;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 登录成功记录表
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
* @date 2020-10-30 00:10:57
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class UserLoginRecordSuccess implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
private String ip;
|
||||||
|
|
||||||
|
private Integer identityType;
|
||||||
|
|
||||||
|
private String identifier;
|
||||||
|
|
||||||
|
private Date loginTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package cn.itlym.platform.uaa.core.model.converter;
|
||||||
|
|
||||||
|
import cn.itlym.platform.uaa.core.model.*;
|
||||||
|
import cn.itlym.platform.uaa.storage.po.*;
|
||||||
|
import org.mapstruct.Mapper;
|
||||||
|
import org.mapstruct.factory.Mappers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 模型转换
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
*/
|
||||||
|
@Mapper(componentModel = "spring") // 置为 spring 则默认注入 bean
|
||||||
|
public interface ModelConverter {
|
||||||
|
|
||||||
|
ModelConverter CONVERTER = Mappers.getMapper(ModelConverter.class);
|
||||||
|
|
||||||
|
UserGroup toModel(UserGroupPO po);
|
||||||
|
|
||||||
|
UserGroupPO toPo(UserGroup model);
|
||||||
|
|
||||||
|
// ----
|
||||||
|
|
||||||
|
UserInfo toModel(UserInfoPO po);
|
||||||
|
|
||||||
|
UserInfoPO toPo(UserInfo model);
|
||||||
|
|
||||||
|
// ----
|
||||||
|
|
||||||
|
UserLoginInfo toModel(UserLoginInfoPO po);
|
||||||
|
|
||||||
|
UserLoginInfoPO toPo(UserLoginInfo model);
|
||||||
|
|
||||||
|
// ----
|
||||||
|
|
||||||
|
UserLoginRecordFail toModel(UserLoginRecordFailPO po);
|
||||||
|
|
||||||
|
UserLoginRecordFailPO toPo(UserLoginRecordFail model);
|
||||||
|
|
||||||
|
// ----
|
||||||
|
|
||||||
|
UserLoginRecordSuccess toModel(UserLoginRecordSuccessPO po);
|
||||||
|
|
||||||
|
UserLoginRecordSuccessPO toPo(UserLoginRecordSuccess model);
|
||||||
|
|
||||||
|
// ----
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,18 +7,18 @@
|
|||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-infrastructure</artifactId>
|
<artifactId>uaa-infrastructure</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<description>基础设施层:存放可能随着 技术发展、部署环境、产品定位 而产生变化的代码,如:数据库在不同环境选型容易更换</description>
|
<description>基础设施层:存放可能随着 技术发展、部署环境、产品定位 而产生变化的代码,如:数据库在不同环境选型容易更换</description>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<module>shoulder-user-center-storage</module>
|
<module>uaa-storage</module>
|
||||||
<module>shoulder-user-center-storage-mysql</module>
|
<module>uaa-storage-mysql</module>
|
||||||
|
|
||||||
<module>shoulder-user-center-cache</module>
|
<module>uaa-cache</module>
|
||||||
<module>shoulder-user-center-cache-memory</module>
|
<module>uaa-cache-memory</module>
|
||||||
<module>shoulder-user-center-cache-redis</module>
|
<module>uaa-cache-redis</module>
|
||||||
|
|
||||||
|
|
||||||
</modules>
|
</modules>
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
<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">
|
<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>
|
<parent>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-infrastructure</artifactId>
|
<artifactId>uaa-infrastructure</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-cache-memory</artifactId>
|
<artifactId>uaa-cache-memory</artifactId>
|
||||||
|
|
||||||
<description>jvm 内存缓存。
|
<description>jvm 内存缓存。
|
||||||
该缓存实现 在开发/测试模式,会将缓存DTO序列化/反序列化,以便于后续改为使用redis等缓存做铺垫。
|
该缓存实现 在开发/测试模式,会将缓存DTO序列化/反序列化,以便于后续改为使用redis等缓存做铺垫。
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<!-- 缓存层定义 -->
|
<!-- 缓存层定义 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-cache</artifactId>
|
<artifactId>uaa-cache</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
<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">
|
<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>
|
<parent>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-infrastructure</artifactId>
|
<artifactId>uaa-infrastructure</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-cache-redis</artifactId>
|
<artifactId>uaa-cache-redis</artifactId>
|
||||||
|
|
||||||
<description>redis 缓存</description>
|
<description>redis 缓存</description>
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<!-- 缓存层定义 -->
|
<!-- 缓存层定义 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-cache</artifactId>
|
<artifactId>uaa-cache</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
<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">
|
<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>
|
<parent>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-infrastructure</artifactId>
|
<artifactId>uaa-infrastructure</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-cache</artifactId>
|
<artifactId>uaa-cache</artifactId>
|
||||||
|
|
||||||
<description>缓存相关接口定义</description>
|
<description>缓存相关接口定义</description>
|
||||||
|
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
<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">
|
<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>
|
<parent>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-infrastructure</artifactId>
|
<artifactId>uaa-infrastructure</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-storage-mysql</artifactId>
|
<artifactId>uaa-storage-mysql</artifactId>
|
||||||
|
|
||||||
<description>持久化存储 mysql 实现(这里选用 jdbc、hibernate、mybatis都不会对业务模块产生影响,自由切换)</description>
|
<description>持久化存储 mysql 实现(这里选用 jdbc、hibernate、mybatis都不会对业务模块产生影响,自由切换)</description>
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<!-- 持久层定义 -->
|
<!-- 持久层定义 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-storage</artifactId>
|
<artifactId>uaa-storage</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
<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">
|
<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>
|
<parent>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-infrastructure</artifactId>
|
<artifactId>uaa-infrastructure</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-storage</artifactId>
|
<artifactId>uaa-storage</artifactId>
|
||||||
|
|
||||||
<description>持久化存储相关接口(Mapper/Repository)、数据库模型定义(Entity/PO)</description>
|
<description>持久化存储相关接口(Mapper/Repository)、数据库模型定义(Entity/PO)</description>
|
||||||
|
|
||||||
@@ -18,6 +18,20 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Mybatis-Plus 用户中心-权限存在一些联表查询,使用Mybatis 效率更高一些 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.baomidou</groupId>
|
||||||
|
<artifactId>mybatis-plus-annotation</artifactId>
|
||||||
|
<version>3.4.0</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- JPA -->
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>jakarta.persistence</groupId>
|
||||||
|
<artifactId>jakarta.persistence-api</artifactId>
|
||||||
|
</dependency>-->
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package cn.itlym.platform.uaa.storage.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 凭证-角色关联表
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
* @date 2020-11-01 20:57:04
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class PrincipalRolePO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id 主键
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
@TableField("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* principal_id 凭证标识
|
||||||
|
*/
|
||||||
|
@TableField("principal_id")
|
||||||
|
private Long principalId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* principal_type 凭证类型 0:用户,1:部门
|
||||||
|
*/
|
||||||
|
@TableField("principal_type")
|
||||||
|
private String principalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* role_id 角色
|
||||||
|
*/
|
||||||
|
@TableField("role_id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
package cn.itlym.platform.uaa.storage.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色表
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
* @date 2020-11-01 20:57:04
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class RolePO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id 主键
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
@TableField("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* name 名称
|
||||||
|
*/
|
||||||
|
@TableField("name")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* initials 名称-首字母缩写
|
||||||
|
*/
|
||||||
|
@TableField("initials")
|
||||||
|
private String initials;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pinyin 名称-全拼音
|
||||||
|
*/
|
||||||
|
@TableField("pinyin")
|
||||||
|
private String pinyin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* type 角色类型,1管理员,2普通角色
|
||||||
|
*/
|
||||||
|
@TableField("type")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sub_type 创建的角色类型,用于继承 0操作员 1管理员 2超级管理员
|
||||||
|
*/
|
||||||
|
@TableField("sub_type")
|
||||||
|
private Integer subType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enable 0:禁用,1:启用
|
||||||
|
*/
|
||||||
|
@TableField("enable")
|
||||||
|
private Integer enable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* description 描述
|
||||||
|
*/
|
||||||
|
@TableField("description")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* creator 创建者
|
||||||
|
*/
|
||||||
|
@TableField("creator")
|
||||||
|
private Long creator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* create_time 创建时间
|
||||||
|
*/
|
||||||
|
@TableField("create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* modifier 修改者
|
||||||
|
*/
|
||||||
|
@TableField("modifier")
|
||||||
|
private Long modifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update_time 更新时间
|
||||||
|
*/
|
||||||
|
@TableField("update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package cn.itlym.platform.uaa.storage.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色-菜单的权限关系
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
* @date 2020-11-01 20:57:04
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class RoleRelMenuPO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id 主键
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
@TableField("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* role_id 角色id
|
||||||
|
*/
|
||||||
|
@TableField("role_id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* menu_id 菜单id
|
||||||
|
*/
|
||||||
|
@TableField("menu_id")
|
||||||
|
private Integer menuId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* menu_type 菜单类型
|
||||||
|
*/
|
||||||
|
@TableField("menu_type")
|
||||||
|
private String menuType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* menu_permission_code 菜单的code
|
||||||
|
*/
|
||||||
|
@TableField("menu_permission_code")
|
||||||
|
private String menuPermissionCode;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package cn.itlym.platform.uaa.storage.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色-资源的权限关系(角色上配了哪些资源)
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
* @date 2020-11-01 20:57:04
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class RoleRelResourcePO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id 主键
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
@TableField("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* role_id 角色id
|
||||||
|
*/
|
||||||
|
@TableField("role_id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* resource_id 资源id
|
||||||
|
*/
|
||||||
|
@TableField("resource_id")
|
||||||
|
private Long resourceId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* resource_type 资源类型编码
|
||||||
|
*/
|
||||||
|
@TableField("resource_type")
|
||||||
|
private String resourceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* auth_value
|
||||||
|
*/
|
||||||
|
@TableField("auth_value")
|
||||||
|
private Long authValue;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package cn.itlym.platform.uaa.storage.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色-资源类型的权限关系
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
* @date 2020-11-01 20:57:04
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class RoleRelResourceTypePO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id 主键
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
@TableField("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* role_id 角色id
|
||||||
|
*/
|
||||||
|
@TableField("role_id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* contain_sub 是否包含下级:0 - 不包含; 1 - 包含
|
||||||
|
*/
|
||||||
|
@TableField("contain_sub")
|
||||||
|
private Integer containSub;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* resource_type 资源类型编码
|
||||||
|
*/
|
||||||
|
@TableField("resource_type")
|
||||||
|
private String resourceType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* auth_value
|
||||||
|
*/
|
||||||
|
@TableField("auth_value")
|
||||||
|
private Long authValue;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package cn.itlym.platform.uaa.storage.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色-角色的权限关系
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
* @date 2020-11-01 20:57:04
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class RoleRelRolePO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id 主键
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
@TableField("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* role_id 角色id
|
||||||
|
*/
|
||||||
|
@TableField("role_id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* control_role_id 目标角色id
|
||||||
|
*/
|
||||||
|
@TableField("control_role_id")
|
||||||
|
private Long controlRoleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* auth_value 权限值,为资源操作项值之和
|
||||||
|
*/
|
||||||
|
@TableField("auth_value")
|
||||||
|
private Long authValue;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package cn.itlym.platform.uaa.storage.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色-用户组的权限关系
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
* @date 2020-11-01 20:57:04
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class RoleRelUserGroupPO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id 主键
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
@TableField("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* role_id 角色id
|
||||||
|
*/
|
||||||
|
@TableField("role_id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* user_group_id 目标用户组id
|
||||||
|
*/
|
||||||
|
@TableField("user_group_id")
|
||||||
|
private Integer userGroupId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* auth_value 权限值,为资源操作项值之和,0 - 没有权限,1 2 4
|
||||||
|
*/
|
||||||
|
@TableField("auth_value")
|
||||||
|
private Long authValue;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package cn.itlym.platform.uaa.storage.po;
|
package cn.itlym.platform.uaa.storage.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@@ -14,6 +15,7 @@ import java.util.Date;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
|
@TableName("c_auth_application")
|
||||||
public class UserGroupPO implements Serializable {
|
public class UserGroupPO implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@@ -12,7 +12,6 @@ import java.util.Date;
|
|||||||
* @author lym
|
* @author lym
|
||||||
* @date 2020-10-30 00:10:57
|
* @date 2020-10-30 00:10:57
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class UserLoginInfoPO implements Serializable {
|
public class UserLoginInfoPO implements Serializable {
|
||||||
@@ -12,7 +12,6 @@ import java.util.Date;
|
|||||||
* @author lym
|
* @author lym
|
||||||
* @date 2020-10-30 00:10:57
|
* @date 2020-10-30 00:10:57
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class UserLoginRecordFailPO implements Serializable {
|
public class UserLoginRecordFailPO implements Serializable {
|
||||||
@@ -12,7 +12,6 @@ import java.util.Date;
|
|||||||
* @author lym
|
* @author lym
|
||||||
* @date 2020-10-30 00:10:57
|
* @date 2020-10-30 00:10:57
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class UserLoginRecordSuccessPO implements Serializable {
|
public class UserLoginRecordSuccessPO implements Serializable {
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package cn.itlym.platform.uaa.storage.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户-角色关系表
|
||||||
|
*
|
||||||
|
* @author lym
|
||||||
|
* @date 2020-11-01 20:57:05
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class UserRelRolePO implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id 主键
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
@TableField("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* user_id 用户id
|
||||||
|
*/
|
||||||
|
@TableField("user_id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* user_name 用户名称
|
||||||
|
*/
|
||||||
|
@TableField("user_name")
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* role_id 角色id
|
||||||
|
*/
|
||||||
|
@TableField("role_id")
|
||||||
|
private Long roleId;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-modules</artifactId>
|
<artifactId>uaa-modules</artifactId>
|
||||||
|
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-core</artifactId>
|
<artifactId>uaa-core</artifactId>
|
||||||
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
|
||||||
<module>shoulder-user-center-xxx</module>
|
<module>uaa-xxx</module>
|
||||||
|
|
||||||
</modules>
|
</modules>
|
||||||
</project>
|
</project>
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
<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">
|
<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>
|
<parent>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-modules</artifactId>
|
<artifactId>uaa-modules</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-xxx</artifactId>
|
<artifactId>uaa-xxx</artifactId>
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -7,16 +7,22 @@
|
|||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-provider</artifactId>
|
<artifactId>uaa-provider</artifactId>
|
||||||
|
|
||||||
<description>为外部提供服务,若子业务过多,可拆分为多个 provider,该模块也可合并至具体 module 中</description>
|
<description>为外部提供服务,若子业务过多,可拆分为多个 provider,该模块也可合并至具体 module 中</description>
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
<!-- 接口 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>cn.itlym.platform</groupId>
|
||||||
|
<artifactId>uaa-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 将业务模块引入 -->
|
<!-- 将业务模块引入 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-xxx</artifactId>
|
<artifactId>uaa-xxx</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
@@ -7,17 +7,17 @@
|
|||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-reference</artifactId>
|
<artifactId>uaa-reference</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
<description>存放调用其他服务的代码</description>
|
<description>存放调用其他服务的代码</description>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
<!-- 外部 api 定义/依赖 -->
|
<!-- 外部 api 定义/依赖 -->
|
||||||
<module>shoulder-user-center-reference-xxx</module>
|
<module>uaa-reference-xxx</module>
|
||||||
|
|
||||||
<!-- 防腐层 -->
|
<!-- 防腐层 -->
|
||||||
<module>shoulder-user-center-reference-adaptor</module>
|
<module>uaa-reference-adaptor</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
|
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
<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">
|
<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>
|
<parent>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-reference</artifactId>
|
<artifactId>uaa-reference</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-reference-adaptor</artifactId>
|
<artifactId>uaa-reference-adaptor</artifactId>
|
||||||
|
|
||||||
<description>调用外部服务接口适配模块、主要做DTO转换、错误码转换,异常处理等。</description>
|
<description>调用外部服务接口适配模块、主要做DTO转换、错误码转换,异常处理等。</description>
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<!-- xxx 应用 -->
|
<!-- xxx 应用 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-reference-xxx</artifactId>
|
<artifactId>uaa-reference-xxx</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<!-- 可能不是所有子业务都会依赖某个第三方提供的接口,故设置为可选,在具体业务模块中声明依赖 -->
|
<!-- 可能不是所有子业务都会依赖某个第三方提供的接口,故设置为可选,在具体业务模块中声明依赖 -->
|
||||||
<optional>true</optional>
|
<optional>true</optional>
|
||||||
@@ -2,12 +2,12 @@
|
|||||||
<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">
|
<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>
|
<parent>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-reference</artifactId>
|
<artifactId>uaa-reference</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-reference-xxx</artifactId>
|
<artifactId>uaa-reference-xxx</artifactId>
|
||||||
|
|
||||||
<description>调用 xxx 应用提供的接口</description>
|
<description>调用 xxx 应用提供的接口</description>
|
||||||
|
|
||||||
@@ -7,16 +7,16 @@
|
|||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<artifactId>shoulder-user-center-start</artifactId>
|
<artifactId>uaa-start</artifactId>
|
||||||
<name>uaa</name>
|
<name>uaa</name>
|
||||||
<description>shoulder-user-center-start</description>
|
<description>uaa-start</description>
|
||||||
<!--调试/运行/测试/打包 模块-->
|
<!--调试/运行/测试/打包 模块-->
|
||||||
|
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-xxx</artifactId>
|
<artifactId>uaa-xxx</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- ============================= 中间件技术选型 ============================= -->
|
<!-- ============================= 中间件技术选型 ============================= -->
|
||||||
@@ -24,9 +24,15 @@
|
|||||||
<!-- 数据库选用 mysql -->
|
<!-- 数据库选用 mysql -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.itlym.platform</groupId>
|
<groupId>cn.itlym.platform</groupId>
|
||||||
<artifactId>shoulder-user-center-storage-mysql</artifactId>
|
<artifactId>uaa-storage-mysql</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 默认只提供接口,不含 web 端 -->
|
||||||
|
<!--<dependency>
|
||||||
|
<groupId>cn.itlym.platform</groupId>
|
||||||
|
<artifactId>uaa-web</artifactId>
|
||||||
|
</dependency>-->
|
||||||
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
@@ -63,10 +69,10 @@
|
|||||||
<!-- maven 默认使用 artifactId+version拼接 -->
|
<!-- maven 默认使用 artifactId+version拼接 -->
|
||||||
<finalName>${project.artifactId}</finalName>
|
<finalName>${project.artifactId}</finalName>
|
||||||
|
|
||||||
<!-- 动态打包环境配置源文件 -->
|
<!-- 动态打包环境配置源文件 fix shoulder-platform 中的统一配置,可删除 -->
|
||||||
<filters>
|
<!--<filters>
|
||||||
<filter>../../dynamicConfig/config-${profile.active}.properties</filter>
|
<filter>../../dynamicConfig/config-${profile.active}.properties</filter>
|
||||||
</filters>
|
</filters>-->
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user