package com.pj.tb_banner;

import java.util.List;

import cn.hutool.extra.cglib.CglibUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.pj.enummj.DeleteStatus;
import com.pj.tb_banner.vo.TbBannerVo;
import com.pj.utils.so.SoMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import com.pj.utils.sg.*;

/**
 * Service: tb_banner -- 轮播图
 * @author loovi
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class TbBannerService extends ServiceImpl<TbBannerMapper, TbBanner> implements IService<TbBanner>{

	/** 底层 Mapper 对象 */
	@Autowired
	TbBannerMapper tbBannerMapper;

	/** 增 */
	void add(TbBanner t){
		save(t);
	}

	/** 删 */
	void delete(Long id){
		removeById(id);
	}

	/** 改 */
	void update(TbBanner t){
		updateById(t);

	}

	/** 查 */
	TbBanner getById(Long id){
		return super.getById(id);
	}

	/** 查集合 - 根据条件（参数为空时代表忽略指定条件） */  
	List<TbBanner> getList(SoMap so) { 
		return tbBannerMapper.getList(so);	
	}

}
