package com.tourism.webadmin.app.website.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import com.github.pagehelper.page.PageMethod;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.tourism.common.core.annotation.MyRequestBody;
import com.tourism.common.core.constant.ErrorCodeEnum;
import com.tourism.common.core.object.*;
import com.tourism.common.core.util.MyCommonUtil;
import com.tourism.common.core.util.MyModelUtil;
import com.tourism.common.core.util.MyPageUtil;
import com.tourism.common.log.annotation.OperationLog;
import com.tourism.common.log.model.constant.SysOperationLogType;
import com.tourism.webadmin.back.dto.TourProjectGroupPurchaseRebateDto;
import com.tourism.webadmin.back.model.TourProjectGroupPurchaseRebate;
import com.tourism.webadmin.back.service.TourProjectGroupPurchaseRebateService;
import com.tourism.webadmin.back.vo.TourProjectGroupPurchaseRebateVo;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 拼团返利接口。
 *
 * @author 吃饭睡觉
 * @date 2024-09-06
 */
@Tag(name = "拼团返利接口")
@Slf4j
@RestController
@RequestMapping("/website/app/tourProjectGroupPurchaseRebate")
public class WebsiteProjectGroupPurchaseRebateController {

    @Autowired
    private TourProjectGroupPurchaseRebateService tourProjectGroupPurchaseRebateService;

    /**
     * 计算当前用户返利总金额。
     *
     * @return 应答结果对象，包含对象详情。
     */
    @GetMapping("/getTotalRebateAmount")
    public ResponseResult<Map<String, Object>> view() {
        return ResponseResult.success(tourProjectGroupPurchaseRebateService.getTotalRebateAmount());
    }
}
