package com.zksy.pole.factory.impl;

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

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