package com.zcloud.service.video.impl;

import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.video.AIWarningMapper;
import com.zcloud.service.video.AIWarningService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 说明：AI报警
 * 作者：luoxiaobao
 * 时间：2022-09-21
 * 官网：www.zcloudchina.com
 */
@Service
@Transactional //开启事物
public class AIWarningServiceImpl implements AIWarningService {

	@Autowired
	private AIWarningMapper aiwarningMapper;


	/**列表
	 * @param page
	 * @throws Exception
	 */
	public List<PageData> list(Page page)throws Exception{
		return aiwarningMapper.datalistPage(page);
	}

	/**列表(全部)
	 * @param pd
	 * @throws Exception
	 */
	public List<PageData> listAll(PageData pd)throws Exception{
		return aiwarningMapper.listAll(pd);
	}

	/**通过id获取数据
	 * @param pd
	 * @throws Exception
	 */
	public PageData findById(PageData pd)throws Exception{
		return aiwarningMapper.findById(pd);
	}

	@Override
	public void save(PageData pd) {
		aiwarningMapper.save(pd);
	}

	@Override
	public void edit(PageData pd) {
		aiwarningMapper.edit(pd);
	}

	@Override
	public void deleteAll(String[] aiwarningIds) {
		aiwarningMapper.deleteAll(aiwarningIds);
	}
}

