package com.lz.modules.sys.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.modules.sys.dao.ResourceMapper;
import com.lz.modules.sys.entity.Resource;
import com.lz.modules.sys.service.ResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, Resource> implements ResourceService {


    @Autowired
	private ResourceMapper resourceMapper;



	@Override
	public Resource selectResourceById(Long id){
		return resourceMapper.selectResourceById(id);
	}



	@Override
	public Long insertResource(Resource resource){
		return resourceMapper.insertResource(resource);
	}



	@Override
	public int updateResourceById(Resource resource){
		return resourceMapper.updateResourceById(resource);
	}



	@Override
	public int updateCoverResourceById(Resource resource){
		return resourceMapper.updateCoverResourceById(resource);
	}



	@Override
	public int deleteResourceById(Long id){
		return resourceMapper.deleteResourceById(id);
	}

	@Override
	public Resource selectResourceByTypeAndSecType(String type, String secType) {
		return resourceMapper.selectResourceByTypeAndSecType(type,secType);
	}
}
