AppletController.java 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. package com.ruoyi.web.controller.common;
  2. import com.ruoyi.common.core.domain.AjaxResult;
  3. import com.ruoyi.common.core.domain.entity.FormalTeacherClass;
  4. import com.ruoyi.system.service.IAppletService;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.validation.annotation.Validated;
  7. import org.springframework.web.bind.annotation.*;
  8. /**小程序公共接口
  9. * @Author: tjf
  10. * @Date: 2023/5/25 11:46
  11. * @Describe:
  12. */
  13. @RestController
  14. @RequestMapping("/applet")
  15. public class AppletController {
  16. @Autowired
  17. private IAppletService appletService;
  18. /**
  19. * 准备下课
  20. */
  21. @PostMapping("/xiaKe")
  22. public void xiake(@Validated @RequestBody FormalTeacherClass formalTeacherClass)
  23. {
  24. appletService.xiake(formalTeacherClass);
  25. }
  26. /**
  27. * 小程序首页数据
  28. * 共多少班级
  29. * 已放学 未放学
  30. */
  31. @PostMapping("/index")
  32. public AjaxResult index(@Validated @RequestBody FormalTeacherClass formalTeacherClass)
  33. {
  34. return appletService.index(formalTeacherClass);
  35. }
  36. /**
  37. * 小程序首页数据
  38. * 共多少班级
  39. * 已放学 未放学
  40. */
  41. @PostMapping("/indexList")
  42. public AjaxResult indexList(@Validated @RequestBody FormalTeacherClass formalTeacherClass)
  43. {
  44. return appletService.indexList(formalTeacherClass);
  45. }
  46. /**
  47. *
  48. */
  49. @GetMapping("/pc/statistics")
  50. public AjaxResult pcStatistics()
  51. {
  52. return appletService.pcStatistics();
  53. }
  54. }