package com.huatek.busi.dao;

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

import com.huatek.busi.entity.TransformerEpaAbsIncreaseCache;
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  TransformerEpaAbsIncreaseCacheDao extends BaseDao<TransformerEpaAbsIncreaseCache, String> {

    public int saveOrUpdate(TransformerEpaAbsIncreaseCache entity) {
        if(StringUtils.isEmpty(entity.getId())) {
            entity.setId(Uuid.getUUID());
            return this.add(entity);
        }
        return this.updateLocal(entity);
    }
}

