package com.red.circle.other.app.inner.endpoint.team;

import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.other.app.inner.service.team.TeamProcessApprovalClientService;
import com.red.circle.other.inner.endpoint.team.logs.api.TeamProcessApprovalClientApi;
import com.red.circle.other.inner.model.dto.agency.agency.TeamApplicationProcessApprovalDTO;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 团队审核服务日志.
 *
 * @author pengliang on 2023/11/21
 */
@Validated
@RestController
@RequestMapping(value = TeamProcessApprovalClientApi.API_PREFIX, produces = MediaType.APPLICATION_JSON_VALUE)
@RequiredArgsConstructor
public class TeamProcessApprovalClientEndpoint implements
    TeamProcessApprovalClientApi {

  private final TeamProcessApprovalClientService teamProcessApprovalClientService;

  @Override
  public ResultResponse<Void> addProcessLog(TeamApplicationProcessApprovalDTO dto) {
    teamProcessApprovalClientService.addProcessLog(dto);
    return ResultResponse.success();
  }

  @Override
  public ResultResponse<Void> addBatchProcessLog(List<TeamApplicationProcessApprovalDTO> list) {
    teamProcessApprovalClientService.addBatchProcessLog(list);
    return ResultResponse.success();
  }

}
