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.TeamTerminationFeeRecordClientService;
import com.red.circle.other.inner.endpoint.approval.api.TeamTerminationFeeRecordClientApi;
import com.red.circle.other.inner.endpoint.team.target.api.TeamProfileClientApi;
import com.red.circle.other.inner.model.dto.team.TeamTerminationFeeRecordDTO;
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;

import java.io.Serializable;
import java.util.List;

/**
 * @author longli on  2024/3/14
 */

@Validated
@RestController
@RequestMapping(value = TeamTerminationFeeRecordClientApi.API_PREFIX, produces = MediaType.APPLICATION_JSON_VALUE)
@RequiredArgsConstructor
public class TeamTerminationFeeRecordClientEndpoint  implements TeamTerminationFeeRecordClientApi {

    private final TeamTerminationFeeRecordClientService teamTerminationFeeRecordClientService;
    @Override
    public ResultResponse<List<TeamTerminationFeeRecordDTO>> listByTimeGt24AndPayeeUserNull() {
        return ResultResponse.success(teamTerminationFeeRecordClientService.listByTimeGt24AndPayeeUserNull());
    }

    @Override
    public ResultResponse<TeamTerminationFeeRecordDTO> getById(Serializable id) {
        return ResultResponse.success(teamTerminationFeeRecordClientService.getById(id));
    }

    @Override
    public ResultResponse<TeamTerminationFeeRecordDTO> updateSelectiveById(TeamTerminationFeeRecordDTO teamTerminationFeeRecordDTO) {
        return ResultResponse.success(teamTerminationFeeRecordClientService.updateSelectiveById(teamTerminationFeeRecordDTO));
    }
}
