Blame view

CompanyMemberMappingController.java 1.64 KB
涂亚平 committed
1 2 3
package com.subsidy.controller;


4 5
import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
涂亚平 committed
6 7
import com.subsidy.common.interceptor.LoginRequired;
import com.subsidy.dto.company.GetCompanyMembersDTO;
8 9 10 11 12 13 14
import com.subsidy.dto.company.InviteMemberDTO;
import com.subsidy.dto.member.CancerMemberDTO;
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;
涂亚平 committed
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
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 = "公司人员映射表")
30
@RequestMapping("/companyMemberMapping")
涂亚平 committed
31 32
public class CompanyMemberMappingController {

33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
    @Autowired
    private CompanyMemberMappingService companyMemberMappingService;

    @PostMapping("inviteMember")
    @ApiOperation("邀请某人  userName  idCard  companyId")
    public ResponseVO inviteMember(@RequestBody InviteMemberDTO inviteMemberDTO){
        return ResponseData.generateCreatedResponse(0,companyMemberMappingService.inviteMember(inviteMemberDTO));
    }

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

涂亚平 committed
48
}