package com.huatek.busi.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.alibaba.dubbo.config.annotation.Service;
import com.huatek.busi.dao.BusiEqmWarningInfoDao;
import com.huatek.busi.entity.BusiEqmWarningInfo;
import com.huatek.busi.mapper.BusiEqmWarningInfoMapper;
import com.huatek.busi.service.BusiEqmWarningInfoService;

/**
 * 告警详情表 ServiceImpl
 *
 * @author anker_cheng
 * @date Aug 6, 2019 2:46:09 PM
 */
@Component
@Service(interfaceClass = BusiEqmWarningInfoService.class)
@Transactional(rollbackFor = Exception.class)
public class BusiEqmWarningInfoServiceImpl implements BusiEqmWarningInfoService {

    @Autowired
    private BusiEqmWarningInfoMapper busiEqmWarningInfoMapper;
    @Autowired
    private BusiEqmWarningInfoDao busiEqmWarningInfoDao;

    @Override
    public int save(BusiEqmWarningInfo entity) {
        return this.busiEqmWarningInfoDao.saveOrUpdate(entity);
    }

    @Override
    public BusiEqmWarningInfo findByWarningId(String warningId) {
        return busiEqmWarningInfoMapper.selectByWarningId(warningId);
    }

}
