package com.huatek.busi.dao;

import com.huatek.torch.util.uuid.Uuid;
import org.springframework.stereotype.Repository;

import com.huatek.busi.entity.BusiTransformerExperiment;
import com.huatek.torch.sql.dao.impl.BaseDao;
import org.springframework.util.StringUtils;

/**
  * @ClassName: BusiTransformerExperimentDao
  * @FullClassPath: com.huatek.busi.dao.BusiTransformerExperimentDao
  * @Description: 变压器例行试验七气一水值 服务 Dao
  * @author: Arno
  * @date: Jul 15, 2019 10:47:26 AM
  * @version: 1.0
  */
@Repository
public class BusiTransformerExperimentDao extends BaseDao<BusiTransformerExperiment, String> {
    public int saveOrUpdate(BusiTransformerExperiment entity) {
        if (StringUtils.isEmpty(entity.getId())) {
            entity.setId(Uuid.getUUID());
            return this.add(entity);
        }
        return this.updateLocal(entity);
    }
}
