diff --git a/pom.xml b/pom.xml
index 19d5afa..06abb0d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -8,78 +8,17 @@
2.7.9
- com.tansci
- tansci-boot
- 1.0.0
- tansci-boot
+ com.tansci
+ tansci-boot-parent
+ 1.0.0
+ pom
+
+ tansci-boot-parent
Tansci Spring Boot
-
- 1.8
- 3.4.3.1
- 1.2.6
- 1.34.0
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
- com.mysql
- mysql-connector-j
- runtime
-
-
-
- com.baomidou
- mybatis-plus-boot-starter
- ${mybatis-plus-boot.varsion}
-
-
-
- com.alibaba
- druid-spring-boot-starter
- ${druid-spring-boot.varsion}
-
-
-
- cn.dev33
- sa-token-spring-boot-starter
- ${sa-token-spring-boot.varsion}
-
-
-
- org.projectlombok
- lombok
- true
-
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
- org.projectlombok
- lombok
-
-
-
-
-
-
+
+ tansci-boot
+
diff --git a/sql/tansci_boot.sql b/sql/tansci_boot.sql
index ec91cd8..99aa3a6 100644
--- a/sql/tansci_boot.sql
+++ b/sql/tansci_boot.sql
@@ -11,7 +11,7 @@
Target Server Version : 50721
File Encoding : 65001
- Date: 20/03/2023 15:08:06
+ Date: 20/03/2023 17:12:50
*/
SET NAMES utf8mb4;
@@ -249,19 +249,23 @@ DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
`id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主键',
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '登录名',
- `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '姓名/昵称',
+ `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '姓名/昵称',
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '密码',
- `status` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '状态',
+ `type` int(1) NULL DEFAULT NULL COMMENT '用户类型:1、管理员,2、普通用户',
`phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '手机号',
- `head_portrait` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '头像',
+ `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '头像',
+ `gender` int(1) NULL DEFAULT NULL COMMENT '性别:0、男,1、女',
+ `birthday` date NULL DEFAULT NULL COMMENT '出生日期',
`is_login` int(1) NULL DEFAULT 0 COMMENT '禁止登录:0未禁用,1已禁用',
- `sort` int(12) NULL DEFAULT NULL COMMENT '排序',
- `office_id` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '组织机构id',
`is_del` int(1) NULL DEFAULT 0 COMMENT '删除标识:0未删除,1已删除',
+ `open_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '唯一标识',
+ `address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '地址',
+ `id_card` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '身份证号码',
+ `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '邮箱',
`create_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '创建人',
- `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
- `update_by` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '更新人',
`update_date` datetime NULL DEFAULT NULL COMMENT '更新时间',
+ `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
+ `remarks` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`, `username`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户表' ROW_FORMAT = DYNAMIC;
diff --git a/src/main/java/com/tansci/handler/GlobalExceptionHandler.java b/src/main/java/com/tansci/handler/GlobalExceptionHandler.java
deleted file mode 100644
index d361865..0000000
--- a/src/main/java/com/tansci/handler/GlobalExceptionHandler.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.tansci.handler;
-
-import cn.dev33.satoken.util.SaResult;
-import org.springframework.web.bind.annotation.ExceptionHandler;
-import org.springframework.web.bind.annotation.RestControllerAdvice;
-
-/**
- * @ClassName: GlobalExceptionHandler.java
- * @ClassPath: com.tansci.handler.GlobalExceptionHandler.java
- * @Description: 全局异常拦截
- * @Author: tanyp
- * @Date: 2023/3/20 15:02
- **/
-@RestControllerAdvice
-public class GlobalExceptionHandler {
-
- @ExceptionHandler
- public SaResult handlerException(Exception e) {
- e.printStackTrace();
- return SaResult.error(e.getMessage());
- }
-
-}
diff --git a/tansci-boot/pom.xml b/tansci-boot/pom.xml
new file mode 100644
index 0000000..07a59ba
--- /dev/null
+++ b/tansci-boot/pom.xml
@@ -0,0 +1,92 @@
+
+
+ 4.0.0
+
+ com.tansci
+ tansci-boot-parent
+ 1.0.0
+
+
+ com.tansci
+ tansci-boot
+ 1.0.0
+
+ tansci-boot
+ Tansci Spring Boot
+
+
+ 1.8
+ 3.4.3.1
+ 1.2.6
+ 1.34.0
+ 3.0.3
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ com.mysql
+ mysql-connector-j
+ runtime
+
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ ${mybatis-plus-boot.varsion}
+
+
+
+ com.alibaba
+ druid-spring-boot-starter
+ ${druid-spring-boot.varsion}
+
+
+
+ cn.dev33
+ sa-token-spring-boot-starter
+ ${sa-token-spring-boot.varsion}
+
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+
+ com.github.xiaoymin
+ knife4j-spring-boot-starter
+ ${knife4j-spring-boot.version}
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/main/java/com/tansci/TansciBootApplication.java b/tansci-boot/src/main/java/com/tansci/TansciBootApplication.java
similarity index 100%
rename from src/main/java/com/tansci/TansciBootApplication.java
rename to tansci-boot/src/main/java/com/tansci/TansciBootApplication.java
diff --git a/tansci-boot/src/main/java/com/tansci/common/WrapMapper.java b/tansci-boot/src/main/java/com/tansci/common/WrapMapper.java
new file mode 100644
index 0000000..487e71f
--- /dev/null
+++ b/tansci-boot/src/main/java/com/tansci/common/WrapMapper.java
@@ -0,0 +1,69 @@
+package com.tansci.common;
+
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * @ClassName: WrapMapper.java
+ * @ClassPath: com.tansci.common.WrapMapper.java
+ * @Description: 返回包装类
+ * @Author: tanyp
+ * @Date: 2023/3/20 15:28
+ **/
+public class WrapMapper {
+
+ private WrapMapper() {
+ }
+
+ public static Wrapper wrap(int code, String message, E o) {
+ return new Wrapper(code, message, o);
+ }
+
+ public static Wrapper wrap(int code, String message) {
+ return new Wrapper(code, message);
+ }
+
+ public static Wrapper wrap(int code) {
+ return wrap(code, null);
+ }
+
+ public static Wrapper wrap(Exception e) {
+ return new Wrapper(Wrapper.ERROR_CODE, e.getMessage());
+ }
+
+ public static E unWrap(Wrapper wrapper) {
+ return wrapper.getResult();
+ }
+
+ public static Wrapper illegalArgument() {
+ return wrap(Wrapper.ILLEGAL_ARGUMENT_CODE_, Wrapper.ILLEGAL_ARGUMENT_MESSAGE);
+ }
+
+ public static Wrapper error() {
+ return wrap(Wrapper.ERROR_CODE, Wrapper.ERROR_MESSAGE);
+ }
+
+ public static Wrapper error(String message) {
+ return wrap(Wrapper.ERROR_CODE, StringUtils.isBlank(message) ? Wrapper.ERROR_MESSAGE : message);
+ }
+
+ public static Wrapper error(int code, String message) {
+ return wrap(code, StringUtils.isBlank(message) ? Wrapper.ERROR_MESSAGE : message);
+ }
+
+ public static Wrapper ok() {
+ return new Wrapper();
+ }
+
+ public static Wrapper wrap(E o) {
+ return new Wrapper<>(Wrapper.SUCCESS_CODE, Wrapper.SUCCESS_MESSAGE, o);
+ }
+
+ public static Wrapper ok(E o) {
+ return new Wrapper<>(Wrapper.SUCCESS_CODE, Wrapper.SUCCESS_MESSAGE, o);
+ }
+
+ public static Wrapper success() {
+ return new Wrapper<>(Wrapper.SUCCESS_CODE, Wrapper.SUCCESS_MESSAGE);
+ }
+
+}
diff --git a/tansci-boot/src/main/java/com/tansci/common/Wrapper.java b/tansci-boot/src/main/java/com/tansci/common/Wrapper.java
new file mode 100644
index 0000000..03a36ab
--- /dev/null
+++ b/tansci-boot/src/main/java/com/tansci/common/Wrapper.java
@@ -0,0 +1,206 @@
+package com.tansci.common;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+import java.io.Serializable;
+
+/**
+ * @ClassName: Wrapper.java
+ * @ClassPath: com.tansci.common.Wrapper.java
+ * @Description: 包装类
+ * @Author: tanyp
+ * @Date: 2023/3/20 15:29
+ **/
+public class Wrapper implements Serializable {
+
+ /**
+ * 成功码.
+ */
+ public static final int SUCCESS_CODE = 200;
+
+ /**
+ * 成功信息.
+ */
+ public static final String SUCCESS_MESSAGE = "操作成功";
+
+ /**
+ * 错误码.
+ */
+ public static final int ERROR_CODE = 500;
+
+ /**
+ * 错误信息.
+ */
+ public static final String ERROR_MESSAGE = "系统异常,请稍后重试!";
+
+ /**
+ * 错误码:参数非法
+ */
+ public static final int ILLEGAL_ARGUMENT_CODE_ = 400;
+
+ /**
+ * 错误信息:参数非法
+ */
+ public static final String ILLEGAL_ARGUMENT_MESSAGE = "请求参数非法,请核查!";
+
+ /**
+ * 错误码:参数非法
+ */
+ public static final int AUTHORIZATION_CODE = 403;
+
+ /**
+ * 错误信息:参数非法
+ */
+ public static final String AUTHORIZATION_MESSAGE = "用户凭证已过期,请重新登录!";
+
+ /**
+ * 编号.
+ */
+ private int code;
+
+ /**
+ * 信息.
+ */
+ private String message;
+
+ /**
+ * 结果数据
+ */
+ private T result;
+
+ /**
+ * Instantiates a new wrapper. default code=200
+ */
+ public Wrapper() {
+ this(SUCCESS_CODE, SUCCESS_MESSAGE);
+ }
+
+ /**
+ * Instantiates a new wrapper.
+ *
+ * @param code the code
+ * @param message the message
+ */
+ public Wrapper(int code, String message) {
+ this.code(code).message(message);
+ }
+
+ /**
+ * Instantiates a new wrapper.
+ *
+ * @param code the code
+ * @param message the message
+ * @param result the result
+ */
+ public Wrapper(int code, String message, T result) {
+ super();
+ this.code(code).message(message).result(result);
+ }
+
+ /**
+ * Gets the 编号.
+ *
+ * @return the 编号
+ */
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Sets the 编号.
+ *
+ * @param code the new 编号
+ */
+ public void setCode(int code) {
+ this.code = code;
+ }
+
+ /**
+ * Gets the 信息.
+ *
+ * @return the 信息
+ */
+ public String getMessage() {
+ return message;
+ }
+
+ /**
+ * Sets the 信息.
+ *
+ * @param message the new 信息
+ */
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ /**
+ * Gets the 结果数据.
+ *
+ * @return the 结果数据
+ */
+ public T getResult() {
+ return result;
+ }
+
+ /**
+ * Sets the 结果数据.
+ *
+ * @param result the new 结果数据
+ */
+ public void setResult(T result) {
+ this.result = result;
+ }
+
+ /**
+ * Sets the 编号 ,返回自身的引用.
+ *
+ * @param code the new 编号
+ * @return the wrapper
+ */
+ public Wrapper code(int code) {
+ this.setCode(code);
+ return this;
+ }
+
+ /**
+ * Sets the 信息 ,返回自身的引用.
+ *
+ * @param message the new 信息
+ * @return the wrapper
+ */
+ public Wrapper message(String message) {
+ this.setMessage(message);
+ return this;
+ }
+
+ /**
+ * Sets the 结果数据 ,返回自身的引用.
+ *
+ * @param result the new 结果数据
+ * @return the wrapper
+ */
+ public Wrapper result(T result) {
+ this.setResult(result);
+ return this;
+ }
+
+ @Override
+ public String toString() {
+ return "Wrapper{" +
+ "code=" + code +
+ ", message='" + message + '\'' +
+ ", result=" + result +
+ '}';
+ }
+
+ @JsonIgnore
+ public boolean isSuccess() {
+ return this.getCode() == Wrapper.SUCCESS_CODE;
+ }
+
+ @JsonIgnore
+ public boolean isFail() {
+ return !isSuccess();
+ }
+
+}
diff --git a/tansci-boot/src/main/java/com/tansci/common/constant/Constants.java b/tansci-boot/src/main/java/com/tansci/common/constant/Constants.java
new file mode 100644
index 0000000..7019b09
--- /dev/null
+++ b/tansci-boot/src/main/java/com/tansci/common/constant/Constants.java
@@ -0,0 +1,21 @@
+package com.tansci.common.constant;
+
+/**
+ * @ClassName: Constants.java
+ * @ClassPath: com.tansci.common.constant.Constants.java
+ * @Description: 常量
+ * @Author: tanyp
+ * @Date: 2023/3/20 17:02
+ **/
+public class Constants {
+
+ /**
+ * 未删除状态
+ */
+ public final static Integer NOT_DEL_FALG = 0;
+ /**
+ * 已删除状态
+ */
+ public final static Integer IS_DEL_FALG = 1;
+
+}
diff --git a/tansci-boot/src/main/java/com/tansci/common/constant/Enums.java b/tansci-boot/src/main/java/com/tansci/common/constant/Enums.java
new file mode 100644
index 0000000..545abca
--- /dev/null
+++ b/tansci-boot/src/main/java/com/tansci/common/constant/Enums.java
@@ -0,0 +1,48 @@
+package com.tansci.common.constant;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+import java.util.Objects;
+
+/**
+ * @ClassName: Enums.java
+ * @ClassPath: com.tansci.common.constant.Enums.java
+ * @Description: 常用枚举
+ * @Author: tanyp
+ * @Date: 2023/3/20 15:25
+ **/
+@Getter
+@NoArgsConstructor
+@AllArgsConstructor
+public enum Enums {
+ /**
+ * 用户性别
+ */
+ USER_GENDER_MALE(0, "user_gender", "男"),
+ USER_GENDER_GIRL(1, "user_gender", "女"),
+
+ /**
+ * 用户类型
+ */
+ USER_TYPE_1(1, "user_type", "管理员"),
+ USER_TYPE_2(2, "user_type", "商户"),
+
+ ;
+
+ private Integer key;
+ private String group;
+ private String value;
+
+
+ public static String getVlaueByGroup(Integer key, String group) {
+ for (Enums item : Enums.values()) {
+ if (Objects.equals(key, item.key) && Objects.equals(group, item.group)) {
+ return item.getValue();
+ }
+ }
+ return null;
+ }
+
+}
diff --git a/tansci-boot/src/main/java/com/tansci/config/CorsConfig.java b/tansci-boot/src/main/java/com/tansci/config/CorsConfig.java
new file mode 100644
index 0000000..4085ac1
--- /dev/null
+++ b/tansci-boot/src/main/java/com/tansci/config/CorsConfig.java
@@ -0,0 +1,27 @@
+package com.tansci.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+
+/**
+ * @ClassName: CorsConfig.java
+ * @ClassPath: com.tansci.config.CorsConfig.java
+ * @Description: 跨域配置
+ * @Author: tanyp
+ * @Date: 2023/3/20 15:23
+ **/
+@Configuration
+public class CorsConfig extends WebMvcConfigurerAdapter {
+
+ @Override
+ public void addCorsMappings(CorsRegistry registry) {
+ // 设置允许跨域的路由
+ registry.addMapping("/**")
+ .allowedOriginPatterns("*") // 设置允许跨域请求的域名
+ .allowCredentials(true) // 是否允许证书(cookies)
+ .allowedMethods("GET", "POST", "DELETE", "PUT", "OPTIONS") // 设置允许的方法
+ .maxAge(3600); // 跨域允许时间
+ }
+
+}
diff --git a/tansci-boot/src/main/java/com/tansci/config/Knife4jConfig.java b/tansci-boot/src/main/java/com/tansci/config/Knife4jConfig.java
new file mode 100644
index 0000000..ff28bbb
--- /dev/null
+++ b/tansci-boot/src/main/java/com/tansci/config/Knife4jConfig.java
@@ -0,0 +1,48 @@
+package com.tansci.config;
+
+import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+/**
+ * @ClassName: Knife4jConfig.java
+ * @ClassPath: com.tansci.config.Knife4jConfig.java
+ * @Description: Knife4j配置
+ * @Author: tanyp
+ * @Date: 2023/3/20 15:22
+ **/
+@Configuration
+@EnableSwagger2
+@EnableKnife4j
+public class Knife4jConfig {
+
+ @Bean
+ public Docket createRestApi() {
+ return new Docket(DocumentationType.SWAGGER_2)
+ .useDefaultResponseMessages(false)
+ .apiInfo(apiInfo())
+ .select()
+ .apis(RequestHandlerSelectors.basePackage("com.tansci.controller"))
+ .paths(PathSelectors.any())
+ .build();
+
+ }
+
+ private ApiInfo apiInfo() {
+ return new ApiInfoBuilder()
+ .title("API 文档")
+ .description("接口文档")
+ .contact(new Contact("tanyp", "http://127.0.0.1:8081/doc.html", ""))
+ .version("1.0.0")
+ .build();
+ }
+
+}
diff --git a/tansci-boot/src/main/java/com/tansci/config/MybatisPlusConfig.java b/tansci-boot/src/main/java/com/tansci/config/MybatisPlusConfig.java
new file mode 100644
index 0000000..0036cb3
--- /dev/null
+++ b/tansci-boot/src/main/java/com/tansci/config/MybatisPlusConfig.java
@@ -0,0 +1,28 @@
+package com.tansci.config;
+
+import com.baomidou.mybatisplus.annotation.DbType;
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @ClassName: MybatisPlusConfig.java
+ * @ClassPath: com.tansci.config.MybatisPlusConfig.java
+ * @Description: MybatisPlus分页配置
+ * @Author: tanyp
+ * @Date: 2023/3/20 15:24
+ **/
+@Configuration
+@MapperScan("com.tansci.mapper")
+public class MybatisPlusConfig {
+
+ @Bean
+ public MybatisPlusInterceptor mybatisPlusInterceptor() {
+ MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
+ interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
+ return interceptor;
+ }
+
+}
diff --git a/src/main/java/com/tansci/config/SaTokenConfig.java b/tansci-boot/src/main/java/com/tansci/config/SaTokenConfig.java
similarity index 100%
rename from src/main/java/com/tansci/config/SaTokenConfig.java
rename to tansci-boot/src/main/java/com/tansci/config/SaTokenConfig.java
diff --git a/tansci-boot/src/main/java/com/tansci/controller/AuthController.java b/tansci-boot/src/main/java/com/tansci/controller/AuthController.java
new file mode 100644
index 0000000..b8eda16
--- /dev/null
+++ b/tansci-boot/src/main/java/com/tansci/controller/AuthController.java
@@ -0,0 +1,43 @@
+package com.tansci.controller;
+
+import cn.dev33.satoken.stp.StpUtil;
+import com.tansci.common.WrapMapper;
+import com.tansci.common.Wrapper;
+import com.tansci.domain.SysUser;
+import com.tansci.service.SysUserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @ClassName: AuthController.java
+ * @ClassPath: com.tansci.controller.AuthController.java
+ * @Description: 鉴权管理
+ * @Author: tanyp
+ * @Date: 2023/3/20 15:52
+ **/
+@Slf4j
+@RestController
+@RequestMapping("/auth")
+@Api(value = "auth", tags = "鉴权管理")
+public class AuthController {
+
+ @Autowired
+ private SysUserService sysUserService;
+
+ @ApiOperation(value = "登录", notes = "登录")
+ @PostMapping("/login")
+ public Wrapper login(@RequestBody SysUser user) {
+ return WrapMapper.wrap(Wrapper.SUCCESS_CODE, Wrapper.SUCCESS_MESSAGE, sysUserService.login(user.getUsername()));
+ }
+
+ @ApiOperation(value = "登出", notes = "登出")
+ @GetMapping("/logout")
+ public Wrapper