package com.huatek.busi.dao;

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

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

/**
 * 变压器油色谱增长率统计 Dao
 *
 * @author anker_cheng
 * @date Jul 15, 2019 11:48:53 AM
 */
@Repository
public class  TransformerEpaIncreaseStatisticsDao extends BaseDao<TransformerEpaIncreaseStatistics, String> {

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

