package com.huatek.busi.dao;

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

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

/**
 * sf6温度、微水、压力增长率暂存表 Dao
 *
 * @author anker_cheng
 * @date Oct 23, 2019 8:55:17 PM
 */
@Repository
public class  GisSf6IncreaseRateCacheDao extends BaseDao<GisSf6IncreaseRateCache, String> {

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