master
you hang 5 months ago committed by youhang
parent 45f7e375bf
commit 4ee0e4423a
  1. 1
      src/main/java/com/teaching/backend/controller/FavourInformation/FavourInformationController.java
  2. 2
      src/main/java/com/teaching/backend/controller/courseResource/CourseResourceController.java
  3. 2
      src/main/java/com/teaching/backend/controller/courses/CourseObjectivesController.java
  4. 2
      src/main/java/com/teaching/backend/controller/courses/CoursesController.java
  5. 2
      src/main/java/com/teaching/backend/controller/courses/ObjectiveContentKnowController.java
  6. 2
      src/main/java/com/teaching/backend/controller/courses/ObjectiveContentsController.java
  7. 2
      src/main/java/com/teaching/backend/controller/courses/ObjectivesTypeController.java
  8. 2
      src/main/java/com/teaching/backend/controller/courses/StudentCoursesController.java
  9. 2
      src/main/java/com/teaching/backend/controller/favour/SeCourseFavourController.java
  10. 2
      src/main/java/com/teaching/backend/controller/favour/SeKnowFavourController.java
  11. 2
      src/main/java/com/teaching/backend/controller/favour/SeResourceFavourController.java
  12. 40
      src/main/java/com/teaching/backend/controller/know/KnowController.java
  13. 2
      src/main/java/com/teaching/backend/controller/records/LearningRecordsController.java
  14. 2
      src/main/java/com/teaching/backend/controller/thumb/SeCourseThumbController.java
  15. 2
      src/main/java/com/teaching/backend/controller/thumb/SeKnowThumbController.java
  16. 2
      src/main/java/com/teaching/backend/controller/thumb/SeResourceThumbController.java
  17. 2
      src/main/java/com/teaching/backend/controller/umsAdmin/UmsAdminController.java
  18. 19
      src/main/java/com/teaching/backend/model/dto/know/KnowQueryRequest.java
  19. 2
      src/main/java/com/teaching/backend/model/dto/know/KnowRequest.java
  20. 54
      src/main/java/com/teaching/backend/model/dto/know/KnowupdateRequest.java
  21. 2
      src/main/java/com/teaching/backend/model/entity/umsAdmin/UmsStudent.java
  22. 35
      src/main/java/com/teaching/backend/service/impl/know/KnowServiceimpl.java
  23. 15
      src/main/java/com/teaching/backend/service/know/KnowService.java
  24. 7
      src/main/java/com/teaching/backend/utils/ParamOutAspect.java

