diff --git a/student/springboot/src/main/java/com/example/controller/CourseController.java b/student/springboot/src/main/java/com/example/controller/CourseController.java new file mode 100644 index 0000000..939a575 --- /dev/null +++ b/student/springboot/src/main/java/com/example/controller/CourseController.java @@ -0,0 +1,29 @@ +package com.example.controller; + +import com.example.common.Result; +import com.example.entity.Course; +import com.example.service.CourseService; +import com.github.pagehelper.PageInfo; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@RestController +@RequestMapping("/course") +public class CourseController { + + @Resource + private CourseService courseService; + + @GetMapping("/selectPage") + public Result selectPage(@RequestParam(defaultValue = "1") Integer pageNum, + @RequestParam(defaultValue = "5") Integer pageSize){ + PageInfo pageInfo = courseService.selectPage(pageNum, pageSize); + return Result.success(pageInfo); + } + + +} diff --git a/student/springboot/src/main/java/com/example/entity/Course.java b/student/springboot/src/main/java/com/example/entity/Course.java new file mode 100644 index 0000000..bf18423 --- /dev/null +++ b/student/springboot/src/main/java/com/example/entity/Course.java @@ -0,0 +1,58 @@ +package com.example.entity; + +public class Course { + private Integer id; + private String name; + private String no; + private String descr; + private String times; + private String teacher; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getNo() { + return no; + } + + public void setNo(String no) { + this.no = no; + } + + public String getDescr() { + return descr; + } + + public void setDescr(String descr) { + this.descr = descr; + } + + public String getTimes() { + return times; + } + + public void setTimes(String times) { + this.times = times; + } + + public String getTeacher() { + return teacher; + } + + public void setTeacher(String teacher) { + this.teacher = teacher; + } +} diff --git a/student/springboot/src/main/java/com/example/mapper/CourseMapper.java b/student/springboot/src/main/java/com/example/mapper/CourseMapper.java new file mode 100644 index 0000000..7f54c87 --- /dev/null +++ b/student/springboot/src/main/java/com/example/mapper/CourseMapper.java @@ -0,0 +1,12 @@ +package com.example.mapper; + +import com.example.entity.Course; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +public interface CourseMapper { + + @Select("select * from course order by id desc") + List selectAll(); +} diff --git a/student/springboot/src/main/java/com/example/service/CourseService.java b/student/springboot/src/main/java/com/example/service/CourseService.java new file mode 100644 index 0000000..c912dc2 --- /dev/null +++ b/student/springboot/src/main/java/com/example/service/CourseService.java @@ -0,0 +1,24 @@ +package com.example.service; + +import com.example.entity.Course; +import com.example.mapper.CourseMapper; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +@Service +public class CourseService { + @Resource + private CourseMapper courseMapper; + + //total是查询的总数,list是查询的列表 + //当前页码,每页个数 + public PageInfo selectPage(Integer pageNum,Integer pageSize){ + PageHelper.startPage(pageNum,pageSize); + List courseList = courseMapper.selectAll(); + return PageInfo.of(courseList); + } +} diff --git a/student/springboot/target/classes/com/example/controller/CourseController.class b/student/springboot/target/classes/com/example/controller/CourseController.class new file mode 100644 index 0000000..1416ed3 Binary files /dev/null and b/student/springboot/target/classes/com/example/controller/CourseController.class differ diff --git a/student/springboot/target/classes/com/example/entity/Course.class b/student/springboot/target/classes/com/example/entity/Course.class new file mode 100644 index 0000000..135a375 Binary files /dev/null and b/student/springboot/target/classes/com/example/entity/Course.class differ diff --git a/student/springboot/target/classes/com/example/mapper/CourseMapper.class b/student/springboot/target/classes/com/example/mapper/CourseMapper.class new file mode 100644 index 0000000..e399cec Binary files /dev/null and b/student/springboot/target/classes/com/example/mapper/CourseMapper.class differ diff --git a/student/springboot/target/classes/com/example/service/CourseService.class b/student/springboot/target/classes/com/example/service/CourseService.class new file mode 100644 index 0000000..b402397 Binary files /dev/null and b/student/springboot/target/classes/com/example/service/CourseService.class differ diff --git a/student/springboot/target/maven-archiver/pom.properties b/student/springboot/target/maven-archiver/pom.properties new file mode 100644 index 0000000..ef91ce0 --- /dev/null +++ b/student/springboot/target/maven-archiver/pom.properties @@ -0,0 +1,3 @@ +artifactId=springboot +groupId=com.example +version=0.0.1-SNAPSHOT diff --git a/student/springboot/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/student/springboot/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..6ac3567 --- /dev/null +++ b/student/springboot/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,13 @@ +com\example\common\Result.class +com\example\entity\Course.class +com\example\common\CorsConfig.class +com\example\service\AdminService.class +com\example\service\CourseService.class +com\example\exception\GlobalExceptionHandler.class +com\example\SpringbootApplication.class +com\example\exception\CustomException.class +com\example\mapper\CourseMapper.class +com\example\entity\Admin.class +com\example\controller\WebController.class +com\example\controller\CourseController.class +com\example\mapper\AdminMapper.class diff --git a/student/springboot/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/student/springboot/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..e06cba2 --- /dev/null +++ b/student/springboot/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,13 @@ +D:\Program\project\student\springboot\src\main\java\com\example\common\CorsConfig.java +D:\Program\project\student\springboot\src\main\java\com\example\common\Result.java +D:\Program\project\student\springboot\src\main\java\com\example\service\AdminService.java +D:\Program\project\student\springboot\src\main\java\com\example\controller\CourseController.java +D:\Program\project\student\springboot\src\main\java\com\example\SpringbootApplication.java +D:\Program\project\student\springboot\src\main\java\com\example\entity\Admin.java +D:\Program\project\student\springboot\src\main\java\com\example\mapper\AdminMapper.java +D:\Program\project\student\springboot\src\main\java\com\example\controller\WebController.java +D:\Program\project\student\springboot\src\main\java\com\example\entity\Course.java +D:\Program\project\student\springboot\src\main\java\com\example\exception\CustomException.java +D:\Program\project\student\springboot\src\main\java\com\example\exception\GlobalExceptionHandler.java +D:\Program\project\student\springboot\src\main\java\com\example\mapper\CourseMapper.java +D:\Program\project\student\springboot\src\main\java\com\example\service\CourseService.java diff --git a/student/springboot/target/springboot-0.0.1-SNAPSHOT.jar b/student/springboot/target/springboot-0.0.1-SNAPSHOT.jar new file mode 100644 index 0000000..cc5b378 Binary files /dev/null and b/student/springboot/target/springboot-0.0.1-SNAPSHOT.jar differ diff --git a/student/springboot/target/springboot-0.0.1-SNAPSHOT.jar.original b/student/springboot/target/springboot-0.0.1-SNAPSHOT.jar.original new file mode 100644 index 0000000..542bde9 Binary files /dev/null and b/student/springboot/target/springboot-0.0.1-SNAPSHOT.jar.original differ diff --git a/student/vue/node_modules/.vite/deps/chunk-HVHU7B4R.js b/student/vue/node_modules/.vite/deps/chunk-HVHU7B4R.js new file mode 100644 index 0000000..697e377 --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-HVHU7B4R.js @@ -0,0 +1,3 @@ +// node_modules/element-plus/es/components/tag/style/index.mjs +import "D:/Program/project/student/vue/node_modules/element-plus/theme-chalk/src/tag.scss"; +//# sourceMappingURL=chunk-HVHU7B4R.js.map diff --git a/student/vue/node_modules/.vite/deps/chunk-HVHU7B4R.js.map b/student/vue/node_modules/.vite/deps/chunk-HVHU7B4R.js.map new file mode 100644 index 0000000..4c62dc3 --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-HVHU7B4R.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../element-plus/es/components/tag/style/index.mjs"], + "sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/tag.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n"], + "mappings": ";AACA,OAAO;", + "names": [] +} diff --git a/student/vue/node_modules/.vite/deps/chunk-I3KFJ4R4.js b/student/vue/node_modules/.vite/deps/chunk-I3KFJ4R4.js new file mode 100644 index 0000000..24371c1 --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-I3KFJ4R4.js @@ -0,0 +1,3 @@ +// node_modules/element-plus/es/components/popper/style/index.mjs +import "D:/Program/project/student/vue/node_modules/element-plus/theme-chalk/src/popper.scss"; +//# sourceMappingURL=chunk-I3KFJ4R4.js.map diff --git a/student/vue/node_modules/.vite/deps/chunk-I3KFJ4R4.js.map b/student/vue/node_modules/.vite/deps/chunk-I3KFJ4R4.js.map new file mode 100644 index 0000000..9365c00 --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-I3KFJ4R4.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../element-plus/es/components/popper/style/index.mjs"], + "sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/popper.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n"], + "mappings": ";AACA,OAAO;", + "names": [] +} diff --git a/student/vue/node_modules/.vite/deps/chunk-OHJ5C7WP.js b/student/vue/node_modules/.vite/deps/chunk-OHJ5C7WP.js new file mode 100644 index 0000000..9a36708 --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-OHJ5C7WP.js @@ -0,0 +1,3 @@ +// node_modules/element-plus/es/components/tooltip/style/index.mjs +import "D:/Program/project/student/vue/node_modules/element-plus/theme-chalk/src/tooltip.scss"; +//# sourceMappingURL=chunk-OHJ5C7WP.js.map diff --git a/student/vue/node_modules/.vite/deps/chunk-OHJ5C7WP.js.map b/student/vue/node_modules/.vite/deps/chunk-OHJ5C7WP.js.map new file mode 100644 index 0000000..7c5a6dc --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-OHJ5C7WP.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../element-plus/es/components/tooltip/style/index.mjs"], + "sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/tooltip.scss';\r\nimport '../../popper/style/index.mjs';\r\n//# sourceMappingURL=index.mjs.map\r\n"], + "mappings": ";AACA,OAAO;", + "names": [] +} diff --git a/student/vue/node_modules/.vite/deps/chunk-PBCG6G5X.js b/student/vue/node_modules/.vite/deps/chunk-PBCG6G5X.js new file mode 100644 index 0000000..5c6c95d --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-PBCG6G5X.js @@ -0,0 +1,3 @@ +// node_modules/element-plus/es/components/base/style/index.mjs +import "D:/Program/project/student/vue/node_modules/element-plus/theme-chalk/src/base.scss"; +//# sourceMappingURL=chunk-PBCG6G5X.js.map diff --git a/student/vue/node_modules/.vite/deps/chunk-PBCG6G5X.js.map b/student/vue/node_modules/.vite/deps/chunk-PBCG6G5X.js.map new file mode 100644 index 0000000..9fe6198 --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-PBCG6G5X.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../element-plus/es/components/base/style/index.mjs"], + "sourcesContent": ["import 'element-plus/theme-chalk/src/base.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n"], + "mappings": ";AAAA,OAAO;", + "names": [] +} diff --git a/student/vue/node_modules/.vite/deps/chunk-UZWGJV6M.js b/student/vue/node_modules/.vite/deps/chunk-UZWGJV6M.js new file mode 100644 index 0000000..1f407dc --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-UZWGJV6M.js @@ -0,0 +1,3 @@ +// node_modules/element-plus/es/components/checkbox/style/index.mjs +import "D:/Program/project/student/vue/node_modules/element-plus/theme-chalk/src/checkbox.scss"; +//# sourceMappingURL=chunk-UZWGJV6M.js.map diff --git a/student/vue/node_modules/.vite/deps/chunk-UZWGJV6M.js.map b/student/vue/node_modules/.vite/deps/chunk-UZWGJV6M.js.map new file mode 100644 index 0000000..7ebdb5b --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-UZWGJV6M.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../element-plus/es/components/checkbox/style/index.mjs"], + "sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/checkbox.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n"], + "mappings": ";AACA,OAAO;", + "names": [] +} diff --git a/student/vue/node_modules/.vite/deps/chunk-WPBAPOV4.js b/student/vue/node_modules/.vite/deps/chunk-WPBAPOV4.js new file mode 100644 index 0000000..437a9d3 --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-WPBAPOV4.js @@ -0,0 +1,3 @@ +// node_modules/element-plus/es/components/input/style/index.mjs +import "D:/Program/project/student/vue/node_modules/element-plus/theme-chalk/src/input.scss"; +//# sourceMappingURL=chunk-WPBAPOV4.js.map diff --git a/student/vue/node_modules/.vite/deps/chunk-WPBAPOV4.js.map b/student/vue/node_modules/.vite/deps/chunk-WPBAPOV4.js.map new file mode 100644 index 0000000..8b3470a --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-WPBAPOV4.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../element-plus/es/components/input/style/index.mjs"], + "sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/input.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n"], + "mappings": ";AACA,OAAO;", + "names": [] +} diff --git a/student/vue/node_modules/.vite/deps/chunk-ZPS6V2SU.js b/student/vue/node_modules/.vite/deps/chunk-ZPS6V2SU.js new file mode 100644 index 0000000..5b69747 --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-ZPS6V2SU.js @@ -0,0 +1,3 @@ +// node_modules/element-plus/es/components/scrollbar/style/index.mjs +import "D:/Program/project/student/vue/node_modules/element-plus/theme-chalk/src/scrollbar.scss"; +//# sourceMappingURL=chunk-ZPS6V2SU.js.map diff --git a/student/vue/node_modules/.vite/deps/chunk-ZPS6V2SU.js.map b/student/vue/node_modules/.vite/deps/chunk-ZPS6V2SU.js.map new file mode 100644 index 0000000..10d9cb9 --- /dev/null +++ b/student/vue/node_modules/.vite/deps/chunk-ZPS6V2SU.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../element-plus/es/components/scrollbar/style/index.mjs"], + "sourcesContent": ["import '../../base/style/index.mjs';\r\nimport 'element-plus/theme-chalk/src/scrollbar.scss';\r\n//# sourceMappingURL=index.mjs.map\r\n"], + "mappings": ";AACA,OAAO;", + "names": [] +}