package com.yccrc.kede.controller.gov;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
//import com.baomidou.mybatisplus.core.metadata.IPage;
import java.util.*;
import com.yccrc.common.utils.PageUtils;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yccrc.common.annotation.Log;
import com.yccrc.common.core.controller.BaseController;
import com.yccrc.common.vo.*;
import io.swagger.annotations.*;
import com.yccrc.common.enums.BusinessType;
import com.yccrc.kede.domain.Enterprise;
import com.yccrc.kede.service.IEnterpriseService;
import com.yccrc.kede.vo.EnterpriseAdminVO;
import com.yccrc.kede.vo.EnterpriseAuthVO;

import cn.hutool.core.util.StrUtil;



/**
 * 企业信息Controller
 * 
 * @author yccrc
 * @date 2022-04-25
 */
@Api(tags = "企业信息")
@RestController
@RequestMapping("/gov/enterprise")
public class EnterpriseGovController extends BaseController
{
    @Autowired
    private IEnterpriseService enterpriseService;

    
    @ApiOperation(value = "查询企业信息列表")
    @GetMapping("/list")
    public Result<Page<Enterprise>> list(Enterprise enterprise)
    {
       return new Result<Page<Enterprise>>().ok(enterpriseService.selectEnterprise(enterprise));
     
    }

    @ApiOperation(value = "获取企业信息详细信息")
    @GetMapping(value = "/{id}")
    public Result<Enterprise> getInfo(@PathVariable("id") Integer id)
    {
        return new Result<Enterprise>().ok(enterpriseService.getById(id));
    }
   
}
