package com.goldenwater.slaj.hidd.controller;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.goldenwater.common.core.controller.BaseController;
import com.goldenwater.common.core.domain.AjaxResult;
import com.goldenwater.common.core.page.TableDataInfo;
import com.goldenwater.slaj.hidd.domain.BisHiddZeroAssess;
import com.goldenwater.slaj.hidd.service.IBisHiddZeroAssessService;

@RestController
@RequestMapping("/hidd/zeroassess")
public class BisHiddZeroAssessController extends BaseController {
    @Autowired
    private IBisHiddZeroAssessService bisHiddZeroAssessService;

    @GetMapping("/list")
    public TableDataInfo list(BisHiddZeroAssess bisHiddZeroAssess) {
        startPage();
        List<BisHiddZeroAssess> list = bisHiddZeroAssessService.selectBisHiddZeroAssessList(bisHiddZeroAssess);
        return getDataTable(list);
    }

    @GetMapping("/{id}")
    public AjaxResult getInfo(@PathVariable Long id) {
        return AjaxResult.success(bisHiddZeroAssessService.selectBisHiddZeroAssessById(id));
    }

    @PostMapping
    public AjaxResult add(@RequestBody BisHiddZeroAssess bisHiddZeroAssess) {
        return toAjax(bisHiddZeroAssessService.insertBisHiddZeroAssess(bisHiddZeroAssess));
    }

    @PutMapping
    public AjaxResult edit(@RequestBody BisHiddZeroAssess bisHiddZeroAssess) {
        return toAjax(bisHiddZeroAssessService.updateBisHiddZeroAssess(bisHiddZeroAssess));
    }

    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(bisHiddZeroAssessService.deleteBisHiddZeroAssessByIds(ids));
    }
}
