This commit is contained in:
yyb
2025-05-12 17:00:06 +08:00
parent 9c5b5eba7c
commit 9c93dc1e10
855 changed files with 163903 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
<?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>jxy-api</artifactId>
<groupId>com.jxy</groupId>
<version>3.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>api-system</artifactId>
<description>
api-system系统接口模块
</description>
<dependencies>
<!-- Jxy Common Core-->
<dependency>
<groupId>com.jxy</groupId>
<artifactId>common-core</artifactId>
</dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>

View File

@@ -0,0 +1,39 @@
package com.jxy.system.api;
import com.jxy.common.core.Result.R;
import com.jxy.common.core.constant.ServiceNameConstants;
import com.jxy.system.api.entity.SysFile;
import com.jxy.system.api.factory.RemoteFileFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
/**
* 文件服务
*
* @author jxy
*/
@FeignClient(contextId = "remoteFileService", value = ServiceNameConstants.FILE_SERVICE, fallbackFactory = RemoteFileFallbackFactory.class)
public interface RemoteFileService
{
/**
* 上传文件
*
* @param file 文件信息
* @return 结果
*/
@PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public R<SysFile> upload(@RequestPart(value = "file") MultipartFile file);
/**
* windMiner上传文件
*
* @param file 文件信息
* @return 结果
*/
@PostMapping(value = "/windMinerUploadFile", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public R<SysFile> windMinerUploadFile(@RequestPart(value = "file") MultipartFile file);
}

View File

@@ -0,0 +1,43 @@
package com.jxy.system.api;
import com.jxy.common.core.Result.R;
import com.jxy.common.core.constant.SecurityConstants;
import com.jxy.common.core.constant.ServiceNameConstants;
import com.jxy.system.api.entity.SysLogininfor;
import com.jxy.system.api.entity.SysOperLog;
import com.jxy.system.api.factory.RemoteLogFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
/**
* @Description 日志服务
* @Date 2022/5/11 11:46
* @Author 杜懿
*/
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
public interface RemoteLogService {
/**
* 保存系统日志
*
* @param sysOperLog 日志实体
* @param source 请求来源
* @return 结果
*/
@PostMapping("/operlog")
public R<Boolean> saveLog(@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 保存访问记录
*
* @param sysLogininfor 访问实体
* @param source 请求来源
* @return 结果
*/
@PostMapping("/logininfor")
public R<Boolean> saveLogininfor(@RequestBody SysLogininfor sysLogininfor, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@@ -0,0 +1,37 @@
package com.jxy.system.api;
import com.jxy.common.core.Result.R;
import com.jxy.common.core.constant.ServiceNameConstants;
import com.jxy.system.api.entity.EmailEntity;
import com.jxy.system.api.entity.GetEmailCodeEntity;
import com.jxy.system.api.entity.SysUser;
import com.jxy.system.api.factory.RemoteMailFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
/**
* 邮件服务
*
* @author jxy
*/
@FeignClient(contextId = "remoteMailService", value = ServiceNameConstants.AUTH_SERVICE, fallbackFactory = RemoteMailFallbackFactory.class)
public interface RemoteMailService
{
/**
* 发送提现的邮箱验证码
*
* @return 结果
*/
@PostMapping("/addCreditEmailCode")
public R<?> sendAddCreditEmailCode(@RequestBody GetEmailCodeEntity entity);
/**
* 发送文本邮件
*
* @return 结果
*/
@PostMapping("/sendTextMail")
public R<?> sendTextMail(@RequestBody EmailEntity entity);
}

View File

@@ -0,0 +1,78 @@
package com.jxy.system.api;
import com.jxy.common.core.Result.R;
import com.jxy.common.core.constant.SecurityConstants;
import com.jxy.common.core.constant.ServiceNameConstants;
import com.jxy.system.api.entity.SysUser;
import com.jxy.system.api.entity.SysUserLeveDate;
import com.jxy.system.api.factory.RemoteUserFallbackFactory;
import com.jxy.system.api.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
/**
* @Description 用户服务
* @Date 2022/5/12 15:46
* @Author 杜懿
*/
@FeignClient(contextId = "remoteUserService",value = ServiceNameConstants.SYSTEM_SERVICE,fallbackFactory = RemoteUserFallbackFactory.class)
public interface RemoteUserService {
/**
* 通过用户名/邮箱查询用户信息
*
* @param account 用户名/邮箱
* @param source 请求来源
* @return 结果
*/
@GetMapping("/user/info/{account}")
public R<LoginUser> getUserInfo(@PathVariable("account") String account, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
/**
* 修改用户最后一次登录的ip和登录次数
*
* @param sysUser 用户信息
* @return 结果
*/
@PostMapping("/user/update")
public R<Boolean> updateUserInfo(@RequestBody SysUser sysUser);
/**
* 注册用户信息
*
*
* @param sysUser 用户信息
* @return 结果
*/
@PostMapping("/user/register")
public R<Boolean> registerUserInfo(@RequestBody SysUser sysUser);
/**
* 重置用户密码
*
* @param sysUser 用户信息
* @return 结果
*/
@PostMapping("/user/profile/resetPwd")
public R<Boolean> resetPwdByEmail(@RequestBody SysUser sysUser);
/**
* 查看会员有效期情况
* @return 结果
*/
@PostMapping("/user/profile/userLevel")
public R<SysUserLeveDate> userLevel(@RequestBody Long userId);
/**
* 升级用户并记录用户会员有效期
*
* @param user 用户信息
* @return 结果
*/
@PostMapping("/user/profile/Levelup")
public R<Boolean> userLevelup(@RequestBody SysUserLeveDate user, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

View File

@@ -0,0 +1,28 @@
package com.jxy.system.api.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description 用户登录对象
* @Date 2022/5/12 16:13
* @Author 杜懿
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class EmailCodeEntity implements Serializable {
/** 用户名或邮箱 */
private String userName;
/** 邮箱 */
private String email;
private String emailCode;
private int times;
}

View File

@@ -0,0 +1,25 @@
package com.jxy.system.api.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Description 用户登录对象
* @Date 2022/5/12 16:13
* @Author 杜懿
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class EmailEntity implements Serializable {
/** 邮箱 */
private String email;
private String subject;
private String text;
}

View File

@@ -0,0 +1,33 @@
package com.jxy.system.api.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
/**
* @Description 用户登录对象
* @Date 2022/5/12 16:13
* @Author 杜懿
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class GetEmailCodeEntity {
/** 用户名或邮箱 */
private String userName;
/** 邮箱 */
@NotNull(message = "用户邮箱不能为空")
@Email(message = "邮箱格式错误")
private String email;
//@NotNull(message = "用户密码不能为空")
//@Size(min=6, max=15,message="密码长度必须在 5 ~ 15 字符之间!")
////@Pattern(regexp="^[a-zA-Z0-9|_]+$",message="密码必须由字母、数字、下划线组成!")
//private String password;
}

View File

@@ -0,0 +1,85 @@
package com.jxy.system.api.entity;
import com.jxy.common.core.web.entity.BaseEntity;
import lombok.Data;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.List;
/**
* @Description 部门表实体
* @Date 2022/5/12 11:19
* @Author 杜懿
*/
@Data
public class SysDept extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 部门ID */
private Long deptId;
/** 父部门ID */
private Long parentId;
/** 祖级列表 */
private String ancestors;
/** 部门名称 */
private String deptName;
/** 显示顺序 */
private Integer orderNum;
/** 负责人 */
private String leader;
/** 联系电话 */
private String phone;
/** 邮箱 */
private String email;
/** 部门状态:0正常,1停用 */
private String status;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
/** 父部门名称 */
private String parentName;
/** 子部门 */
private List<SysDept> children = new ArrayList<SysDept>();
@NotBlank(message = "部门名称不能为空")
@Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符")
public String getDeptName()
{
return deptName;
}
@NotNull(message = "显示顺序不能为空")
public Integer getOrderNum()
{
return orderNum;
}
@Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
public String getPhone()
{
return phone;
}
@Email(message = "邮箱格式不正确")
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
public String getEmail()
{
return email;
}
}

View File

@@ -0,0 +1,67 @@
package com.jxy.system.api.entity;
import com.jxy.common.core.web.entity.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 文件信息
*
* @author dy
*/
public class SysFile extends BaseEntity
{
/**
* 文件表主键
*/
private Long id;
/**
* 文件名称
*/
private String name;
/**
* 文件地址
*/
private String url;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getUrl()
{
return url;
}
public void setUrl(String url)
{
this.url = url;
}
public Long getId()
{
return id;
}
public void setId(Long id)
{
this.id = id;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("name", getName())
.append("id", getId())
.append("url", getUrl())
.toString();
}
}

View File

@@ -0,0 +1,37 @@
package com.jxy.system.api.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jxy.common.core.web.entity.BaseEntity;
import lombok.Data;
import java.util.Date;
/**
* @Description 系统访问记录表实体类
* @Date 2022/5/11 10:40
* @Author 杜懿
*/
@Data
public class SysLogininfor extends BaseEntity {
private static final long serialVersionUID = 3217638467115846123L;
/** ID */
private Long infoId;
/** 用户账号 */
private String userName;
/** 状态 0成功 1失败 */
private String status;
/** 地址 */
private String ipaddr;
/** 描述 */
private String msg;
/** 访问时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date accessTime;
}

View File

@@ -0,0 +1,68 @@
package com.jxy.system.api.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jxy.common.core.web.entity.BaseEntity;
import lombok.Data;
import java.util.Date;
/**
* @Description 操作日志记录表实体类
* @Date 2022/5/11 10:43
* @Author 杜懿
*/
@Data
public class SysOperLog extends BaseEntity {
private static final long serialVersionUID = 7117642119125846123L;
/** 日志主键 */
private Long operId;
/** 操作模块 */
private String title;
/** 业务类型0其它 1新增 2修改 3删除 */
private Integer businessType;
/** 业务类型数组 */
private Integer[] businessTypes;
/** 请求方法 */
private String method;
/** 请求方式 */
private String requestMethod;
/** 操作类别0其它 1后台用户 2手机端用户 */
private Integer operatorType;
/** 操作人员 */
private String operName;
/** 部门名称 */
private String deptName;
/** 请求url */
private String operUrl;
/** 操作地址 */
private String operIp;
/** 请求参数 */
private String operParam;
/** 返回参数 */
private String jsonResult;
/** 操作状态0正常 1异常 */
private Integer status;
/** 错误消息 */
private String errorMsg;
/** 操作时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date operTime;
}

View File

@@ -0,0 +1,89 @@
package com.jxy.system.api.entity;
import com.jxy.common.core.web.entity.BaseEntity;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;
/**
* @Description 角色表实体
* @Date 2022/5/12 11:18
* @Author 杜懿
*/
@Data
public class SysRole extends BaseEntity {
private static final long serialVersionUID = 1L;
/** 角色ID */
private Long roleId;
/** 角色名称 */
private String roleName;
/** 角色权限 */
private String roleKey;
/** 角色排序 */
private String roleSort;
private Date levelExpireDate;
/** 数据范围1所有数据权限2自定义数据权限3本部门数据权限4本部门及以下数据权限5仅本人数据权限 */
private String dataScope;
/** 菜单树选择项是否关联显示( 0父子不互相关联显示 1父子互相关联显示 */
private boolean menuCheckStrictly;
/** 部门树选择项是否关联显示0父子不互相关联显示 1父子互相关联显示 */
private boolean deptCheckStrictly;
/** 角色状态0正常 1停用 */
private String status;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
/** 用户是否存在此角色标识 默认不存在 */
private boolean flag = false;
/** 菜单组 */
private Long[] menuIds;
/** 部门组(数据权限) */
//private Long[] deptIds;
public boolean isAdmin()
{
return isAdmin(this.roleId);
}
public static boolean isAdmin(Long roleId)
{
return roleId != null && 1L == roleId;
}
@NotBlank(message = "角色名称不能为空")
@Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符")
public String getRoleName()
{
return roleName;
}
@NotBlank(message = "权限字符不能为空")
@Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符")
public String getRoleKey()
{
return roleKey;
}
@NotBlank(message = "显示顺序不能为空")
public String getRoleSort()
{
return roleSort;
}
}

View File

@@ -0,0 +1,117 @@
package com.jxy.system.api.entity;
import com.jxy.common.core.web.entity.BaseEntity;
import lombok.Data;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;
/**
* @Description 用户实体类
* @Date 2022/5/12 10:59
* @Author 杜懿
*/
@Data
public class SysUser extends BaseEntity {
private static final long serialVersionUID = 2417642483325474318L;
/** 用户ID */
private Long userId;
/** 部门ID */
private Long deptId;
/** 用户账号 */
private String userName;
/** 用户昵称 */
private String nickName;
/** 用户邮箱 */
private String email;
/** 手机号码 */
private String phone;
/** 用户性别 */
private String sex;
/** 用户头像 */
private String avatar;
/** 密码 */
private String password;
/** 帐号状态0正常 1停用 */
private String status;
/** 删除标志0代表存在 2代表删除 */
private String delFlag;
/** 最后登录IP */
private String loginIp;
/** 登录次数 */
private Long loginCount;
/** 最后登录时间 */
private Date loginDate;
/** 部门对象 */
private SysDept dept;
/** 角色对象 */
private List<SysRole> roles;
/** 角色组 用户角色更新操作使用*/
private Long[] roleIds;
/** 岗位组 */
private Long[] postIds;
/** 角色ID */
private Long roleId;
public boolean isAdmin()
{
return isAdmin(this.userId);
}
public static boolean isAdmin(Long userId)
{
return userId != null && 1L == userId;
}
// TODO: xss
@Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
public String getNickName()
{
return nickName;
}
// TODO: xss
@NotBlank(message = "用户账号不能为空")
@Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符")
public String getUserName()
{
return userName;
}
@Email(message = "邮箱格式不正确")
@Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
public String getEmail()
{
return email;
}
@Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
public String getPhone()
{
return phone;
}
}

View File

@@ -0,0 +1,41 @@
package com.jxy.system.api.entity;
import lombok.Data;
import java.util.Date;
/**
* @Description TODO
* @Date 2023/1/4 15:41
* @Author 杜懿
*/
@Data
public class SysUserLeveDate {
private static final long serialVersionUID = 1L;
/** 用户ID */
private Long userId;
/** 用户账号 */
private String userName;
private String email;
/** 会员开始时间 */
private Date startTime;
/** 会员过期时间 */
private Date expireTime;
private int levelType;
//选择操作 默认0新增 1续费
private int oper = 0;
/** 角色对象 */
private Long roleId;
}

View File

@@ -0,0 +1,40 @@
package com.jxy.system.api.factory;
import com.jxy.common.core.Result.R;
import com.jxy.system.api.RemoteFileService;
import com.jxy.system.api.entity.SysFile;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;
/**
* 文件服务降级处理
*
* @author jxy
*/
@Component
public class RemoteFileFallbackFactory implements FallbackFactory<RemoteFileService>
{
private static final Logger log = LoggerFactory.getLogger(RemoteFileFallbackFactory.class);
@Override
public RemoteFileService create(Throwable throwable)
{
log.error("文件服务调用失败:{}", throwable.getMessage());
return new RemoteFileService()
{
@Override
public R<SysFile> upload(MultipartFile file)
{
return R.fail("远程调用上传文件失败:" + throwable.getMessage());
}
@Override
public R<SysFile> windMinerUploadFile(MultipartFile file) {
return R.fail("windMiner远程调用上传文件失败:" + throwable.getMessage());
}
};
}
}

View File

@@ -0,0 +1,40 @@
package com.jxy.system.api.factory;
import com.jxy.common.core.Result.R;
import com.jxy.system.api.RemoteLogService;
import com.jxy.system.api.entity.SysLogininfor;
import com.jxy.system.api.entity.SysOperLog;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
* @Description 日志服务降级处理
* @Date 2022/5/11 11:58
* @Author 杜懿
*/
@Component
public class RemoteLogFallbackFactory implements FallbackFactory<RemoteLogService> {
private static final Logger log = LoggerFactory.getLogger(RemoteLogFallbackFactory.class);
@Override
public RemoteLogService create(Throwable cause) {
log.error("日志服务调用失败:{}", cause.getMessage());
return new RemoteLogService()
{
@Override
public R<Boolean> saveLog(SysOperLog sysOperLog, String source)
{
return null;
}
@Override
public R<Boolean> saveLogininfor(SysLogininfor sysLogininfor, String source)
{
return null;
}
};
}
}

View File

@@ -0,0 +1,45 @@
package com.jxy.system.api.factory;
import com.jxy.common.core.Result.R;
import com.jxy.system.api.RemoteFileService;
import com.jxy.system.api.RemoteMailService;
import com.jxy.system.api.entity.EmailEntity;
import com.jxy.system.api.entity.GetEmailCodeEntity;
import com.jxy.system.api.entity.SysFile;
import com.jxy.system.api.entity.SysUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.multipart.MultipartFile;
/**
* 文件服务降级处理
*
* @author jxy
*/
@Component
public class RemoteMailFallbackFactory implements FallbackFactory<RemoteMailService>
{
private static final Logger log = LoggerFactory.getLogger(RemoteMailFallbackFactory.class);
@Override
public RemoteMailService create(Throwable cause)
{
return new RemoteMailService() {
@Override
public R<?>
sendAddCreditEmailCode(GetEmailCodeEntity entity) {
return R.fail("提现邮箱验证发送失败:" + cause.getMessage());
}
@Override
public R<?> sendTextMail(@RequestBody EmailEntity entity){
return R.fail("邮箱发送失败:" + cause.getMessage());
}
};
}
}

View File

@@ -0,0 +1,61 @@
package com.jxy.system.api.factory;
import com.jxy.common.core.Result.R;
import com.jxy.system.api.RemoteUserService;
import com.jxy.system.api.entity.SysUser;
import com.jxy.system.api.entity.SysUserLeveDate;
import com.jxy.system.api.model.LoginUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
/**
* @Description 用户服务降级处理
* @Date 2022/5/11 15:48
* @Author 杜懿
*/
@Component
public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserService> {
private static final Logger log = LoggerFactory.getLogger(RemoteUserFallbackFactory.class);
@Override
public RemoteUserService create(Throwable cause) {
log.error("用户服务调用失败:{}",cause.getMessage());
return new RemoteUserService(){
@Override
public R<LoginUser> getUserInfo(String username, String source) {
return R.fail("获取用户失败:" + cause.getMessage());
}
@Override
public R<Boolean> updateUserInfo(SysUser sysUser) {
return R.fail("修改用户失败:" + cause.getMessage());
}
@Override
public R<Boolean> registerUserInfo(SysUser sysUser) {
return R.fail("注册用户失败:" + cause.getMessage());
}
@Override
public R<Boolean> resetPwdByEmail(SysUser sysUser) {
return R.fail("重置用户密码失败:" + cause.getMessage());
}
@Override
public R<SysUserLeveDate> userLevel(Long userId) {
return R.fail("获取用户会员信息失败:" + cause.getMessage());
}
@Override
public R<Boolean> userLevelup(SysUserLeveDate user, String source) {
return R.fail("用户升级失败:" + cause.getMessage());
}
};
}
}

View File

@@ -0,0 +1,46 @@
package com.jxy.system.api.model;
import com.jxy.system.api.entity.SysUser;
import lombok.Data;
import java.io.Serializable;
import java.util.Set;
/**
* @Description 登陆的用户信息
* @Date 2022/5/12 15:13
* @Author 杜懿
*/
@Data
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 SysUser sysUser;
}

View File

@@ -0,0 +1,5 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
com.jxy.system.api.factory.RemoteUserFallbackFactory,\
com.jxy.system.api.factory.RemoteFileFallbackFactory,\
com.jxy.system.api.factory.RemoteMailFallbackFactory,\
com.jxy.system.api.factory.RemoteLogFallbackFactory

23
jxy-api/pom.xml Normal file
View File

@@ -0,0 +1,23 @@
<?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>marketall2</artifactId>
<groupId>com.jxy</groupId>
<version>3.5.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jxy-api</artifactId>
<packaging>pom</packaging>
<modules>
<module>api-system</module>
</modules>
<description>
jxy-api系统接口
</description>
</project>