package com.dsk.web.controller.customer;

import com.dsk.common.core.controller.BaseController;
import com.dsk.common.core.domain.AjaxResult;
import com.dsk.common.utils.SecurityUtils;
import com.dsk.system.domain.customer.dto.CustomerSearchDto;
import com.dsk.system.service.ICustomerOverviewService;
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;

/**
 * 客户概览
 * @author lcl
 * @create 2023/8/15
 */
@RestController
@RequestMapping("/customer/overview")
public class CustomerOverviewController extends BaseController {

    @Autowired
    private ICustomerOverviewService baseService;

    /**
     * 客户统计
     */
    @GetMapping("/statistics")
    public AjaxResult statistics(){
        return AjaxResult.success(baseService.statistics(new CustomerSearchDto()));
    }

    /**
     * 客户合作情况
     */
    @GetMapping("/cooperation/top")
    public AjaxResult cooperationTop(){
        return AjaxResult.success(baseService.cooperationTop(new CustomerSearchDto()));
    }

    /**
     * 客户信资评级
     */
    @GetMapping("/credit/level")
    public AjaxResult creditLevel(){
        return AjaxResult.success(baseService.creditLevel(new CustomerSearchDto()));
    }
}
