package com.cool.store.controller.webb;

import com.cool.store.request.OperationLogRequest;
import com.cool.store.response.AuditInfoResponse;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.OperationLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author suzhuhong
 * @Date 2025/5/7 17:23
 * @Version 1.0
 */
@RestController
@RequestMapping("pc/operation")
@Api(tags = "审批记录")
public class OperationLogController {

    @Resource
    OperationLogService operationLogService;
    @PostMapping("/commonAuditInfo")
    @ApiOperation("获取审批流")
    public ResponseResult<List<AuditInfoResponse>> auditInfo(@RequestBody @Validated OperationLogRequest request){
        return ResponseResult.success(operationLogService.getAuditInfo(request.getShopId(), request.getSubStageStatusList()));
    }


}
