package com.huatek.busi.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.huatek.busi.dao.BusiEqmWarningInfoDao;
import com.huatek.busi.dao.BusiEqmWarningPictureDao;
import com.huatek.busi.entity.BusiEqmWarningPicture;
import com.huatek.busi.mapper.BusiEqmWarningInfoMapper;
import com.huatek.busi.mapper.BusiEqmWarningPictureMapper;
import com.huatek.busi.service.BusiEqmWarningPictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Bobi_huo
 * @date 2020-10-26 16:21
 */
@Component
@Service(interfaceClass = BusiEqmWarningPictureService.class)
@Transactional(rollbackFor = Exception.class)
public class BusiEqmWarningPictureServiceImpl implements BusiEqmWarningPictureService {

    @Autowired
    private BusiEqmWarningPictureMapper busiEqmWarningPictureMapper;
    @Autowired
    private BusiEqmWarningPictureDao busiEqmWarningPictureDao;

    @Override
    public int save(BusiEqmWarningPicture entity) {
        return busiEqmWarningPictureDao.save(entity);
    }

    @Override
    public List<BusiEqmWarningPicture> findByWarningId(String warningId) {
        return busiEqmWarningPictureMapper.selectByWarningId(warningId);
    }
}
