package com.kxs.stat.biz.controller;

import com.kxs.common.core.util.R;
import com.kxs.stat.biz.service.KxsMerchantTradeService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * KXS 商户统计控制器
 *
 * @author 没秃顶的码农
 * @date 2024-07-09
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("mchTrade")
public class KxsMchTradeController {

    private final KxsMerchantTradeService kxsMerchantTradeService;


    /**
     * 商户交易记录
     *
     * @param id 商户id
     * @return 商户交易记录
     */
    @GetMapping("/merchantTradeDetail")
    public R merchantTradeDetail(@RequestParam("id") Long id, @RequestParam("month") String month) {

        return kxsMerchantTradeService.merchantTradeDetail(id, month);
    }
}
