package com.zksy.pole.factory.impl;

import com.zksy.pole.domain.po.DgEquipmentStatus;
import com.zksy.pole.factory.IHandleCmd;
import com.zksy.pole.mapper.DgEquipmentStatusMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class HandleDgEquipmentStatusCmd implements IHandleCmd {
    @Autowired
    private DgEquipmentStatusMapper dgEquipmentStatusMapper;
    @Override
    public <T> String HandleCmdMethod(T data) {
        try {
            DgEquipmentStatus d = (DgEquipmentStatus) data;
            dgEquipmentStatusMapper.insert(d);
            return null;
        } catch (Exception e) {
            log.error("DgEquipmentStatus数据插入失败");
            return null;
        }
    }
}
