/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.syswarning.service;

import java.util.List;

import com.jeeplus.modules.sys.utils.UserUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.common.persistence.Page;
import com.jeeplus.common.service.CrudService;
import com.jeeplus.modules.syswarning.entity.SysWarningLog;
import com.jeeplus.modules.syswarning.dao.SysWarningLogDao;

/**
 * 预警日志Service
 * @author ssrh
 * @version 2018-08-16
 */
@Service
@Transactional(readOnly = true)
public class SysWarningLogService extends CrudService<SysWarningLogDao, SysWarningLog> {

	public SysWarningLog get(String id) {
		return super.get(id);
	}
	
	public List<SysWarningLog> findList(SysWarningLog sysWarningLog) {
		sysWarningLog.setCompanyId(UserUtils.getSelectCompany().getId());
		return super.findList(sysWarningLog);
	}
	
	public Page<SysWarningLog> findPage(Page<SysWarningLog> page, SysWarningLog sysWarningLog) {
		sysWarningLog.setPage(page);
		page.setList(findList(sysWarningLog));
		return page;
	}
	
	@Transactional(readOnly = false)
	public void save(SysWarningLog sysWarningLog) {
		super.save(sysWarningLog);
	}
	
	@Transactional(readOnly = false)
	public void delete(SysWarningLog sysWarningLog) {
		super.delete(sysWarningLog);
	}
	
	
	
	
}