ConsumptionController.java 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package com.xjrsoft.module.student.controller;
  2. import cn.dev33.satoken.annotation.SaCheckPermission;
  3. import cn.dev33.satoken.stp.StpUtil;
  4. import com.xjrsoft.common.model.result.RT;
  5. import com.xjrsoft.module.student.dto.BaseStudentInfoPageDto;
  6. import com.xjrsoft.module.student.service.IStudentManagerService;
  7. import com.xjrsoft.module.student.vo.StudentPersonalInfoVo;
  8. import io.swagger.annotations.Api;
  9. import io.swagger.annotations.ApiOperation;
  10. import lombok.AllArgsConstructor;
  11. import org.springframework.web.bind.annotation.GetMapping;
  12. import org.springframework.web.bind.annotation.RequestMapping;
  13. import org.springframework.web.bind.annotation.RestController;
  14. import javax.validation.Valid;
  15. /**
  16. * @title: 学生职务设置
  17. * @Author dzx
  18. * @Date: 2023-11-13
  19. * @Version 1.0
  20. */
  21. @RestController
  22. @RequestMapping("/student" + "/consumption")
  23. @Api(value = "/student" + "/consumption",tags = "学生消费管理")
  24. @AllArgsConstructor
  25. public class ConsumptionController {
  26. private final IStudentManagerService studentManagerService;
  27. @GetMapping(value = "/personal-info")
  28. @ApiOperation(value="学生个人信息")
  29. @SaCheckPermission("consumption:detail")
  30. public RT<StudentPersonalInfoVo> personalInfo(@Valid BaseStudentInfoPageDto dto){
  31. StudentPersonalInfoVo info = studentManagerService.getPersonalInfo(StpUtil.getLoginIdAsLong());
  32. return RT.ok(info);
  33. }
  34. }