forked from yangzongzhuan/RuoYi-Cloud
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
mingxing.ai
committed
Aug 27, 2023
1 parent
f000e54
commit 52ff548
Showing
19 changed files
with
1,099 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>com.ruoyi</groupId> | ||
<artifactId>ruoyi-api</artifactId> | ||
<version>3.6.3</version> | ||
</parent> | ||
|
||
<artifactId>ruoyi-api-client</artifactId> | ||
|
||
<properties> | ||
<maven.compiler.source>8</maven.compiler.source> | ||
<maven.compiler.target>8</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
|
||
<!-- RuoYi Common Core--> | ||
<dependency> | ||
<groupId>com.ruoyi</groupId> | ||
<artifactId>ruoyi-common-core</artifactId> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
</project> |
13 changes: 13 additions & 0 deletions
13
ruoyi-api/ruoyi-api-client/src/main/java/com/ruoyi/client/RemoteClientUserService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.ruoyi.client; | ||
|
||
import com.ruoyi.client.factory.RemoteClientUserFallbackFactory; | ||
import com.ruoyi.common.core.constant.ServiceNameConstants; | ||
import org.springframework.cloud.openfeign.FeignClient; | ||
|
||
@FeignClient(contextId = "remoteClientUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteClientUserFallbackFactory.class) | ||
|
||
public interface RemoteClientUserService { | ||
|
||
|
||
|
||
} |
149 changes: 149 additions & 0 deletions
149
ruoyi-api/ruoyi-api-client/src/main/java/com/ruoyi/client/domain/ClientUser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
package com.ruoyi.client.domain; | ||
|
||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
import com.ruoyi.common.core.annotation.Excel; | ||
import com.ruoyi.common.core.web.domain.BaseEntity; | ||
|
||
/** | ||
* 账户信息对象 client_user | ||
* | ||
* @author ruoyi | ||
* @date 2023-08-13 | ||
*/ | ||
public class ClientUser extends BaseEntity | ||
{ | ||
private static final long serialVersionUID = 1L; | ||
|
||
/** 用户id */ | ||
private Long userId; | ||
|
||
/** 用户名 */ | ||
@Excel(name = "用户名") | ||
private String userName; | ||
|
||
/** 昵称 */ | ||
@Excel(name = "昵称") | ||
private String nickName; | ||
|
||
/** 邮箱 */ | ||
@Excel(name = "邮箱") | ||
private String email; | ||
|
||
/** 电话号码 */ | ||
@Excel(name = "电话号码") | ||
private String phonenumber; | ||
|
||
/** 头像 */ | ||
@Excel(name = "头像") | ||
private String avatar; | ||
|
||
/** 密码 */ | ||
@Excel(name = "密码") | ||
private String password; | ||
|
||
/** 状态 */ | ||
@Excel(name = "状态") | ||
private Long status; | ||
|
||
/** 删除标识 */ | ||
private Long delFlag; | ||
|
||
public void setUserId(Long userId) | ||
{ | ||
this.userId = userId; | ||
} | ||
|
||
public Long getUserId() | ||
{ | ||
return userId; | ||
} | ||
public void setUserName(String userName) | ||
{ | ||
this.userName = userName; | ||
} | ||
|
||
public String getUserName() | ||
{ | ||
return userName; | ||
} | ||
public void setNickName(String nickName) | ||
{ | ||
this.nickName = nickName; | ||
} | ||
|
||
public String getNickName() | ||
{ | ||
return nickName; | ||
} | ||
public void setEmail(String email) | ||
{ | ||
this.email = email; | ||
} | ||
|
||
public String getEmail() | ||
{ | ||
return email; | ||
} | ||
public void setPhonenumber(String phonenumber) | ||
{ | ||
this.phonenumber = phonenumber; | ||
} | ||
|
||
public String getPhonenumber() | ||
{ | ||
return phonenumber; | ||
} | ||
public void setAvatar(String avatar) | ||
{ | ||
this.avatar = avatar; | ||
} | ||
|
||
public String getAvatar() | ||
{ | ||
return avatar; | ||
} | ||
public void setPassword(String password) | ||
{ | ||
this.password = password; | ||
} | ||
|
||
public String getPassword() | ||
{ | ||
return password; | ||
} | ||
public void setStatus(Long status) | ||
{ | ||
this.status = status; | ||
} | ||
|
||
public Long getStatus() | ||
{ | ||
return status; | ||
} | ||
public void setDelFlag(Long delFlag) | ||
{ | ||
this.delFlag = delFlag; | ||
} | ||
|
||
public Long getDelFlag() | ||
{ | ||
return delFlag; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||
.append("userId", getUserId()) | ||
.append("userName", getUserName()) | ||
.append("nickName", getNickName()) | ||
.append("email", getEmail()) | ||
.append("phonenumber", getPhonenumber()) | ||
.append("avatar", getAvatar()) | ||
.append("password", getPassword()) | ||
.append("status", getStatus()) | ||
.append("delFlag", getDelFlag()) | ||
.append("createBy", getCreateBy()) | ||
.toString(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...yi-api-client/src/main/java/com/ruoyi/client/factory/RemoteClientUserFallbackFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.ruoyi.client.factory; | ||
|
||
import com.ruoyi.client.RemoteClientUserService; | ||
import com.ruoyi.common.core.domain.R; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.cloud.openfeign.FallbackFactory; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
public class RemoteClientUserFallbackFactory implements FallbackFactory<RemoteClientUserService> { | ||
|
||
private final static Logger log = LoggerFactory.getLogger(RemoteClientUserFallbackFactory.class); | ||
|
||
@Override | ||
public RemoteClientUserService create(Throwable cause) { | ||
log.error("用户服务调用失败:{}", cause.getMessage()); | ||
return new RemoteClientUserService() | ||
{ | ||
}; | ||
} | ||
|
||
} |
151 changes: 151 additions & 0 deletions
151
ruoyi-api/ruoyi-api-client/src/main/java/com/ruoyi/client/model/LoginUser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
package com.ruoyi.client.model; | ||
|
||
import com.ruoyi.client.domain.ClientUser; | ||
|
||
import java.io.Serializable; | ||
import java.util.Set; | ||
|
||
/** | ||
* 用户信息 | ||
* | ||
* @author ruoyi | ||
*/ | ||
public class LoginUser implements Serializable | ||
{ | ||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* 用户唯一标识 | ||
*/ | ||
private String token; | ||
|
||
/** | ||
* 用户名id | ||
*/ | ||
private Long userid; | ||
|
||
/** | ||
* 用户名 | ||
*/ | ||
private String username; | ||
|
||
/** | ||
* 登录时间 | ||
*/ | ||
private Long loginTime; | ||
|
||
/** | ||
* 过期时间 | ||
*/ | ||
private Long expireTime; | ||
|
||
/** | ||
* 登录IP地址 | ||
*/ | ||
private String ipaddr; | ||
|
||
/** | ||
* 权限列表 | ||
*/ | ||
private Set<String> permissions; | ||
|
||
/** | ||
* 角色列表 | ||
*/ | ||
private Set<String> roles; | ||
|
||
/** | ||
* 用户信息 | ||
*/ | ||
private ClientUser sysUser; | ||
|
||
public String getToken() | ||
{ | ||
return token; | ||
} | ||
|
||
public void setToken(String token) | ||
{ | ||
this.token = token; | ||
} | ||
|
||
public Long getUserid() | ||
{ | ||
return userid; | ||
} | ||
|
||
public void setUserid(Long userid) | ||
{ | ||
this.userid = userid; | ||
} | ||
|
||
public String getUsername() | ||
{ | ||
return username; | ||
} | ||
|
||
public void setUsername(String username) | ||
{ | ||
this.username = username; | ||
} | ||
|
||
public Long getLoginTime() | ||
{ | ||
return loginTime; | ||
} | ||
|
||
public void setLoginTime(Long loginTime) | ||
{ | ||
this.loginTime = loginTime; | ||
} | ||
|
||
public Long getExpireTime() | ||
{ | ||
return expireTime; | ||
} | ||
|
||
public void setExpireTime(Long expireTime) | ||
{ | ||
this.expireTime = expireTime; | ||
} | ||
|
||
public String getIpaddr() | ||
{ | ||
return ipaddr; | ||
} | ||
|
||
public void setIpaddr(String ipaddr) | ||
{ | ||
this.ipaddr = ipaddr; | ||
} | ||
|
||
public Set<String> getPermissions() | ||
{ | ||
return permissions; | ||
} | ||
|
||
public void setPermissions(Set<String> permissions) | ||
{ | ||
this.permissions = permissions; | ||
} | ||
|
||
public Set<String> getRoles() | ||
{ | ||
return roles; | ||
} | ||
|
||
public void setRoles(Set<String> roles) | ||
{ | ||
this.roles = roles; | ||
} | ||
|
||
public ClientUser getSysUser() | ||
{ | ||
return sysUser; | ||
} | ||
|
||
public void setSysUser(ClientUser sysUser) | ||
{ | ||
this.sysUser = sysUser; | ||
} | ||
} |
Oops, something went wrong.