package com.ningdatech.carapi.driver.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ningdatech.carapi.datascope.aop.XmlDataScope;
import com.ningdatech.carapi.driver.entity.RegionStarDTO;
import com.ningdatech.carapi.driver.entity.StarManage;
import com.ningdatech.carapi.driver.mapper.StarManageMapper;
import com.ningdatech.carapi.driver.service.IStarManageService;

import lombok.RequiredArgsConstructor;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Liuxinxin
 * @since 2022-11-15
 */
@Service
@RequiredArgsConstructor
public class StarManageServiceImpl extends ServiceImpl<StarManageMapper, StarManage> implements IStarManageService {

    private final StarManageMapper starManageMapper;

    @Override
    @XmlDataScope
    public Double getAvgStar(RegionStarDTO param) {
        return starManageMapper.getAvgStar(param);
    }

    @Override
    @XmlDataScope
    public Double countTotalStar(RegionStarDTO param) {
        return starManageMapper.countTotalStar(param);
    }

    @Override
    @XmlDataScope
    public Double getCompanyAvgStar(RegionStarDTO param) {
        return starManageMapper.getCompanyAvgStar(param);
    }
}
