package com.css.txw.gxzx.controller;

import com.css.ggzc.framework.common.pojo.CommonResult;
import com.css.txw.gxzx.pojo.vo.QyRzSpReqVO;
import com.css.txw.gxzx.pojo.vo.QyRzSqReqVO;
import com.css.txw.gxzx.pojo.vo.QyRzSqxxVO;
import com.css.txw.gxzx.pojo.vo.QyrzListReqVO;
import com.css.txw.gxzx.service.TxwGxzxRzsqjlbService;
import io.swagger.v3.oas.annotations.tags.Tag;
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 javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/qyrz")
@Tag(name = "企业入驻")
@Validated
public class QyRzController {

    @Resource
    private TxwGxzxRzsqjlbService rzsqjlbService;

    @PostMapping("/qyrzsq")
    public CommonResult<String> qyrzsq(@RequestBody QyRzSqReqVO reqVO){
        return CommonResult.success(rzsqjlbService.qyrzsq(reqVO));
    }

    @PostMapping("/qyrzsp")
    public CommonResult<String> qyrzsp(@RequestBody QyRzSpReqVO reqVO){
        return CommonResult.success(rzsqjlbService.qyrzsp(reqVO));
    }

    @PostMapping("/qyrzList")
    public CommonResult<List<QyRzSqxxVO>> qyrzList(@RequestBody QyrzListReqVO reqVO){
        return CommonResult.success(rzsqjlbService.qyrzList(reqVO));
    }

    @PostMapping("/currentQyrzList")
    public CommonResult<List<QyRzSqxxVO>> currentQyrzList(){
        return CommonResult.success(rzsqjlbService.currentQyrzList());
    }

}
