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

import com.red.circle.framework.dto.ResultResponse;
import com.red.circle.other.app.inner.service.user.user.WeekFriendshipCardCountClientService;
import com.red.circle.other.inner.endpoint.user.user.api.WeekFriendshipCardClientApi;
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/10/17
 */
@Validated
@RestController
@RequestMapping(value = WeekFriendshipCardClientApi.API_PREFIX, produces = MediaType.APPLICATION_JSON_VALUE)
@RequiredArgsConstructor
public class WeekFriendshipCardClientEndpoint implements WeekFriendshipCardClientApi {

  private final WeekFriendshipCardCountClientService weekFriendshipCardCountClientService;

  @Override
  public ResultResponse<Void> incrThisWeekQuantity(String sysOrigin, String cardType,
      Long userIdOne, Long userIdTwo, Long quantity) {
    weekFriendshipCardCountClientService.incrThisWeekQuantity(sysOrigin, cardType, userIdOne,
        userIdTwo, quantity);
    return ResultResponse.success();
  }
}
