parent
b77dbadd4a
commit
243d960e1b
|
@ -2,6 +2,7 @@
|
|||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="true" />
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-17" project-jdk-type="JavaSDK" />
|
||||
</project>
|
|
@ -1,25 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
package com.atguigu.spzx.manger;
|
||||
|
||||
<contextName>logback</contextName>
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
<!-- 日志的输出目录 -->
|
||||
<property name="log.path" value="D://logs//spzx-manager//logs" />
|
||||
|
||||
<!--控制台日志格式:彩色日志-->
|
||||
<!-- magenta:洋红 -->
|
||||
<!-- boldMagenta:粗红-->
|
||||
<!-- cyan:青色 -->
|
||||
<!-- white:白色 -->
|
||||
<!-- magenta:洋红 -->
|
||||
<property name="CONSOLE_LOG_PATTERN" value="%yellow(%date{yyyy-MM-dd HH:mm:ss}) %highlight([%-5level]) %green(%logger) %msg%n"/>
|
||||
|
||||
<!--文件日志格式-->
|
||||
<property name="FILE_LOG_PATTERN" value="%date{yyyy-MM-dd HH:mm:ss} [%-5level] %thread %file:%line %logger %msg%n" />
|
||||
|
||||
<!--编码-->
|
||||
<property name="ENCODING" value="UTF-8" />
|
||||
|
||||
<!-- 控制台日志 -->
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<!-- 临界值过滤器 -
|
||||
@SpringBootApplication
|
||||
@EnableTransactionManagement // 开启注解方式的事务管理
|
||||
@EnableCaching// 开启缓存注解
|
||||
@EnableScheduling
|
||||
@ComponentScan("com.atguigu")
|
||||
@MapperScan("com.atguigu.spzx.manger.mapper")
|
||||
@Slf4j
|
||||
public class MangerApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MangerApplication.class, args);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,22 +1,18 @@
|
|||
package com.atguigu.spzx.manger.controller;
|
||||
|
||||
import com.atguigu.context.BaseContext;
|
||||
import com.atguigu.spzx.manger.service.SysMenuService;
|
||||
import com.atguigu.spzx.manger.service.SysUserService;
|
||||
import com.atguigu.spzx.manger.service.ValidateCodeService;
|
||||
import com.atguigu.spzx.model.dto.system.LoginDto;
|
||||
import com.atguigu.spzx.model.entity.system.SysUser;
|
||||
import com.atguigu.spzx.model.vo.result.Result;
|
||||
import com.atguigu.spzx.model.vo.system.LoginVo;
|
||||
import com.atguigu.spzx.model.vo.system.SysMenuVo;
|
||||
import com.atguigu.spzx.model.vo.system.ValidateCodeVo;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Tag(name = "用户相关接口")
|
||||
@RestController
|
||||
@RequestMapping("/admin/system/index")
|
||||
|
@ -24,8 +20,6 @@ public class IndexController {
|
|||
@Autowired
|
||||
private SysUserService sysUserService;
|
||||
@Autowired
|
||||
private SysMenuService sysMenuService;
|
||||
@Autowired
|
||||
private ValidateCodeService validateCodeService;
|
||||
|
||||
@Operation(summary = "生成验证码", description = "生成验证码信息")
|
||||
|
@ -50,3 +44,9 @@ public class IndexController {
|
|||
}
|
||||
|
||||
@Operation(summary = "用户退出", description = "用户退出接口")
|
||||
@GetMapping("logout")
|
||||
public Result<String> logout(@RequestHeader(name = "token") String token) {
|
||||
sysUserService.logout(token);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
|
@ -42,7 +42,7 @@ public class SysMenuController {
|
|||
|
||||
@Operation(summary = "删除菜单", description = "删除菜单")
|
||||
@PutMapping("removeById/{id}")
|
||||
public Result removeById(@PathVariable Long id) {
|
||||
public Result<Long> removeById(@PathVariable Long id) {
|
||||
sysMenuService.removeById(id);
|
||||
return Result.success();
|
||||
}
|
||||
|
|
|
@ -2,13 +2,12 @@ package com.atguigu.spzx.manger.service.module;
|
|||
|
||||
import com.atguigu.spzx.manger.mapper.SysMenuMapper;
|
||||
import com.atguigu.spzx.manger.mapper.SysRoleMenuMapper;
|
||||
import com.atguigu.spzx.manger.service.impl.SysMenuServiceImpl;
|
||||
import com.atguigu.spzx.model.entity.system.SysMenu;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class SysMenuServiceImplModule extends SysMenuServiceImpl {
|
||||
public class SysMenuServiceImplModule {
|
||||
@Autowired
|
||||
private SysMenuMapper sysMenuMapper;
|
||||
@Autowired
|
||||
|
|
Loading…
Reference in New Issue