package org.wfc.system.controller;

import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.wfc.common.core.web.controller.BaseController;
import org.wfc.common.core.web.page.TableDataInfo;
import org.wfc.system.domain.bo.UCdrHistoryUserBo;
import org.wfc.system.domain.vo.UCdrHistoryUserVo;
import org.wfc.system.service.IUCdrService;

import java.util.List;

/**
 * <p>
 * 用户平台_用户话单表 前端控制器
 * </p>
 *
 * @author sys
 * @since 2025-01-03
 */
@RestController
@RequestMapping("/cdr")
public class UCdrController extends BaseController {

    @Autowired
    private IUCdrService uCdrService;

    /**
     * 根据用户查询cdr记录
     *
     * @return 结果
     */
    @Operation(summary = "CDR记录")
    @GetMapping("/pageHistory")
    public TableDataInfo getHistoryByUser(UCdrHistoryUserBo item) {
        startPage();
        List<UCdrHistoryUserVo> result = uCdrService.getHistoryByUser(item);
        return getDataTable(result);
    }

}
