package com.red.circle.other.adapter.app.sys;

import com.red.circle.framework.core.dto.AppCommand;
import com.red.circle.framework.web.controller.BaseController;
import com.red.circle.other.app.service.sys.EnumConfService;
import java.math.BigDecimal;
import java.util.List;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 枚举配置 服务.
 *
 * @author pengliang on 2023/6/12
 * @eo.api-type http
 * @eo.groupName 道具服务.App配置
 * @eo.path /sys/enum-config
 */
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping(value = "/sys/enum-config", produces = MediaType.APPLICATION_JSON_VALUE)
public class EnumConfigRestController extends BaseController {

  private final EnumConfService enumConfService;

  /**
   * 查询邀请好友奖励.
   *
   * @eo.name 查询邀请好友奖励.
   * @eo.url /user-invite/reward
   * @eo.method get
   * @eo.request-type formdata
   */
  @GetMapping("/user-invite/reward")
  public List<BigDecimal> getInviteReward(AppCommand cmd) {
    return enumConfService.listUserInviteReward(cmd);
  }

}
