package com.zcloud.service.platformCurriculum.impl;

import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.dsno2.platformCurriculum.PlatformCurriculumMapper;
import com.zcloud.service.platformCurriculum.PlatformCurriculumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 说明：课程管理
 * 作者：luoxiaobao
 * 时间：2021-07-03
 * 官网：www.zcloudchina.com
 */
@Service
@Transactional //开启事物
public class PlatformCurriculumServiceImpl implements PlatformCurriculumService{

	@Autowired
	private PlatformCurriculumMapper platformCurriculumMapper;

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


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


	@Override
	public void save(PageData pd) throws Exception {
		platformCurriculumMapper.save(pd);
	}


}

