package com.huatek.busi.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.huatek.busi.entity.TransformerOperateData;
import com.huatek.busi.mapper.TransformerOperateDataMapper;
import com.huatek.busi.service.ITransformerOperateDataService;
import com.huatek.torch.sql.dao.impl.BaseDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Slf4j
@Component
@Service(interfaceClass = ITransformerOperateDataService.class)
@Transactional(rollbackFor = Exception.class)
public class TransformerOperateDataServiceImpl extends BaseDao<TransformerOperateData, String> implements ITransformerOperateDataService {

    @Resource
    private TransformerOperateDataMapper transformerOperateDataMapper;

    @Override
    public int insert(TransformerOperateData transformerOperateData) {
        return this.add(transformerOperateData);
    }

    @Override
    public int update(String id, String v){
        return transformerOperateDataMapper.update(id, v);
    }
}
