From 6e8271a4dbbc201ba5d0af4a77d5ea4badb09517 Mon Sep 17 00:00:00 2001 From: bunny <1319900154@qq.com> Date: Mon, 22 Apr 2024 18:39:37 +0800 Subject: [PATCH] =?UTF-8?q?:rocket:=20=E6=9F=A5=E8=AF=A2=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 40 ++++++++++++++ .../atguigu/config/MybatisPlusConfig.class | Bin 772 -> 1867 bytes logs/service-oa/spring.log | 52 ++++++++++++++++++ .../auth/controller/SysRoleController.java | 28 ++++++++++ .../atguigu/auth/mapper/SysRoleMapper.java | 7 +++ .../atguigu/auth/service/SysRoleService.java | 7 +++ .../auth/service/impl/SysRoleServiceImpl.java | 11 ++++ 7 files changed, 145 insertions(+) create mode 100644 .gitignore create mode 100644 service-oa/src/main/java/com/atguigu/auth/controller/SysRoleController.java create mode 100644 service-oa/src/main/java/com/atguigu/auth/mapper/SysRoleMapper.java create mode 100644 service-oa/src/main/java/com/atguigu/auth/service/SysRoleService.java create mode 100644 service-oa/src/main/java/com/atguigu/auth/service/impl/SysRoleServiceImpl.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..08c4504 --- /dev/null +++ b/.gitignore @@ -0,0 +1,40 @@ +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/libraries/ +*.iws +*.iml +*.ipr + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store + +/logs/ \ No newline at end of file diff --git a/common/service-util/target/classes/com/atguigu/config/MybatisPlusConfig.class b/common/service-util/target/classes/com/atguigu/config/MybatisPlusConfig.class index 3a590693b074405acdc65cacea6e5a83e362c0d0..7a8d772495b8e1de6c6eef8ce4acf90982fc80e9 100644 GIT binary patch literal 1867 zcmb_dUvC>l5dWbL@fNN-c$;A)2z`c1 zCyaa^2b;57yc7Dqj9Lt1^GYjogKTQ`HHOi4xFH!PJ4(xsl3rIv_e3`!4LN%vSQC-5 z_knWMe5zuG>5donxG;XA{Dga<-c&wc+35Mlx3rOwC;KLh7?x`F z6r(G`p4tc#J}~T)H^O~r~*U(h-< zlv$`L^J`g2`;pTAW+Zy@voPAW6);4ai@!|yq7<6=jn8|*px*9km{9)9%2u~JRITQg zxGxw!I5dEXgpP%0N#uhp>GW;(KduNZeA$!QQ0ztuH7G2PQ_gws718g@Xw^%J7VnE7 zAz~-#Wt)SSZ8n;{)P`a1P+EuNojrXLr3Gu1aT2G>sNe*{x!)dt{p*9Ta*02E@a2=A zzIpO+ui0!mc&CgO<{1`jZ~dpfVEFI|7)omy@jHSVEhT-+-g8~%;N3EA;60nm`(-R( zk>T!<@o)F3rBrN`M{~7p1N=P-!%=!S+a89yY$^WRh&pJOaT7}n$8G!Z zKxm)e?rurXkm}&}plzY_X2@`=*4Z~-HFg+Uc9}GuS(e;n-0a@l=~Jf_SJqeWb{MWc zJMkee>S|s)ioIoZLTqdd*Jt@3aE2F9R`7!;Y0{?;mT8#=HH>x`O1?DN-etIwFIhVf zaonnBGnHS@xJ1i;ivA23&f2LVX@q1NBKob;jnm2KEH-w*9+FVNY5E;Yl@&Zsayc`= z8G^7tFW^P8vd&*%lqBH#BNQqlKVYG1i&cgR}k!qR=pDcL{Mx|DJT qN|nj)ar`j~HZ_(@ZHfS2B3%J5ryy0T%VoM>A*<<6z+$|D8t?~VN-2*3 delta 259 zcmYL>yG{a87=*ubmfdBS10vv^izGJMY)E_$Lqcb@5Mx4&jmFl-%1U#dgiv5e@By^( z0elwYxF*od%s(^#eAb?#-p9}K9XO|-60#q2kaEaTf~6hPc^y9cZ!_>OrtPctD=3rr zQR%eXb@VuPM8t;rG=IpmoBZ}VyBJTeCii|74j--dz-Ub+DJ!jaVX7+=8*zBHz|4xc zB8&>t;iTPvfhsj!WwzGO{UU*+Vc!Vml>P<`n}G`Ugt|=2HVyGE0ZnmBwVg}Mot!=R E1&?|hX8-^I diff --git a/logs/service-oa/spring.log b/logs/service-oa/spring.log index d4e7ec6..ea102c4 100644 --- a/logs/service-oa/spring.log +++ b/logs/service-oa/spring.log @@ -21,3 +21,55 @@ 18:27:46:478 INFO 20440 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' 18:27:46:859 INFO 20440 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8800 (http) with context path '' 18:27:46:901 INFO 20440 --- [main] com.atguigu.auth.ServiceAuthApplication : Started ServiceAuthApplication in 1.425 seconds (JVM running for 1.84) +18:30:11:824 INFO 21276 --- [main] com.atguigu.auth.ServiceAuthApplication : Starting ServiceAuthApplication on bunny with PID 21276 (G:\java项目\guigu-oa-parent\service-oa\target\classes started by 13199 in G:\java项目\guigu-oa-parent) +18:30:11:826 INFO 21276 --- [main] com.atguigu.auth.ServiceAuthApplication : The following profiles are active: dev +18:30:12:276 WARN 21276 --- [main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.atguigu.*.mapper]' package. Please check your configuration. +18:30:12:444 INFO 21276 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8800 (http) +18:30:12:447 INFO 21276 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +18:30:12:447 INFO 21276 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.39] +18:30:12:486 INFO 21276 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext +18:30:12:486 INFO 21276 --- [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 636 ms +18:30:12:671 INFO 21276 --- [main] com.atguigu.config.MybatisPlusConfig : 注入MybatisPlus配置类... +18:30:12:708 INFO 21276 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' +18:30:13:102 INFO 21276 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8800 (http) with context path '' +18:30:13:161 INFO 21276 --- [main] com.atguigu.auth.ServiceAuthApplication : Started ServiceAuthApplication in 1.535 seconds (JVM running for 1.937) +18:30:44:868 INFO 21276 --- [SpringContextShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' +18:30:47:412 INFO 7124 --- [main] com.atguigu.auth.ServiceAuthApplication : Starting ServiceAuthApplication on bunny with PID 7124 (G:\java项目\guigu-oa-parent\service-oa\target\classes started by 13199 in G:\java项目\guigu-oa-parent) +18:30:47:413 INFO 7124 --- [main] com.atguigu.auth.ServiceAuthApplication : The following profiles are active: dev +18:30:47:844 WARN 7124 --- [main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.atguigu.*.mapper]' package. Please check your configuration. +18:30:48:014 INFO 7124 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8800 (http) +18:30:48:018 INFO 7124 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +18:30:48:018 INFO 7124 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.39] +18:30:48:057 INFO 7124 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext +18:30:48:058 INFO 7124 --- [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 623 ms +18:30:48:239 INFO 7124 --- [main] com.atguigu.config.MybatisPlusConfig : 注入MybatisPlus配置类... +18:30:48:273 INFO 7124 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' +18:30:48:669 INFO 7124 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8800 (http) with context path '' +18:30:48:728 INFO 7124 --- [main] com.atguigu.auth.ServiceAuthApplication : Started ServiceAuthApplication in 1.515 seconds (JVM running for 1.921) +18:30:56:985 INFO 7124 --- [SpringContextShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' +18:30:59:550 INFO 21220 --- [main] com.atguigu.auth.ServiceAuthApplication : Starting ServiceAuthApplication on bunny with PID 21220 (G:\java项目\guigu-oa-parent\service-oa\target\classes started by 13199 in G:\java项目\guigu-oa-parent) +18:30:59:552 INFO 21220 --- [main] com.atguigu.auth.ServiceAuthApplication : The following profiles are active: dev +18:30:59:969 WARN 21220 --- [main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.atguigu.*.mapper]' package. Please check your configuration. +18:31:00:126 INFO 21220 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8800 (http) +18:31:00:131 INFO 21220 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +18:31:00:131 INFO 21220 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.39] +18:31:00:167 INFO 21220 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext +18:31:00:167 INFO 21220 --- [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 594 ms +18:31:00:335 INFO 21220 --- [main] com.atguigu.config.MybatisPlusConfig : 注入MybatisPlus配置类... +18:31:00:367 INFO 21220 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' +18:31:00:757 INFO 21220 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8800 (http) with context path '' +18:31:00:811 INFO 21220 --- [main] com.atguigu.auth.ServiceAuthApplication : Started ServiceAuthApplication in 1.459 seconds (JVM running for 1.87) +18:31:12:897 INFO 21220 --- [SpringContextShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' +18:31:14:479 INFO 17940 --- [main] com.atguigu.auth.ServiceAuthApplication : Starting ServiceAuthApplication on bunny with PID 17940 (G:\java项目\guigu-oa-parent\service-oa\target\classes started by 13199 in G:\java项目\guigu-oa-parent) +18:31:14:480 INFO 17940 --- [main] com.atguigu.auth.ServiceAuthApplication : The following profiles are active: dev +18:31:14:890 WARN 17940 --- [main] o.m.s.mapper.ClassPathMapperScanner : No MyBatis mapper was found in '[com.atguigu.*.mapper]' package. Please check your configuration. +18:31:15:042 INFO 17940 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8800 (http) +18:31:15:045 INFO 17940 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +18:31:15:045 INFO 17940 --- [main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.39] +18:31:15:080 INFO 17940 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext +18:31:15:081 INFO 17940 --- [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 578 ms +18:31:15:243 INFO 17940 --- [main] com.atguigu.config.MybatisPlusConfig : 注入MybatisPlus配置类... +18:31:15:274 INFO 17940 --- [main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' +18:31:15:665 INFO 17940 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8800 (http) with context path '' +18:31:15:722 INFO 17940 --- [main] com.atguigu.auth.ServiceAuthApplication : Started ServiceAuthApplication in 1.437 seconds (JVM running for 1.865) +18:31:21:234 INFO 17940 --- [SpringContextShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' diff --git a/service-oa/src/main/java/com/atguigu/auth/controller/SysRoleController.java b/service-oa/src/main/java/com/atguigu/auth/controller/SysRoleController.java new file mode 100644 index 0000000..61acad3 --- /dev/null +++ b/service-oa/src/main/java/com/atguigu/auth/controller/SysRoleController.java @@ -0,0 +1,28 @@ +package com.atguigu.auth.controller; + +import com.atguigu.auth.service.SysRoleService; +import com.atguigu.common.result.Result; +import com.atguigu.model.system.SysRole; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@Api(tags = "角色管理") +@RestController +@RequestMapping("/admin/system/sysRole") +public class SysRoleController { + @Autowired + private SysRoleService sysRoleService; + + @ApiOperation(value = "查询全部角色列表") + @GetMapping("findAll") + public Result> findAll() { + List sysRoleList = sysRoleService.list(); + return Result.success(sysRoleList); + } +} diff --git a/service-oa/src/main/java/com/atguigu/auth/mapper/SysRoleMapper.java b/service-oa/src/main/java/com/atguigu/auth/mapper/SysRoleMapper.java new file mode 100644 index 0000000..8592f4c --- /dev/null +++ b/service-oa/src/main/java/com/atguigu/auth/mapper/SysRoleMapper.java @@ -0,0 +1,7 @@ +package com.atguigu.auth.mapper; + +import com.atguigu.model.system.SysRole; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +public interface SysRoleMapper extends BaseMapper { +} diff --git a/service-oa/src/main/java/com/atguigu/auth/service/SysRoleService.java b/service-oa/src/main/java/com/atguigu/auth/service/SysRoleService.java new file mode 100644 index 0000000..365bbf1 --- /dev/null +++ b/service-oa/src/main/java/com/atguigu/auth/service/SysRoleService.java @@ -0,0 +1,7 @@ +package com.atguigu.auth.service; + +import com.atguigu.model.system.SysRole; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface SysRoleService extends IService { +} diff --git a/service-oa/src/main/java/com/atguigu/auth/service/impl/SysRoleServiceImpl.java b/service-oa/src/main/java/com/atguigu/auth/service/impl/SysRoleServiceImpl.java new file mode 100644 index 0000000..7f22e1d --- /dev/null +++ b/service-oa/src/main/java/com/atguigu/auth/service/impl/SysRoleServiceImpl.java @@ -0,0 +1,11 @@ +package com.atguigu.auth.service.impl; + +import com.atguigu.auth.mapper.SysRoleMapper; +import com.atguigu.auth.service.SysRoleService; +import com.atguigu.model.system.SysRole; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +@Service +public class SysRoleServiceImpl extends ServiceImpl implements SysRoleService { +}