package com.lantone.daqe.web;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lantone.common.api.CommonResult;
import com.lantone.daqe.dto.GetOfficialCapacityPageDTO;
import com.lantone.daqe.facade.OfficialCapacityManagementFacade;
import com.lantone.daqe.vo.DelOfficialCapacityByIdVO;
import com.lantone.daqe.vo.GetOfficialCapacityPageVO;
import io.swagger.annotations.Api;
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;


/**
 * @Description: 职务职称信息变更记录API
 * @author： zhanghang
 * @time: 2022/2/28 17:47
 */

@RestController
@Api(value = "职务职称变更记录API", tags = { "职务职称变更记录API" })
@RequestMapping("/officialCapacityManage")
public class OfficialCapacityManagementController {

    @Autowired
    private OfficialCapacityManagementFacade officialCapacityManagementFacade;


    @ApiOperation(value = "获取职务职称变更记录 [by:zhanghang]")
    @PostMapping("/getOfficialCapacityPage")
    public CommonResult<IPage<GetOfficialCapacityPageDTO>> getOfficialCapacityPage(@RequestBody GetOfficialCapacityPageVO getOfficialCapacityPageVO) {
        return CommonResult.success(officialCapacityManagementFacade.getOfficialCapacityPage(getOfficialCapacityPageVO));
    }


    @ApiOperation(value = "删除职务职称变更记录 [by:zhanghang]")
    @PostMapping("/delOfficialCapacityPage")
    public CommonResult<Boolean> delOfficialCapacityPage(@RequestBody DelOfficialCapacityByIdVO delOfficialCapacityByIdVO) {
        return CommonResult.success(officialCapacityManagementFacade.delOfficialCapacityPage(delOfficialCapacityByIdVO));
    }

}