package com.huatek.busi.dao;

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

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

/**
 * 变压器油色谱原始数据(未根据偏差率修改的数据) Dao
 *
 * @author anker_cheng
 * @date Jul 15, 2019 11:13:43 AM
 */
@Repository
public class  TransformerEpaDataOriginDao extends BaseDao<TransformerEpaDataOrigin, String> {

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

