12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package com.ym.mec.education.controller;
- import com.ym.mec.education.base.BaseResponse;
- import com.ym.mec.education.enums.ReturnCodeEnum;
- import com.ym.mec.education.req.ClassGroupReq;
- import com.ym.mec.education.service.IClassGroupService;
- 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.PostMapping;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import java.util.Objects;
- /**
- * @program: mec
- * @description: 班级
- * @author: xw
- * @create: 2019-09-26 14:03
- */
- @RestController
- @RequestMapping("api/classGroup")
- @Api(tags = "班级")
- @Slf4j
- public class ClassGroupController {
- @Autowired
- private IClassGroupService classGroupService;
- @PostMapping("/info")
- @ApiOperation("班级详情")
- public BaseResponse getInfo(@RequestBody ClassGroupReq classGroupReq) {
- if (Objects.isNull(classGroupReq.getGroupId())) {
- BaseResponse baseResponse = new BaseResponse();
- baseResponse.setReturnCode(ReturnCodeEnum.CODE_206.getCode());
- baseResponse.setMessage(ReturnCodeEnum.CODE_206.getValue());
- return baseResponse;
- }
- return classGroupService.getInfo(classGroupReq);
- }
- }
|