main
parent
3ab8e6c3d3
commit
a23af9b191
@ -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<Course> pageInfo = courseService.selectPage(pageNum, pageSize);
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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<Course> selectAll();
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
artifactId=springboot
|
||||
groupId=com.example
|
||||
version=0.0.1-SNAPSHOT
|
||||
@ -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
|
||||
@ -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
|
||||
Binary file not shown.
Binary file not shown.
@ -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
|
||||
@ -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": []
|
||||
}
|
||||
@ -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
|
||||
@ -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": []
|
||||
}
|
||||
@ -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
|
||||
@ -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": []
|
||||
}
|
||||
@ -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
|
||||
@ -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": []
|
||||
}
|
||||
@ -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
|
||||
@ -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": []
|
||||
}
|
||||
@ -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
|
||||
@ -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": []
|
||||
}
|
||||
@ -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
|
||||
@ -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": []
|
||||
}
|
||||
Loading…
Reference in new issue