From 0e838c192f6d6950d4aa9ea6bd3db846b16bd438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=80=BB=E8=A3=81?= <14186472+wenyu441069198@user.noreply.gitee.com> Date: Wed, 21 Aug 2024 18:28:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=82=96=E6=B5=B7=E5=8D=97xml=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/system/SystemController.java | 21 ++++++++ .../model/entity/system/SystemSetting.java | 54 +++++++++++++++++++ .../impl/courses/CoursesServiceImpl.java | 2 +- .../mapper/CourseLearningRecordMapper.xml | 10 ++-- .../mapper/KnowledgeLearningRecordMapper.xml | 6 +-- 5 files changed, 84 insertions(+), 9 deletions(-) create mode 100644 src/main/java/com/teaching/backend/controller/system/SystemController.java create mode 100644 src/main/java/com/teaching/backend/model/entity/system/SystemSetting.java diff --git a/src/main/java/com/teaching/backend/controller/system/SystemController.java b/src/main/java/com/teaching/backend/controller/system/SystemController.java new file mode 100644 index 0000000..748b4a8 --- /dev/null +++ b/src/main/java/com/teaching/backend/controller/system/SystemController.java @@ -0,0 +1,21 @@ +package com.teaching.backend.controller.system; + +import com.teaching.backend.common.CommonResult; +import com.teaching.backend.model.vo.report.BrowseReportVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +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; + +@RestController +@Api(tags = "系统设置接口") +@RequestMapping("/api/system") +@Slf4j +public class SystemController { + + + +} diff --git a/src/main/java/com/teaching/backend/model/entity/system/SystemSetting.java b/src/main/java/com/teaching/backend/model/entity/system/SystemSetting.java new file mode 100644 index 0000000..2e7b2df --- /dev/null +++ b/src/main/java/com/teaching/backend/model/entity/system/SystemSetting.java @@ -0,0 +1,54 @@ +package com.teaching.backend.model.entity.system; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +@Data +@TableName("system_setting") +public class SystemSetting implements Serializable { + + //主键 + @TableId(type = IdType.AUTO) + private Long id; + + //系统名称 + private String name; + + //LOGO + private String logo; + + //宣传图片 + private String promotionalImages; + + //登录地址 + private String loginAddress; + + //标题 + private String title; + + //版权信息 + private String copyrightInformation; + + //备案号 + private String recordNumber; + + //QQ + private String qqNumber; + + //邮箱 + private String mailbox; + + //手机号 + private String phone; + + //地址 + private String address; + + //二维码 + private String qrCode; +} diff --git a/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java index f6d9ba7..ba71258 100644 --- a/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java +++ b/src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java @@ -424,7 +424,7 @@ public class CoursesServiceImpl extends ServiceImpl impl // 然后,一次性查询所有学生信息 List umsStudentManageLists = studentIds.stream() - .map(studentId -> umsStudentManageMapper.queryStudent(String.valueOf(studentId))) // 假设queryStudent接受Long类型参数 + .map(studentId -> umsStudentManageMapper.queryStudent(String.valueOf(studentId))) .filter(Objects::nonNull) .collect(Collectors.toList()); diff --git a/src/main/resources/mapper/CourseLearningRecordMapper.xml b/src/main/resources/mapper/CourseLearningRecordMapper.xml index 7ec9971..4cff018 100644 --- a/src/main/resources/mapper/CourseLearningRecordMapper.xml +++ b/src/main/resources/mapper/CourseLearningRecordMapper.xml @@ -5,18 +5,18 @@ SELECT * FROM - course_learning_record clr + record_course_learning rcl WHERE - clr.user_id = #{student} + rcl.user_id = #{student} ORDER BY times DESC LIMIT 1; SELECT - kln.knowledge_id knowledgeId + rkn.knowledge_id knowledgeId FROM - knowledge_learning_number kln + record_knowledge_number rkn ORDER BY number DESC;