肖海南xml修改

master
总裁 3 months ago
parent 9bab783d76
commit 0e838c192f
  1. 21
      src/main/java/com/teaching/backend/controller/system/SystemController.java
  2. 54
      src/main/java/com/teaching/backend/model/entity/system/SystemSetting.java
  3. 2
      src/main/java/com/teaching/backend/service/impl/courses/CoursesServiceImpl.java
  4. 10
      src/main/resources/mapper/CourseLearningRecordMapper.xml
  5. 6
      src/main/resources/mapper/KnowledgeLearningRecordMapper.xml

@ -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 {
}

@ -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;
}

@ -424,7 +424,7 @@ public class CoursesServiceImpl extends ServiceImpl<CoursesMapper, Courses> impl
// 然后,一次性查询所有学生信息
List<UmsStudentManage> 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());

@ -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>
<select id="selectMaxNumber" resultType="java.lang.String" parameterType="java.lang.String">
SELECT
cln.course_id courseId
rcn.course_id courseId
FROM
course_learning_number cln
record_course_number rcn
WHERE
CONCAT(',', cln.teacher_user_id, ',') LIKE CONCAT('%,', #{userId}, ',%')
ORDER BY
@ -25,7 +25,7 @@
</select>
<select id="selectMaxCourseId" resultType="java.lang.String" parameterType="java.lang.String">
SELECT course_id, COUNT(*) as frequency
FROM course_learning_record
FROM record_course_learning
WHERE user_id = #{userId}
GROUP BY course_id
ORDER BY frequency DESC;

@ -4,16 +4,16 @@
<select id="queryStudyKnowledgeMaxNumber" resultType="java.lang.String">
SELECT
kln.knowledge_id knowledgeId
rkn.knowledge_id knowledgeId
FROM
knowledge_learning_number kln
record_knowledge_number rkn
ORDER BY
number
DESC;
</select>
<select id="queryStudyMaxKnowledgeId" resultType="java.lang.String">
SELECT knowledge_id,knowledge_name
FROM knowledge_learning_record
FROM record_knowledge_learning
WHERE user_id = #{userId}
ORDER BY times DESC;
</select>

Loading…
Cancel
Save