Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dd_school
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqi
dd_school
Commits
7d635364
Commit
7d635364
authored
Dec 01, 2023
by
baochunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#G:新增app 选课课程查看接口
parent
73c89d06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
smart-campus/src/main/java/yangtz/cs/liu/wechat/controller/courseSelection/WxCouresSelection.java
+11
-9
No files found.
smart-campus/src/main/java/yangtz/cs/liu/wechat/controller/courseSelection/WxCouresSelection.java
View file @
7d635364
...
@@ -3,15 +3,12 @@ package yangtz.cs.liu.wechat.controller.courseSelection;
...
@@ -3,15 +3,12 @@ package yangtz.cs.liu.wechat.controller.courseSelection;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
java.util.Calendar
;
import
java.util.Calendar
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -19,11 +16,9 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -19,11 +16,9 @@ import org.springframework.web.bind.annotation.RestController;
import
yangtz.cs.liu.campus.domain.curricula.CurriclaStudentVo
;
import
yangtz.cs.liu.campus.domain.curricula.CurriclaStudentVo
;
import
yangtz.cs.liu.campus.domain.curricula.CurriculaStudent
;
import
yangtz.cs.liu.campus.domain.curricula.CurriculaStudent
;
import
yangtz.cs.liu.campus.domain.curricula.CurriculaVariable
;
import
yangtz.cs.liu.campus.domain.curricula.CurriculaVariable
;
import
yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade
;
import
yangtz.cs.liu.campus.service.curricula.ICurriculaStudentService
;
import
yangtz.cs.liu.campus.service.curricula.ICurriculaStudentService
;
import
yangtz.cs.liu.campus.service.curricula.ICurriculaVariableService
;
import
yangtz.cs.liu.campus.service.curricula.ICurriculaVariableService
;
import
yangtz.cs.liu.campus.service.curricula.IStudentScoreService
;
import
yangtz.cs.liu.campus.service.curricula.IStudentScoreService
;
import
yangtz.cs.liu.campus.vo.curricula.CurriculaStudentVo
;
import
yangtz.cs.liu.campus.vo.student.SchoolStudentScoreVo
;
import
yangtz.cs.liu.campus.vo.student.SchoolStudentScoreVo
;
/**
/**
...
@@ -45,12 +40,13 @@ public class WxCouresSelection {
...
@@ -45,12 +40,13 @@ public class WxCouresSelection {
/**
/**
* 学生选号信息查询
* 学生选号信息查询
*/
*/
@GetMapping
(
"/getCourseInfo/{studentId}"
)
@GetMapping
(
"/getCourseInfo/{studentId}
/{id}
"
)
private
AjaxResult
getCourseInfo
(
@PathVariable
(
"studentId"
)
Long
studentId
)
{
private
AjaxResult
getCourseInfo
(
@PathVariable
(
"studentId"
)
Long
studentId
,
@PathVariable
(
"id"
)
Long
id
)
{
//查询学生个人选课信息
//查询学生个人选课信息
LambdaQueryWrapper
<
CurriculaStudent
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
CurriculaStudent
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
CurriculaStudent:
:
getStudentId
,
studentId
);
wrapper
.
eq
(
CurriculaStudent:
:
getStudentId
,
studentId
);
wrapper
.
eq
(
CurriculaStudent:
:
getDelFlag
,
"0"
);
wrapper
.
eq
(
CurriculaStudent:
:
getDelFlag
,
"0"
);
wrapper
.
eq
(
CurriculaStudent:
:
getCurriculaId
,
id
);
//查询出学生任务信息
//查询出学生任务信息
CurriculaStudent
one
=
iCurriculaStudentService
.
getOne
(
wrapper
);
CurriculaStudent
one
=
iCurriculaStudentService
.
getOne
(
wrapper
);
//判断当前学生是否可以选课
//判断当前学生是否可以选课
...
@@ -104,6 +100,13 @@ public class WxCouresSelection {
...
@@ -104,6 +100,13 @@ public class WxCouresSelection {
}
}
/**
* 学生选课课程展示
*/
@GetMapping
(
"/getCurriculaSub/{id}"
)
public
AjaxResult
getCurriculaSub
(
@PathVariable
(
"id"
)
Long
id
){
return
AjaxResult
.
success
(
iCurriculaVariableService
.
selectCurriculaVariableById
(
id
));
}
/**
/**
* 学生成绩查询
* 学生成绩查询
...
@@ -133,12 +136,11 @@ public class WxCouresSelection {
...
@@ -133,12 +136,11 @@ public class WxCouresSelection {
private
AjaxResult
saveStudentcourse
(
@RequestBody
CurriculaStudent
curriculaStudent
){
private
AjaxResult
saveStudentcourse
(
@RequestBody
CurriculaStudent
curriculaStudent
){
//保存专业信息
//保存专业信息
try
{
try
{
boolean
b
=
iCurriculaStudentService
.
updateById
(
curriculaStudent
);
boolean
b
=
iCurriculaStudentService
.
saveOrUpdate
(
curriculaStudent
);
return
AjaxResult
.
success
(
"选课成功"
);
return
AjaxResult
.
success
(
"选课成功"
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
return
AjaxResult
.
error
(
"选课失败"
);
return
AjaxResult
.
error
(
"选课失败"
);
}
}
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment