package com.sw.mes.yb.alloy.service.impl;


import com.sw.mes.core.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.sw.mes.yb.alloy.entity.FixLogicHisLog;
import com.sw.mes.yb.alloy.dao.FixLogicHisLogDao;
import com.sw.mes.yb.alloy.service.FixLogicHisLogService;
import org.springframework.util.CollectionUtils;

import java.util.List;


/**
 * @Author
 * @Description：
 * @Date: Create in
 * @Modified By:
 */
@Service
@Transactional
public class FixLogicHisLogServiceImpl extends BaseServiceImpl<FixLogicHisLog> implements FixLogicHisLogService {
    FixLogicHisLogDao dao;

    @Autowired
    public void setDao(FixLogicHisLogDao dao) {
        super.setBaseDao(dao);
        this.dao = dao;
    }

    @Override
    public void deleteByFixLogicHisIds(Integer[] ids) {
        List<FixLogicHisLog> fixLogicHisLogList = dao.findByFixLogicHisIds(ids);
        if (!CollectionUtils.isEmpty(fixLogicHisLogList)){
            dao.deleteAll(fixLogicHisLogList);
        }
    }
}
