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

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ningdatech.carapi.common.aop.BuildChildrenRegionEntity;
import com.ningdatech.carapi.datascope.aop.XmlDataScope;
import com.ningdatech.carapi.safe.entity.NdVehicleAccidentAnalysis;
import com.ningdatech.carapi.safe.mapper.NdVehicleAccidentAnalysisMapper;
import com.ningdatech.carapi.safe.model.dto.AccidentPageQuery;
import com.ningdatech.carapi.safe.service.INdVehicleAccidentAnalysisService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author PoffyZhang
 * @since 2022-10-12
 */
@Service
@RequiredArgsConstructor
public class NdAccidentServiceAnalysisImpl extends ServiceImpl<NdVehicleAccidentAnalysisMapper, NdVehicleAccidentAnalysis>
        implements INdVehicleAccidentAnalysisService {

    private final NdVehicleAccidentAnalysisMapper mapper;

    @Override
    @XmlDataScope(entityIndex = 1)
    @BuildChildrenRegionEntity(entityIndex = 1)
    public Page<NdVehicleAccidentAnalysis> pageAnalysis(Page<NdVehicleAccidentAnalysis> page, AccidentPageQuery accidentPageQuery) {
        return mapper.pageAnalysis(page,accidentPageQuery);
    }

    @Override
    public Page<NdVehicleAccidentAnalysis> pageAnalysisOpen(Page<NdVehicleAccidentAnalysis> page, AccidentPageQuery accidentPageQuery) {
        return mapper.pageAnalysis(page,accidentPageQuery);
    }
}
