package com.zjrs.ggfw.rlzysc.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.mohrss.leaf.core.framework.web.controller.AjaxResponse;
import com.zjrs.ggfw.rlzysc.bpo.JxgwBPO;
import com.zjrs.ggfw.rlzysc.dto.JxgwCommDTO;
import com.zjrs.ggfw.rlzysc.dto.JxgwQueryDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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 jakarta.annotation.Resource;
import jakarta.validation.Valid;

/*
见习岗位管理
 */
@Api("见习岗位管理")
@RestController
@RequestMapping("/api/rlzysc/jxgwgl")
public class JxgwController {
    private static final Logger LOG = LoggerFactory.getLogger(JxgwController.class);

    @Resource
    private JxgwBPO jxgwBPO;
    /*
    见习岗位管理*获取列表
     */
    @ApiOperation(value = "获取列表", notes = "见习岗位管理*获取列表")
    @PostMapping(value = "/getList")
    public AjaxResponse getList(@RequestBody @Valid JxgwQueryDTO dto){
        AjaxResponse ajaxResponse = new AjaxResponse();
        ajaxResponse.setData("data", jxgwBPO.getList(dto));
        ajaxResponse.setData("pagenum", dto.getPagenum());
        ajaxResponse.setData("pagesize", dto.getPagesize());
        return ajaxResponse;
    }
    /*
    见习岗位管理*获取明细信息
     */
    @ApiOperation(value = "获取明细信息", notes = "见习岗位管理*获取明细信息")
    @PostMapping(value = "/getDetail")
    public AjaxResponse getDetail(@RequestBody @Valid JxgwCommDTO dto) {
        AjaxResponse ajaxResponse = new AjaxResponse();
        ajaxResponse.setData("data", jxgwBPO.getDetail(dto));
        return ajaxResponse;
    }

}

