package com.cpop.oam.business.controller.backstage;

import com.cpop.core.base.R;
import com.cpop.oam.business.bo.PutOffAuditBo;
import com.cpop.oam.business.service.CluePutOffService;
import com.cpop.oam.business.service.ClueRecordService;
import com.cpop.oam.business.vo.CluePageVo;
import com.cpop.oam.business.vo.PutOffAuditPageVo;
import com.cpop.system.business.service.StoreRenewService;
import com.mybatisflex.core.paginate.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * @author DB
 * @version 1.0.0
 * @since 2024-02-21 13:40
 */
@Api(tags = "延期审核接口")
@RestController
@RequestMapping("/backstage/putOff")
public class BackstagePutOffController {

    @Autowired
    private CluePutOffService cluePutOffService;

    /**
     * 延期审核分页
     * @author DB
     * @since 2024/2/19
     * @return R<Page<SignGoalPageVo>>
     */
    @ApiOperation("延期审核分页")
    @GetMapping("/getPutOffAuditPage")
    public R<Page<PutOffAuditPageVo>> getPutOffAuditPage() {
        Page<PutOffAuditPageVo> pageVo = cluePutOffService.getPutOffAuditPage();
        return R.ok(pageVo);
    }

    /**
     * 延期审核选择
     * @author DB
     * @since 2024/2/21
     * @param bo 通过与驳回
     * @return R<Void>
     */
    @ApiOperation("延期审核选择")
    @PutMapping("/putOffAuditSelect")
    public R<Void> putOffAuditSelect(@RequestBody @Validated PutOffAuditBo bo) {
        cluePutOffService.putOffAuditSelect(bo);
        return R.ok();
    }
}
