package com.sqx.modules.reconciliation.controller;


import com.sqx.common.utils.PageUtils;
import com.sqx.common.utils.Result;
import com.sqx.modules.reconciliation.model.PlatformBillDto;
import com.sqx.modules.reconciliation.service.PlatformBillService;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 对账管理表 前端控制器
 * </p>
 *
 * @author ceshi
 * @since 2025-02-27
 */
@RestController
@RequestMapping("/reconciliation/")
@RequiredArgsConstructor
public class PlatformBillController {

    private final PlatformBillService platformBillService;

    @ApiOperation("查询骑手对账")
    @PostMapping(value = "riderBill")
    public Result riderBill(@RequestBody PlatformBillDto platformBillDto){
        PageUtils pageUtils = platformBillService.riderBill(platformBillDto);
        return Result.success().put("data",pageUtils);
    }

    @ApiOperation("查询商家对账")
    @PostMapping(value = "shopBill")
    public Result shopBill(@RequestBody PlatformBillDto platformBillDto){
        PageUtils pageUtils = platformBillService.shopBill(platformBillDto);
        return Result.success().put("data",pageUtils);
    }

    @ApiOperation("查询平台对账")
    @PostMapping(value = "platformBill")
    public Result platformBill(@RequestBody PlatformBillDto platformBillDto){
        PageUtils pageUtils = platformBillService.platformBill(platformBillDto);
        return Result.success().put("data",pageUtils);
    }
}

