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
811b18e9
Commit
811b18e9
authored
Aug 07, 2023
by
baochunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#G:公众号选课后端接口上传
parent
8db017d6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
88 additions
and
9 deletions
+88
-9
ruoyi-admin/src/main/resources/application.yml
+6
-6
smart-campus/src/main/java/yangtz/cs/liu/campus/service/curricula/IStudentScoreService.java
+9
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/curricula/StudentScoreServiceImpl.java
+0
-0
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/student/SchoolStudentScoreVo.java
+3
-1
smart-campus/src/main/java/yangtz/cs/liu/wechat/controller/courseSelection/WxCouresSelection.java
+66
-0
smart-campus/src/main/resources/mapper/curricula/StudentScoreMapper.xml
+4
-2
No files found.
ruoyi-admin/src/main/resources/application.yml
View file @
811b18e9
...
@@ -88,20 +88,20 @@ spring:
...
@@ -88,20 +88,20 @@ spring:
# redis 配置
# redis 配置
redis
:
redis
:
# 地址
# 地址
host
:
localhost
#
host: localhost
#
host: 43.143.63.140
host
:
43.143.63.140
# host: 47.105.176.202
# host: 47.105.176.202
# host: 127.0.0.1
# host: 127.0.0.1
# 端口,默认为6379
# 端口,默认为6379
# port: 8134
# port: 8134
port
:
6379
#
port: 6379
#
port: 16379
port
:
16379
# port: 9121
# port: 9121
# 数据库索引
# 数据库索引
database
:
11
database
:
11
# 密码
# 密码
password
:
#
password:
#
password: lbt18062367596
password
:
lbt18062367596
# 连接超时时间
# 连接超时时间
timeout
:
10s
timeout
:
10s
lettuce
:
lettuce
:
...
...
smart-campus/src/main/java/yangtz/cs/liu/campus/service/curricula/IStudentScoreService.java
View file @
811b18e9
package
yangtz
.
cs
.
liu
.
campus
.
service
.
curricula
;
package
yangtz
.
cs
.
liu
.
campus
.
service
.
curricula
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
yangtz.cs.liu.campus.domain.curricula.CurriculaStudent
;
import
yangtz.cs.liu.campus.domain.student.SchoolStudentScore
;
import
yangtz.cs.liu.campus.domain.student.SchoolStudentScore
;
import
yangtz.cs.liu.campus.vo.student.SchoolStudentScoreVo
;
import
yangtz.cs.liu.campus.vo.student.SchoolStudentScoreVo
;
...
@@ -15,6 +16,9 @@ public interface IStudentScoreService extends IService<SchoolStudentScore> {
...
@@ -15,6 +16,9 @@ public interface IStudentScoreService extends IService<SchoolStudentScore> {
*/
*/
List
<
SchoolStudentScoreVo
>
selectStudentScoreList
(
SchoolStudentScoreVo
schoolStudentScoreVo
);
List
<
SchoolStudentScoreVo
>
selectStudentScoreList
(
SchoolStudentScoreVo
schoolStudentScoreVo
);
//根据学生ID查询成绩
List
<
SchoolStudentScoreVo
>
selectStudentScoreList
(
Long
studentId
);
/**
/**
* 查询学生成绩详细信息
* 查询学生成绩详细信息
* @param id
* @param id
...
@@ -62,4 +66,9 @@ public interface IStudentScoreService extends IService<SchoolStudentScore> {
...
@@ -62,4 +66,9 @@ public interface IStudentScoreService extends IService<SchoolStudentScore> {
* @return
* @return
*/
*/
int
deleteStudentScore
(
Long
[]
ids
);
int
deleteStudentScore
(
Long
[]
ids
);
/**
* 根据类型查询三类成绩
*/
List
<
SchoolStudentScoreVo
>
getStudentTypeViwe
(
CurriculaStudent
curriculaStudent
);
}
}
smart-campus/src/main/java/yangtz/cs/liu/campus/service/impl/curricula/StudentScoreServiceImpl.java
View file @
811b18e9
This diff is collapsed.
Click to expand it.
smart-campus/src/main/java/yangtz/cs/liu/campus/vo/student/SchoolStudentScoreVo.java
View file @
811b18e9
...
@@ -30,12 +30,14 @@ public class SchoolStudentScoreVo extends OurBaseEntity {
...
@@ -30,12 +30,14 @@ public class SchoolStudentScoreVo extends OurBaseEntity {
/** 班级 */
/** 班级 */
@Excel
(
name
=
"班级"
)
@Excel
(
name
=
"班级"
)
private
String
className
;
private
String
className
;
/**年级值*/
private
Integer
gradeValue
;
/** 考试类型 */
/** 考试类型 */
@Excel
(
name
=
"考试类型"
,
combo
=
{
"一次"
,
"二次"
,
"三次"
,
"期末"
},
readConverterExp
=
"1=一次,2=二次,3=三次,4=期末"
)
@Excel
(
name
=
"考试类型"
,
combo
=
{
"一次"
,
"二次"
,
"三次"
,
"期末"
},
readConverterExp
=
"1=一次,2=二次,3=三次,4=期末"
)
private
String
examType
;
private
String
examType
;
/** 总成绩 */
/** 总成绩 */
private
double
totalScore
;
private
double
totalScore
;
/** 年级排名 */
/**
总成绩
年级排名 */
private
Integer
ranking
;
private
Integer
ranking
;
/** 班级排名 */
/** 班级排名 */
private
Integer
classRanking
;
private
Integer
classRanking
;
...
...
smart-campus/src/main/java/yangtz/cs/liu/wechat/controller/courseSelection/WxCouresSelection.java
0 → 100644
View file @
811b18e9
package
yangtz
.
cs
.
liu
.
wechat
.
controller
.
courseSelection
;
import
com.ruoyi.common.core.domain.AjaxResult
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
yangtz.cs.liu.campus.domain.curricula.CurriculaStudent
;
import
yangtz.cs.liu.campus.service.curricula.ICurriculaStudentService
;
import
yangtz.cs.liu.campus.service.curricula.IStudentScoreService
;
import
yangtz.cs.liu.campus.vo.student.SchoolStudentScoreVo
;
/**
* 公众号,选课
*/
@RestController
@RequestMapping
(
"/wx/course"
)
public
class
WxCouresSelection
{
@Autowired
IStudentScoreService
iStudentScoreService
;
@Autowired
ICurriculaStudentService
iCurriculaStudentService
;
/**
* 学生成绩查询
*/
@GetMapping
(
"/achievement/{studentId}"
)
private
AjaxResult
getStudentAchievements
(
@PathVariable
(
"studentId"
)
Long
studentId
){
List
<
SchoolStudentScoreVo
>
schoolStudentScoreVos
=
iStudentScoreService
.
selectStudentScoreList
(
studentId
);
return
AjaxResult
.
success
(
schoolStudentScoreVos
);
}
/**
* 据物理化类型查看
*/
@GetMapping
(
"/studenttypeview"
)
private
AjaxResult
getStudentTypeview
(
CurriculaStudent
curriculaStudent
){
List
<
SchoolStudentScoreVo
>
studentTypeViwe
=
iStudentScoreService
.
getStudentTypeViwe
(
curriculaStudent
);
return
AjaxResult
.
success
(
studentTypeViwe
);
}
/**
* 保存选课信息
*/
@PostMapping
(
"/savestudentcourse"
)
private
AjaxResult
saveStudentcourse
(
@RequestBody
CurriculaStudent
curriculaStudent
){
//保存专业信息
try
{
iCurriculaStudentService
.
save
(
curriculaStudent
);
return
AjaxResult
.
success
(
"选课成功"
);
}
catch
(
Exception
e
){
return
AjaxResult
.
error
(
"选课失败"
);
}
}
}
smart-campus/src/main/resources/mapper/curricula/StudentScoreMapper.xml
View file @
811b18e9
...
@@ -59,8 +59,10 @@
...
@@ -59,8 +59,10 @@
LEFT JOIN school_student xs ON cj.student_id = xs.id
LEFT JOIN school_student xs ON cj.student_id = xs.id
LEFT JOIN school_class bj ON cj.class_id = bj.id
LEFT JOIN school_class bj ON cj.class_id = bj.id
WHERE
WHERE
cj.curricula_id = #{curriculaId}
cj.del_flag = '0'
AND cj.del_flag = '0'
<if
test=
"curriculaId != null and curriculaId != ''"
>
and cj.curricula_id = #{curriculaId}
</if>
<if
test=
"gradeValue != null and gradeValue != ''"
>
and bj.grade_value = #{gradeValue}
</if>
<if
test=
"studentId != null and studentId != ''"
>
and cj.student_id = #{studentId}
</if>
<if
test=
"examType != null and examType != ''"
>
and cj.exam_type = #{examType}
</if>
<if
test=
"examType != null and examType != ''"
>
and cj.exam_type = #{examType}
</if>
<if
test=
"studentName != null and studentName != ''"
>
and xs.student_name like concat('%', #{studentName}, '%')
</if>
<if
test=
"studentName != null and studentName != ''"
>
and xs.student_name like concat('%', #{studentName}, '%')
</if>
<if
test=
"classId != null"
>
and cj.class_id = #{classId}
</if>
<if
test=
"classId != null"
>
and cj.class_id = #{classId}
</if>
...
...
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