@ -21,6 +21,7 @@ import java.util.List;
* @Version 1.0 * @Version 1.0
*/ */
@RestController @RestController
@RequestMapping ("/api")
public class FavourInformationController{ public class FavourInformationController{

@ -13,7 +13,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
@RestController @RestController
@RequestMapping("/courses") @RequestMapping("/api/courses")
public class CourseResourceController { public class CourseResourceController {
@Autowired @Autowired
private CourseResourcesServiceImpl courseResourcesService; private CourseResourcesServiceImpl courseResourcesService;

@ -27,7 +27,7 @@ import java.util.List;
*/ */
@Api(tags = "课程目标管理接口") @Api(tags = "课程目标管理接口")
@RestController @RestController
@RequestMapping("/course_objectives") @RequestMapping("/api/course_objectives")
public class CourseObjectivesController { public class CourseObjectivesController {

@ -33,7 +33,7 @@ import java.util.*;
*/ */
@Api(tags = "课程管理接口") @Api(tags = "课程管理接口")
@RestController @RestController
@RequestMapping("/coursesteacher") @RequestMapping("/api/coursesteacher")
public class CoursesController { public class CoursesController {
@Autowired @Autowired

@ -25,7 +25,7 @@ import org.springframework.stereotype.Controller;
*/ */
@Api(tags = "目标-内容 关联的知识点接口") @Api(tags = "目标-内容 关联的知识点接口")
@RestController @RestController
@RequestMapping("/objective_content_know") @RequestMapping("/api/objective_content_know")
public class ObjectiveContentKnowController { public class ObjectiveContentKnowController {
@Autowired @Autowired
IObjectiveContentKnowService objectiveContentKnowService; IObjectiveContentKnowService objectiveContentKnowService;

@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
* @since 2024-06-05 * @since 2024-06-05
*/ */
@RestController @RestController
@RequestMapping("/objective_contents") @RequestMapping("/api/objective_contents")
@Api(tags = "目标内容接口") @Api(tags = "目标内容接口")
public class ObjectiveContentsController { public class ObjectiveContentsController {

@ -21,7 +21,7 @@ import java.util.List;
* @since 2024-06-05 * @since 2024-06-05
*/ */
@RestController @RestController
@RequestMapping("/objectives_type") @RequestMapping("/api/objectives_type")
@Api(tags = "项目目标类型管理接口") @Api(tags = "项目目标类型管理接口")
public class ObjectivesTypeController { public class ObjectivesTypeController {

@ -26,7 +26,7 @@ import org.springframework.stereotype.Controller;
*/ */
@Api(tags = "学生课程接口") @Api(tags = "学生课程接口")
@RestController @RestController
@RequestMapping("/student_courses") @RequestMapping("/api/student_courses")
public class StudentCoursesController { public class StudentCoursesController {
@Autowired @Autowired

@ -28,7 +28,7 @@ import java.util.List;
* @Description: * @Description:
*/ */
@RestController @RestController
@RequestMapping("/course_favour") @RequestMapping("/api/course_favour")
@Slf4j @Slf4j
public class SeCourseFavourController { public class SeCourseFavourController {

@ -20,7 +20,7 @@ import javax.annotation.Resource;
* @Description: * @Description:
*/ */
@RestController @RestController
@RequestMapping("/know_favour") @RequestMapping("/api/know_favour")
@Slf4j @Slf4j
public class SeKnowFavourController { public class SeKnowFavourController {

@ -24,7 +24,7 @@ import javax.annotation.Resource;
* @Description: * @Description:
*/ */
@RestController @RestController
@RequestMapping("/resource_favour") @RequestMapping("/api/resource_favour")
@Slf4j @Slf4j
public class SeResourceFavourController { public class SeResourceFavourController {

@ -0,0 +1,40 @@
package com.teaching.backend.controller.know;
import com.teaching.backend.model.dto.know.KnowQueryRequest;
import com.teaching.backend.model.dto.know.KnowRequest;
import com.teaching.backend.model.dto.know.KnowupdateRequest;
import com.teaching.backend.model.entity.know.Know;
import com.teaching.backend.service.know.KnowService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @Author:youhang
* @Date:2024-06-21-10:26
* @Description:
*/
@RestController
@RequestMapping("/api/know")
public class KnowController {
@Autowired
private KnowService knowService;
@PostMapping("/add")
public Boolean add(@RequestBody KnowRequest knowAddRequest) {
return knowService.add(knowAddRequest);
}
@PostMapping("/update")
public Boolean update(@RequestBody KnowupdateRequest knowAddRequest){
return knowService.update(knowAddRequest);
}
@PostMapping("/delete")
public Integer deleteKnow(@RequestBody List<Integer> ids){
return knowService.deleteKnow(ids);
}
@PostMapping("/query")
public List<Know> query(@RequestBody KnowQueryRequest knowQueryRequest){
return knowService.query(knowQueryRequest);
}
}

@ -16,7 +16,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
@RestController @RestController
@RequestMapping("/learningrecords") @RequestMapping("/api/learningrecords")
public class LearningRecordsController { public class LearningRecordsController {
@Autowired @Autowired

@ -21,7 +21,7 @@ import javax.annotation.Resource;
* @Description: * @Description:
*/ */
@RestController @RestController
@RequestMapping("/course_thumb") @RequestMapping("/api/course_thumb")
@Slf4j @Slf4j
public class SeCourseThumbController { public class SeCourseThumbController {

@ -20,7 +20,7 @@ import javax.annotation.Resource;
* @Description: * @Description:
*/ */
@RestController @RestController
@RequestMapping("/know_thumb") @RequestMapping("/api/know_thumb")
@Slf4j @Slf4j
public class SeKnowThumbController { public class SeKnowThumbController {

@ -20,7 +20,7 @@ import javax.annotation.Resource;
* @Description: * @Description:
*/ */
@RestController @RestController
@RequestMapping("/resource_thumb") @RequestMapping("/api/resource_thumb")
@Slf4j @Slf4j
public class SeResourceThumbController { public class SeResourceThumbController {

@ -34,7 +34,7 @@ import java.util.stream.Collectors;
*/ */
@RestController @RestController
@Api(tags = "UmsAdminController") @Api(tags = "UmsAdminController")
@RequestMapping("/user") @RequestMapping("/api/user")
@Slf4j @Slf4j
public class UmsAdminController { public class UmsAdminController {
@Value("${jwt.tokenHeader}") @Value("${jwt.tokenHeader}")

@ -0,0 +1,19 @@
package com.teaching.backend.model.dto.know;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 知识点请求
*/
@Data
public class KnowQueryRequest implements Serializable {
/**
* 知识点名称
*/
private String name;
}

@ -9,7 +9,7 @@ import java.math.BigDecimal;
* 知识点请求 * 知识点请求
*/ */
@Data @Data
public class KnowAddRequest implements Serializable { public class KnowRequest implements Serializable {
/** /**

@ -0,0 +1,54 @@
package com.teaching.backend.model.dto.know;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* 知识点请求
*/
@Data
public class KnowupdateRequest implements Serializable {
/**
* 知识点id
*/
private Integer id;
/**
* 知识点名称
*/
private String name;
/**
* 简介
*/
private String info;
/**
* 知识点内容
*/
private String content;
/**
* 知识点图片
*/
private String img;
/**
* 知识点学时
*/
private BigDecimal hour;
/**
* 资源id 运用json
*/
private String resourceid;
}

@ -72,7 +72,7 @@ public class UmsStudent implements Serializable {
/** /**
* 入学年份 * 入学年份
*/ */
private LocalDate year; private LocalDate yearAge;
/** /**
* 班级 * 班级

@ -1,23 +1,50 @@
package com.teaching.backend.service.impl.know; package com.teaching.backend.service.impl.know;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.teaching.backend.mapper.know.KnowMapper; import com.teaching.backend.mapper.know.KnowMapper;
import com.teaching.backend.model.dto.favour.knowFavour.KnowFavourAddRequest; import com.teaching.backend.model.dto.know.KnowQueryRequest;
import com.teaching.backend.model.dto.know.KnowAddRequest; import com.teaching.backend.model.dto.know.KnowRequest;
import com.teaching.backend.model.dto.know.KnowupdateRequest;
import com.teaching.backend.model.entity.know.Know; import com.teaching.backend.model.entity.know.Know;
import com.teaching.backend.service.know.KnowService; import com.teaching.backend.service.know.KnowService;
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.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
@Service @Service
public class KnowServiceimpl extends ServiceImpl<KnowMapper,Know> implements KnowService { public class KnowServiceimpl extends ServiceImpl<KnowMapper,Know> implements KnowService {
@Autowired @Autowired
private KnowMapper knowMapper; private KnowMapper knowMapper;
@Override @Override
public Boolean add(KnowAddRequest knowAddRequest) { public Boolean add(KnowRequest knowAddRequest) {
Know know = new Know(); Know know = new Know();
BeanUtils.copyProperties(knowAddRequest,know); BeanUtils.copyProperties(knowAddRequest,know);
return (save(know)); return save(know);
} }
@Override
public Boolean update(KnowupdateRequest knowAddRequest) {
Know know = new Know();
BeanUtils.copyProperties(knowAddRequest,know);
return (updateById(know));
}
@Override
public Integer deleteKnow(List<Integer> ids) {
Integer result = knowMapper.deleteBatchIds(ids);
return result;
}
@Override
public List<Know> query(KnowQueryRequest knowQueryRequest) {
String name = knowQueryRequest.getName();
QueryWrapper<Know> knowQueryWrapper = new QueryWrapper<>();
knowQueryWrapper.eq("name",name);
List<Know> knows = knowMapper.selectList(knowQueryWrapper);
return knows;
}
} }

@ -2,11 +2,22 @@ package com.teaching.backend.service.know;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.teaching.backend.model.dto.favour.knowFavour.KnowFavourAddRequest; import com.teaching.backend.model.dto.favour.knowFavour.KnowFavourAddRequest;
import com.teaching.backend.model.dto.know.KnowAddRequest;
import com.teaching.backend.model.dto.know.KnowQueryRequest;
import com.teaching.backend.model.dto.know.KnowRequest;
import com.teaching.backend.model.dto.know.KnowupdateRequest;
import com.teaching.backend.model.entity.know.Know; import com.teaching.backend.model.entity.know.Know;
import java.util.List;
public interface KnowService extends IService<Know> { public interface KnowService extends IService<Know> {
public Boolean add(KnowAddRequest knowAddRequest); public Boolean add(KnowRequest knowAddRequest);
public Boolean update(KnowupdateRequest knowAddRequest);
public Integer deleteKnow(List<Integer> ids);
public List<Know> query(KnowQueryRequest knowQueryRequest);
} }

@ -53,11 +53,8 @@
// final Object[] array = filteredArgs.stream().toArray(); // final Object[] array = filteredArgs.stream().toArray();
// //
// for (int i = 0; i < array.length; i++) { // for (int i = 0; i < array.length; i++) {
// System.out.println(array[i]);
// String jsonStr = JSONUtil.toJsonStr(array[i]); // String jsonStr = JSONUtil.toJsonStr(array[i]);
// System.out.println(jsonStr); //// Class<?> myClass = array[i].getClass(); // 获取类的 Class 对象
// Class<?> myClass = array[i].getClass(); // 获取类的 Class 对象
// System.out.println("class "+myClass);
// JSONObject entries = JSONUtil.parseObj(jsonStr); // JSONObject entries = JSONUtil.parseObj(jsonStr);
// System.out.println(entries); // System.out.println(entries);
// // 遍历JSONObject的属性 // // 遍历JSONObject的属性
@ -70,7 +67,7 @@
// } // }
// //
// } // }
// System.out.println(key + ": " + value); //// System.out.println(key + ": " + value);
// }); // });
// } // }
// } // }

Loading…
Cancel
Save