MemberController.java 2.66 KB
package com.subsidy.controller;


import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.company.AttendMembersDTO;
import com.subsidy.dto.member.CancerMemberDTO;
import com.subsidy.dto.member.DepartMembersDTO;
import com.subsidy.model.CompanyMemberMappingDO;
import com.subsidy.service.CompanyMemberMappingService;
import io.swagger.annotations.ApiOperation;
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 io.swagger.annotations.Api;

/**
 * <p>
 * 学生表 前端控制器
 * </p>
 *
 * @author Tuyp
 * @since 2024-01-11
 */
@RestController
@Api(tags = "学生表")
@RequestMapping("/member")
public class MemberController {


    @Autowired
    private CompanyMemberMappingService companyMemberMappingService;

    @PostMapping("cancerMember")
    @ApiOperation("离职 memberIds[]  companyId")
    public ResponseVO cancerMember(@RequestBody CancerMemberDTO cancerMemberDTO){
        return ResponseData.generateCreatedResponse(0,companyMemberMappingService.cancerMember(cancerMemberDTO));
    }

    @PostMapping("departMembers")
    @ApiOperation("某公司的离职记录  pageSize pageNum  companyId  userName 姓名/手机号/身份证号")
    public ResponseVO departMembers(@RequestBody DepartMembersDTO departMembersDTO){
        return ResponseData.generateCreatedResponse(0,companyMemberMappingService.departMembers(departMembersDTO));
    }

    @PostMapping("exportDepartMembers")
    @ApiOperation("导出离职人员记录   companyId  userName 姓名/手机号/身份证号  ")
    public void exportDepartMembers(@RequestBody DepartMembersDTO departMembersDTO){
        companyMemberMappingService.exportDepartMembers(departMembersDTO);
    }

    @PostMapping("attendMembers")
    @ApiOperation("查看某个企业已经参加过该培训的学生   companyId departmentId userName pageSize pageNum")
    public ResponseVO attendMembers(@RequestBody AttendMembersDTO attendMembersDTO){
        return ResponseData.generateCreatedResponse(0,companyMemberMappingService.attendMembers(attendMembersDTO));
    }

    @PostMapping("memberAttendInfo")
    @ApiOperation("某个学员在该企业参加培训的详情  memberId  学员id companyId 公司id")
    public ResponseVO memberAttendInfo(@RequestBody CompanyMemberMappingDO companyMemberMappingDO){
        return ResponseData.generateCreatedResponse(0,companyMemberMappingService.memberAttendInfo(companyMemberMappingDO));
    }


}