diff --git a/pom.xml b/pom.xml index 4e9e452..f3f4d71 100644 --- a/pom.xml +++ b/pom.xml @@ -227,8 +227,6 @@ commons-lang 2.6 - - commons-fileupload diff --git a/src/main/java/com/teaching/backend/controller/courses/CoursesController.java b/src/main/java/com/teaching/backend/controller/courses/CoursesController.java index 7e14395..adba450 100644 --- a/src/main/java/com/teaching/backend/controller/courses/CoursesController.java +++ b/src/main/java/com/teaching/backend/controller/courses/CoursesController.java @@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletResponse; import java.util.HashMap; import java.util.LinkedHashSet; +import java.util.List; import java.util.Map; /** @@ -132,8 +133,8 @@ public class CoursesController { @ApiOperation("查询学生列表") @PostMapping("/studentList") - public CommonResult> getStudentList(@RequestParam String userId){ - LinkedHashSet umsStudentList = coursesService.queryStudentList(userId); + public CommonResult> getStudentList(@RequestParam String userId){ + List umsStudentList = coursesService.queryStudentList(userId); return CommonResult.success(umsStudentList); } diff --git a/src/main/java/com/teaching/backend/controller/records/CourseLearningRecordController.java b/src/main/java/com/teaching/backend/controller/records/CourseLearningRecordController.java index ed7b1b3..32be4d1 100644 --- a/src/main/java/com/teaching/backend/controller/records/CourseLearningRecordController.java +++ b/src/main/java/com/teaching/backend/controller/records/CourseLearningRecordController.java @@ -70,4 +70,19 @@ public class CourseLearningRecordController { } return CommonResult.success(coursesVOList); } + + /** + * 推荐课程 + * @return + */ + @ApiOperation("推荐课程") + @PostMapping("/recommendCourses") + public CommonResult> recommendCourses(@RequestParam String userId) { + List coursesVOList = courseLearningRecordService.queryrecommendCourses(userId); + if (coursesVOList == null){ + CommonResult.failed("用户或角色错误"); + } + return CommonResult.success(coursesVOList); + } + } diff --git a/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java b/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java new file mode 100644 index 0000000..6dbf21c --- /dev/null +++ b/src/main/java/com/teaching/backend/controller/umsAdmin/UmsStudentManageController.java @@ -0,0 +1,72 @@ +package com.teaching.backend.controller.umsAdmin; + +import com.teaching.backend.common.CommonResult; +import com.teaching.backend.model.dto.umsAdmin.UmsStudentPageQueryDTO; +import com.teaching.backend.model.entity.umsAdmin.UmsStudentManage; +import com.teaching.backend.service.umsAdmin.UmsStudentManageService; +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.*; +import java.util.Map; + +@RestController +@Api(tags = "学生管理") +@RequestMapping("/api/studentManage") +@Slf4j +public class UmsStudentManageController { + + @Autowired + private UmsStudentManageService umsStudentManageService; + + /** + * 学生管理分页查询 + * @param umsStudentPageQueryDTO + * @return + */ + @GetMapping("/page") + @ApiOperation("学生管理分页查询") + public CommonResult> page(UmsStudentPageQueryDTO umsStudentPageQueryDTO){ + Map pageResult = umsStudentManageService.pageQuery(umsStudentPageQueryDTO); + return CommonResult.success(pageResult); + } + + /** + * 启用禁用学生账号 + * @param status + * @param id + * @return + */ + @PostMapping("/status/{status}") + @ApiOperation("启用禁用员工账号") + public CommonResult startOrStop(@PathVariable String status, Long id){ + umsStudentManageService.startOrStop(status,id); + return CommonResult.success("修改成功"); + } + + /** + * 根据id查询学生信息 + * @param id + * @return + */ + @GetMapping("/{id}") + @ApiOperation("根据id查询学生信息") + public CommonResult getById(@PathVariable Long id){ + UmsStudentManage umsStudentManage = umsStudentManageService.getByIdStudentAndUser(id); + return CommonResult.success(umsStudentManage); + } + + /** + * 编辑学生信息 + * @param umsStudentManage + * @return + */ + @PutMapping + @ApiOperation("编辑学生信息") + public CommonResult update(@RequestBody UmsStudentManage umsStudentManage){ + log.info("编辑学生信息: {}",umsStudentManage); + umsStudentManageService.updateStudentAndUser(umsStudentManage); + return CommonResult.success("修改成功"); + } +} diff --git a/src/main/java/com/teaching/backend/controller/umsStudent/UmsStudentController.java b/src/main/java/com/teaching/backend/controller/umsStudent/UmsStudentController.java deleted file mode 100644 index a2db786..0000000 --- a/src/main/java/com/teaching/backend/controller/umsStudent/UmsStudentController.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.teaching.backend.controller.umsStudent; - -import io.swagger.annotations.Api; -import lombok.extern.slf4j.Slf4j; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -@RestController -@Api(tags = "UmsStudentController") -@RequestMapping("/api/student") -@Slf4j -public class UmsStudentController { -} diff --git a/src/main/java/com/teaching/backend/mapper/umsAdmin/UmsStudentManageMapper.java b/src/main/java/com/teaching/backend/mapper/umsAdmin/UmsStudentManageMapper.java new file mode 100644 index 0000000..43a2fe7 --- /dev/null +++ b/src/main/java/com/teaching/backend/mapper/umsAdmin/UmsStudentManageMapper.java @@ -0,0 +1,22 @@ +package com.teaching.backend.mapper.umsAdmin; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.teaching.backend.model.dto.umsAdmin.UmsStudentPageQueryDTO; +import com.teaching.backend.model.entity.umsAdmin.*; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@Mapper +public interface UmsStudentManageMapper extends BaseMapper { + + UmsStudentManage queryStudent(String userId); + + List pageQueryStudent(UmsStudentPageQuery umsStudentPageQuery); + + int pageQueryStudentCount(UmsStudentPageQueryDTO umsStudentPageQueryDTO); + + UmsStudentManage getByIdStudentAndUser(Long id); + +} diff --git a/src/main/java/com/teaching/backend/mapper/umsAdmin/UmsStudentMapper.java b/src/main/java/com/teaching/backend/mapper/umsAdmin/UmsStudentMapper.java index 438b200..bd3b04a 100644 --- a/src/main/java/com/teaching/backend/mapper/umsAdmin/UmsStudentMapper.java +++ b/src/main/java/com/teaching/backend/mapper/umsAdmin/UmsStudentMapper.java @@ -15,4 +15,5 @@ public interface UmsStudentMapper extends BaseMapper { boolean updateStudentInfo(UmsStudent umsStudent); UmsStudent selectByUserId(Integer userId); + } diff --git a/src/main/java/com/teaching/backend/model/dto/umsAdmin/UmsStudentPageQueryDTO.java b/src/main/java/com/teaching/backend/model/dto/umsAdmin/UmsStudentPageQueryDTO.java new file mode 100644 index 0000000..f0813bf --- /dev/null +++ b/src/main/java/com/teaching/backend/model/dto/umsAdmin/UmsStudentPageQueryDTO.java @@ -0,0 +1,25 @@ +package com.teaching.backend.model.dto.umsAdmin; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class UmsStudentPageQueryDTO implements Serializable { + + //学生姓名 + private String name; + + //学号 + private String number; + + //页码 + private int page; + + //每页显示记录数 + private int pageSize; + + //学号 + private String userId; + +} diff --git a/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudentManage.java b/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudentManage.java new file mode 100644 index 0000000..9974bc2 --- /dev/null +++ b/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudentManage.java @@ -0,0 +1,84 @@ +package com.teaching.backend.model.entity.umsAdmin; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + *

+ * + *

+ * + * @author zjh + * @since 2024-06-12 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@Accessors(chain = true) +public class UmsStudentManage implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + //用户名 + private String username; + + //密码 + private String password; + + //昵称 + private String nickName; + + //头像 + private String icon; + + //注册时间 + private LocalDateTime createTime; + + //账号状态 + private Integer status; + + //姓名 + private String name; + + //性别 + private String sex; + + //民族 + private String nationality; + + //学号 + private String number; + + //生日 + private LocalDateTime birthday; + + //手机号 + private String phone; + + //院系 + private String faculty; + + //专业 + private String major; + + //入学年份 + private LocalDate yearAge; + + //班级 + private String className; + + //user_id + private Integer userId; + + +} diff --git a/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudentPageQuery.java b/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudentPageQuery.java new file mode 100644 index 0000000..cf8707e --- /dev/null +++ b/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudentPageQuery.java @@ -0,0 +1,21 @@ +package com.teaching.backend.model.entity.umsAdmin; + +import lombok.Data; + +import java.io.Serializable; + +@Data +public class UmsStudentPageQuery implements Serializable { + + //学生姓名 + private String name; + + //学号 + private String number; + + //每页显示记录数 + private int pageSize; + + //偏移量 + private int offset; +} diff --git a/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsUser.java b/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsUser.java index d05dad7..bf16927 100644 --- a/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsUser.java +++ b/src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsUser.java @@ -3,6 +3,7 @@ package com.teaching.backend.model.entity.umsAdmin; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Builder; import lombok.Data; import java.io.Serializable; @@ -35,7 +36,7 @@ public class UmsUser implements Serializable { private LocalDateTime createTime; //账号状态 - private Integer status; + private String status; //角色id private String roleId; diff --git a/src/main/java/com/teaching/backend/service/courses/ICoursesService.java b/src/main/java/com/teaching/backend/service/courses/ICoursesService.java index dcd643c..9f619a2 100644 --- a/src/main/java/com/teaching/backend/service/courses/ICoursesService.java +++ b/src/main/java/com/teaching/backend/service/courses/ICoursesService.java @@ -6,6 +6,8 @@ import com.teaching.backend.model.dto.courses.CoursesDTO; import com.teaching.backend.model.dto.courses.PageDTO; import com.teaching.backend.model.entity.courses.Courses; import com.teaching.backend.model.entity.umsAdmin.UmsStudent; +import com.teaching.backend.model.entity.umsAdmin.UmsStudentManage; +import com.teaching.backend.model.entity.umsAdmin.UmsUser; import com.teaching.backend.model.query.CourseQuery; import com.teaching.backend.model.vo.courses.CoursesVO; import com.teaching.backend.model.vo.courses.PersonalCenterStudentListVO; @@ -47,5 +49,6 @@ public interface ICoursesService extends IService { Map getPagePageSize2(int page, int pageSize); - LinkedHashSet queryStudentList(String userId); + List queryStudentList(String userId); + LinkedHashSet queryTeacherByStudentList(String userId); } 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 76f4725..ecdf00f 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 @@ -14,6 +14,7 @@ import com.teaching.backend.mapper.chapter.ChapterMapper; import com.teaching.backend.mapper.courses.*; import com.teaching.backend.mapper.records.CourseLearningRecordMapper; import com.teaching.backend.mapper.records.LearningRecordsMapper; +import com.teaching.backend.mapper.umsAdmin.UmsStudentManageMapper; import com.teaching.backend.mapper.umsAdmin.UmsStudentMapper; import com.teaching.backend.mapper.umsAdmin.UmsTeacherMapper; import com.teaching.backend.mapper.umsAdmin.UmsUserMapper; @@ -24,6 +25,7 @@ import com.teaching.backend.model.entity.courses.*; import com.teaching.backend.model.entity.records.CourseLearningRecord; import com.teaching.backend.model.entity.records.LearningRecords; import com.teaching.backend.model.entity.umsAdmin.UmsStudent; +import com.teaching.backend.model.entity.umsAdmin.UmsStudentManage; import com.teaching.backend.model.entity.umsAdmin.UmsTeacher; import com.teaching.backend.model.entity.umsAdmin.UmsUser; import com.teaching.backend.model.query.CourseQuery; @@ -93,6 +95,8 @@ public class CoursesServiceImpl extends ServiceImpl impl private LearningRecordsMapper learningRecordsMapper; @Autowired CourseLearningRecordMapper courseLearningRecordMapper; + @Autowired + private UmsStudentManageMapper umsStudentManageMapper; @Override @@ -350,15 +354,30 @@ public class CoursesServiceImpl extends ServiceImpl impl } @Override - public LinkedHashSet queryStudentList(String userId) { + public List queryStudentList(String userId) { + LinkedHashSet umsStudentManageList = queryTeacherByStudentList(userId); + List personalCenterStudentListVOList = new ArrayList<>(); + PersonalCenterStudentListVO personalCenterStudentListVO = null; + for (UmsStudentManage umsStudentManage : umsStudentManageList) { + personalCenterStudentListVO = new PersonalCenterStudentListVO(); + personalCenterStudentListVO.setIcon(umsStudentManage.getIcon()); + personalCenterStudentListVO.setName(umsStudentManage.getName()); + personalCenterStudentListVO.setNumber(umsStudentManage.getNumber()); + personalCenterStudentListVOList.add(personalCenterStudentListVO); + } + return personalCenterStudentListVOList; + } + + @Override + public LinkedHashSet queryTeacherByStudentList(String userId) { String roleId = umsUserMapper.getbyIdRoleId(userId); CourseQuery courseQuery = new CourseQuery(); courseQuery.setUserId(userId); + LinkedHashSet umsStudentManageList = new LinkedHashSet<>(); if (roleId.equals("1")){ PageDTO queryCourses = queryCourses(courseQuery); List coursesList = queryCourses.getList(); List courseIds = coursesList.stream().map(CoursesVO::getId).collect(Collectors.toList()); - LinkedHashSet studentNameList = new LinkedHashSet<>(); for (String courseId : courseIds) { List studentUsernames = studentCoursesMapper.selectBatchSomeStudent(courseId); List courseLearningRecordList = new ArrayList<>(); @@ -368,16 +387,11 @@ public class CoursesServiceImpl extends ServiceImpl impl } courseLearningRecordList = courseLearningRecordList.stream().sorted(Comparator.comparing(CourseLearningRecord::getTimes).reversed()).collect(Collectors.toList()); for (CourseLearningRecord courseLearningRecord : courseLearningRecordList) { - UmsStudent umsStudent = umsStudentMapper.selectByUserId(Integer.valueOf(courseLearningRecord.getUserId())); - UmsUser user = umsUserMapper.selectById(courseLearningRecord.getUserId()); - PersonalCenterStudentListVO pcsl = new PersonalCenterStudentListVO(); - pcsl.setName(umsStudent.getName()); - pcsl.setNumber(umsStudent.getNumber()); - pcsl.setIcon(user.getIcon()); - studentNameList.add(pcsl); + UmsStudentManage umsStudentManage = umsStudentManageMapper.queryStudent(courseLearningRecord.getUserId()); + umsStudentManageList.add(umsStudentManage); } } - return studentNameList; + return umsStudentManageList; } throw new BusinessException(400,"只有老师才有此功能"); } diff --git a/src/main/java/com/teaching/backend/service/impl/records/CourseLearningRecordServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/records/CourseLearningRecordServiceImpl.java index 2ce1a62..4c9eae5 100644 --- a/src/main/java/com/teaching/backend/service/impl/records/CourseLearningRecordServiceImpl.java +++ b/src/main/java/com/teaching/backend/service/impl/records/CourseLearningRecordServiceImpl.java @@ -145,4 +145,21 @@ public class CourseLearningRecordServiceImpl extends ServiceImpl queryrecommendCourses(String userId) { + String roleId = umsUserMapper.getbyIdRoleId(userId); + + if (roleId.equals("1")) { + + return null; + } else if (roleId.equals("2")) { + + return null; + }else { + + return null; + } + } + } diff --git a/src/main/java/com/teaching/backend/service/impl/report/ReportServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/report/ReportServiceImpl.java index dd42ddc..e0c6845 100644 --- a/src/main/java/com/teaching/backend/service/impl/report/ReportServiceImpl.java +++ b/src/main/java/com/teaching/backend/service/impl/report/ReportServiceImpl.java @@ -30,7 +30,6 @@ public class ReportServiceImpl extends ServiceImpl impleme List ThisMonthBrowseList = new ArrayList<>(); //存放上个月访问的前一天至前七天的每天对应的浏览量 List LastMonthBrowseList = new ArrayList<>(); - //获取今天的日期 LocalDate end = LocalDate.now(); @@ -51,7 +50,6 @@ public class ReportServiceImpl extends ServiceImpl impleme //查询上个月的今天对应的浏览量 String lastMonthBrowse = reportMapper.getBrowseByTime(lastMonth); - LastMonthBrowseList.add(lastMonthBrowse); } diff --git a/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsStudentManageServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsStudentManageServiceImpl.java new file mode 100644 index 0000000..5dea081 --- /dev/null +++ b/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsStudentManageServiceImpl.java @@ -0,0 +1,94 @@ +package com.teaching.backend.service.impl.umsAdmin; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.teaching.backend.exception.BusinessException; +import com.teaching.backend.mapper.umsAdmin.*; +import com.teaching.backend.model.dto.umsAdmin.UmsStudentPageQueryDTO; +import com.teaching.backend.model.entity.umsAdmin.*; +import com.teaching.backend.service.impl.courses.CoursesServiceImpl; +import com.teaching.backend.service.umsAdmin.UmsStudentManageService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + + +@Service +@Slf4j +public class UmsStudentManageServiceImpl extends ServiceImpl implements UmsStudentManageService { + + @Autowired + private UmsStudentManageMapper umsStudentManageMapper; + @Autowired + private UmsStudentMapper umsStudentMapper; + @Autowired + private UmsUserMapper umsUserMapper; + @Autowired + private CoursesServiceImpl coursesService; + + + @Override + public Map pageQuery(UmsStudentPageQueryDTO umsStudentPageQueryDTO) { + + LinkedHashSet umsStudentManages = coursesService.queryTeacherByStudentList(umsStudentPageQueryDTO.getUserId()); + + //总记录数 + int totalCount = umsStudentManages.size(); + + //总页数 + int totalPages = (int) Math.ceil((double) totalCount / umsStudentPageQueryDTO.getPageSize()); + + List umsStudentManageList = umsStudentManages.stream() + .skip((umsStudentPageQueryDTO.getPage() - 1) * umsStudentPageQueryDTO.getPageSize()) + .limit(umsStudentPageQueryDTO.getPageSize()) + .collect(Collectors.toList()); + + Map result = new HashMap<>(); + result.put("Records", umsStudentManageList); + result.put("totalCount", totalCount); + result.put("totalPages", totalPages); + result.put("currentPage", umsStudentPageQueryDTO.getPage()); + + return result; + } + + @Override + public UmsStudentManage getByIdStudentAndUser(Long id) { + UmsStudentManage studentAndUser = umsStudentManageMapper.getByIdStudentAndUser(id); + return studentAndUser; + } + + @Override + public void updateStudentAndUser(UmsStudentManage umsStudentManage) { + UmsStudent umsStudent = new UmsStudent(); + BeanUtils.copyProperties(umsStudentManage,umsStudent); + boolean studentInfo = umsStudentMapper.updateStudentInfo(umsStudent); + if (studentInfo == false){ + throw new BusinessException(400,"修改失败"); + } + UmsUser umsUser = new UmsUser(); + BeanUtils.copyProperties(umsStudentManage, umsUser); + umsUser.setId(Long.valueOf(umsStudentManage.getUserId())); + boolean userInformation = umsUserMapper.updateUserInformation(umsUser); + if (userInformation == false){ + throw new BusinessException(400,"修改失败"); + } + } + + @Override + public void startOrStop(String status, Long id) { + UmsUser umsUser = new UmsUser(); + umsUser.setStatus(status); + umsUser.setId(id); + boolean updateUserInformation = umsUserMapper.updateUserInformation(umsUser); + if (updateUserInformation == false){ + throw new BusinessException(400,"账号状态修改失败"); + } + } +} diff --git a/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsUserServiceImpl.java b/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsUserServiceImpl.java index ef82ab9..e691525 100644 --- a/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsUserServiceImpl.java +++ b/src/main/java/com/teaching/backend/service/impl/umsAdmin/UmsUserServiceImpl.java @@ -70,7 +70,7 @@ public class UmsUserServiceImpl extends ServiceImpl impl UmsUser umsUser = new UmsUser(); BeanUtils.copyProperties(umsAdminParam, umsUser); umsUser.setCreateTime(LocalDateTime.now()); - umsUser.setStatus(1); + umsUser.setStatus("1"); //查询是否有相同用户名的用户 List umsAdminList = lambdaQuery() .eq(UmsUser::getUsername, umsUser.getUsername()) @@ -291,7 +291,7 @@ public class UmsUserServiceImpl extends ServiceImpl impl UmsUser umsUser = new UmsUser(); BeanUtils.copyProperties(umsUserParam, umsUser); umsUser.setCreateTime(LocalDateTime.now()); - umsUser.setStatus(1); + umsUser.setStatus("1"); //查询是否有相同手机号的用户 List umsUserList = lambdaQuery() .eq(UmsUser::getPhone,umsUserParam.getPhone()) diff --git a/src/main/java/com/teaching/backend/service/records/ICourseLearningRecordService.java b/src/main/java/com/teaching/backend/service/records/ICourseLearningRecordService.java index 686d4d0..d9b77ef 100644 --- a/src/main/java/com/teaching/backend/service/records/ICourseLearningRecordService.java +++ b/src/main/java/com/teaching/backend/service/records/ICourseLearningRecordService.java @@ -28,4 +28,6 @@ public interface ICourseLearningRecordService extends IService removeCoursesRecords(List ids); List queryCourseList(String userId); + + List queryrecommendCourses(String userId); } diff --git a/src/main/java/com/teaching/backend/service/umsAdmin/UmsStudentManageService.java b/src/main/java/com/teaching/backend/service/umsAdmin/UmsStudentManageService.java new file mode 100644 index 0000000..cc741bf --- /dev/null +++ b/src/main/java/com/teaching/backend/service/umsAdmin/UmsStudentManageService.java @@ -0,0 +1,21 @@ +package com.teaching.backend.service.umsAdmin; + + +import cn.hutool.db.PageResult; +import com.baomidou.mybatisplus.extension.service.IService; +import com.teaching.backend.model.dto.umsAdmin.UmsStudentPageQueryDTO; +import com.teaching.backend.model.entity.umsAdmin.UmsStudentManage; + +import java.util.Map; + +public interface UmsStudentManageService extends IService { + + + Map pageQuery(UmsStudentPageQueryDTO umsStudentPageQueryDTO); + + UmsStudentManage getByIdStudentAndUser(Long id); + + void updateStudentAndUser(UmsStudentManage umsStudentManage); + + void startOrStop(String status, Long id); +} diff --git a/src/main/resources/mapper/UmsPermissionMapper.xml b/src/main/resources/mapper/UmsPermissionMapper.xml deleted file mode 100644 index 1a9856c..0000000 --- a/src/main/resources/mapper/UmsPermissionMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/src/main/resources/mapper/UmsStudentManageService.xml b/src/main/resources/mapper/UmsStudentManageService.xml new file mode 100644 index 0000000..f7e4ec2 --- /dev/null +++ b/src/main/resources/mapper/UmsStudentManageService.xml @@ -0,0 +1,46 @@ + + + + + + + + + + diff --git a/src/main/resources/mapper/UmsStudentMapper.xml b/src/main/resources/mapper/UmsStudentMapper.xml index 3a452f1..a985f3c 100644 --- a/src/main/resources/mapper/UmsStudentMapper.xml +++ b/src/main/resources/mapper/UmsStudentMapper.xml @@ -5,34 +5,34 @@ update ums_student - + name = #{name,jdbcType=VARCHAR}, - + sex = #{sex}, - + nationality = #{nationality,jdbcType=VARCHAR}, - + number = #{number,jdbcType=VARCHAR}, - + birthday = #{birthday,jdbcType=VARCHAR}, - + phone = #{phone,jdbcType=TIMESTAMP}, - + faculty = #{faculty,jdbcType=INTEGER}, - + major = #{major,jdbcType=INTEGER}, - + year_age = #{yearAge,jdbcType=INTEGER}, - + class_name = #{className,jdbcType=INTEGER}, diff --git a/src/main/resources/mapper/UmsUserMapper.xml b/src/main/resources/mapper/UmsUserMapper.xml index d09d5a0..5b56d4a 100644 --- a/src/main/resources/mapper/UmsUserMapper.xml +++ b/src/main/resources/mapper/UmsUserMapper.xml @@ -5,25 +5,25 @@ update ums_user - + username = #{username,jdbcType=VARCHAR}, - + password = #{password}, - + phone = #{phone,jdbcType=VARCHAR}, - + nick_name = #{nickName,jdbcType=VARCHAR}, - + icon = #{icon,jdbcType=VARCHAR}, - + create_time = #{createTime,jdbcType=TIMESTAMP}, - + status = #{status,jdbcType=INTEGER},