package com.dsk.cscec.controller;


import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.bo.AdvisoryBodySearchBo;
import com.dsk.cscec.domain.bo.ProjectSearchBo;
import com.dsk.cscec.domain.vo.AdvisoryBodySearchVo;
import com.dsk.cscec.domain.vo.ProjectSearchVo;
import com.dsk.cscec.service.IDProjectService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 咨询机构管理控制层
 *
 * @author sxk
 * @since 2023-12-10 15:34:46
 */
@RestController
@RequestMapping("advisory/body")
public class AdvisoryBodyManageController extends BaseController {
    /**
     * 服务对象
     */
    @Resource
    private IDProjectService baseService;

    /**
     * 获取所有项目列表数据
     */
    @GetMapping("/getProjectList")
    public TableDataInfo<ProjectSearchVo> getProjectList(ProjectSearchBo projectSearchBo, PageQuery pageQuery) {
        return baseService.queryProjectList(projectSearchBo, pageQuery);
    }

    /**
     * 获取所有企业列表(咨询机构)数据
     */
    @GetMapping("/getAdvisoryBodyList")
    public TableDataInfo<AdvisoryBodySearchVo> getAdvisoryBodyList(AdvisoryBodySearchBo advisoryBodySearchBo, PageQuery pageQuery) {
        return baseService.queryAdvisoryBodyList(advisoryBodySearchBo, pageQuery);
    }


    //
    ///**
    // * 通过主键查询单条数据
    // *
    // * @param id 主键
    // * @return 单条数据
    // */
    //@GetMapping("{id}")
    //public R selectOne(@PathVariable Serializable id) {
    //    return success(this.dProjectService.getById(id));
    //}
    //
    ///**
    // * 新增数据
    // *
    // * @param dProject 实体对象
    // * @return 新增结果
    // */
    //@PostMapping
    //public R insert(@RequestBody DProject dProject) {
    //    return success(this.dProjectService.save(dProject));
    //}
    //
    ///**
    // * 修改数据
    // *
    // * @param dProject 实体对象
    // * @return 修改结果
    // */
    //@PutMapping
    //public R update(@RequestBody DProject dProject) {
    //    return success(this.dProjectService.updateById(dProject));
    //}
    //
    ///**
    // * 删除数据
    // *
    // * @param idList 主键结合
    // * @return 删除结果
    // */
    //@DeleteMapping
    //public R delete(@RequestParam("idList") List<Long> idList) {
    //    return success(this.dProjectService.removeByIds(idList));
    //}
}

