07 微架构教务系统——讲师接口

1、讲师接口概览

2、使用Swagger测试接口

3、控制层:TeacherController

package cn.org.xcore.edusys.controller.teacher;

import cn.org.xcore.edusys.db.ext.model.Teacher;
import cn.org.xcore.edusys.db.ext.model.Position;
import cn.org.xcore.edusys.common.bean.ApiResponse;
import cn.org.xcore.edusys.common.EmailRunnable;
import cn.org.xcore.edusys.common.poi.PoiUtils;
import cn.org.xcore.edusys.service.TeacherService;
import cn.org.xcore.edusys.service.impl.DepartmentService;
import cn.org.xcore.edusys.service.impl.JobLevelService;
import cn.org.xcore.edusys.service.impl.PositionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.thymeleaf.TemplateEngine;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;

/**
 * @author 李海林 手机:13802780104|微信:lihailin9073|Email:767679879@qq.com
 * @copyright 个人开发者李海林版权所有,产品详情及技术服务请登录官网查询[http://www.x-core.org.cn]
 * @create 2019-08-20 18:42
 */
@Api(tags = "03-讲师模块")
@RestController
@RequestMapping("/teacher")
public class TeacherController {
    @Autowired
    private TeacherService teacherService;
    @Autowired
    private DepartmentService departmentService;
    @Autowired
    private PositionService positionService;
    @Autowired
    private JobLevelService jobLevelService;
    @Autowired
    private ExecutorService executorService;
    @Autowired
    private TemplateEngine templateEngine;
    @Autowired
    private JavaMailSender javaMailSender;

    @ApiOperation("获取民族列表")
    @GetMapping("/get_nation_list")
    public Map<String, Object> getNationList() {
        Map<String, Object> map = new HashMap<>();
        map.put("nations", teacherService.getAllNationList());
        map.put("politics", teacherService.getAllPolitics());
        map.put("deps", departmentService.getDepByPid(-1L));
        map.put("positions", positionService.getAllPos());
        map.put("joblevels", jobLevelService.getAllJobLevels());
        map.put("workID", String.format("%08d", teacherService.getMaxWorkID() + 1));
        return map;
    }

    @ApiOperation("获取讲师工号ID")
    @GetMapping("/get_max_work_
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值