package com.huatek.busi.dao;

import org.springframework.stereotype.Repository;
import org.springframework.util.StringUtils;

import com.huatek.busi.entity.TransformerEpaAbsIncreaseStatistics;
import com.huatek.torch.sql.dao.impl.BaseDao;
import com.huatek.torch.util.uuid.Uuid;

/**
 * 变压器油色谱绝对产气速率统计 Dao
 *
 * @author anker_cheng
 * @date Sep 26, 2019 8:58:56 PM
 */
@Repository
public class TransformerEpaAbsIncreaseStatisticsDao extends BaseDao<TransformerEpaAbsIncreaseStatistics, String> {
    public int saveOrUpdate(TransformerEpaAbsIncreaseStatistics transformerEpaIncreaseCache) {
        if (StringUtils.isEmpty(transformerEpaIncreaseCache.getId())) {
            transformerEpaIncreaseCache.setId(Uuid.getUUID());
            return this.add(transformerEpaIncreaseCache);
        }
        return this.updateLocal(transformerEpaIncreaseCache);
    }
}
