package com.dsk.cscec.controller;


import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.PageQuery;
import com.dsk.common.core.domain.R;
import com.dsk.common.core.page.TableDataInfo;
import com.dsk.cscec.domain.LaborLeaderCustomerRisk;
import com.dsk.cscec.domain.bo.AddLaborLeaderCustomerRiskBo;
import com.dsk.cscec.domain.bo.QueryLaborLeaderCustomerRisk;
import com.dsk.cscec.service.LaborLeaderCustomerRiskService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 劳务队长供应商挂靠风险表(LaborLeaderCustomerRisk)表控制层
 *
 * @author sxk
 * @since 2024-06-04 17:28:40
 */
@RestController
@RequestMapping("laborLeaderCustomerRisk")
public class LaborLeaderCustomerRiskController extends BaseController {
    /**
     * 服务对象
     */
    @Resource
    private LaborLeaderCustomerRiskService baseService;

    /**
     * 添加挂靠风险记录
     */
    @PostMapping("/addRiskRecord")
    public R<Void> addRiskRecord(@Validated @RequestBody AddLaborLeaderCustomerRiskBo addBo) {
        return toAjax(baseService.addRiskRecord(addBo));
    }

    /**
     * 查询挂靠风险列表
     */
    @GetMapping("/queryRiskList")
    public TableDataInfo<LaborLeaderCustomerRisk> queryRiskList(QueryLaborLeaderCustomerRisk queryBo, PageQuery pageQuery) {
        return baseService.queryRiskList(queryBo, pageQuery);
    }
}

