/*
 * Copyright (c) 京北方信息技术股份有限公司 Corporation 2021 . All rights reserved.
 *
 */
package net.northking.cctp.project.api.team;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.northking.cctp.common.http.QueryByPage;
import net.northking.cctp.common.http.ResultWrapper;
import net.northking.cctp.project.api.team.service.MtProjectTeamApiService;
import net.northking.cctp.project.dto.team.MtProjectTeamDetailDto;
import net.northking.cctp.project.dto.team.MtProjectTeamQueryDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
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 java.util.List;

@Api(tags = "系统人员表")
@RequestMapping("/v1")
@RestController
public class MtProjectTeamQueryCtrl {


    @Autowired
    private MtProjectTeamApiService apiService;


    /**
     * 分页查询 系统人员表 列表
     *
     * @param queryByPage 查询条件
     * @return 数据列表
     */
    @ApiOperation(value = "分页查询列表：系统人员表")
    @PostMapping(value = "/paging/query/MtProjectTeams",
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE,
            consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public ResultWrapper<List<MtProjectTeamDetailDto>> pagingQuery(
            @RequestBody @Validated QueryByPage<MtProjectTeamQueryDto> queryByPage) {
        ResultWrapper<List<MtProjectTeamDetailDto>> wrapper = new ResultWrapper<>();
        List<MtProjectTeamDetailDto> page = apiService.pagingQuery(queryByPage);
        return wrapper.success(page);
    }

}


