package com.huatek.busi.dao;

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

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

/**
 * GIS开关-SF6压力微水温度--实时界面数据 Dao
 *
 * @author anker_cheng
 * @date Jul 1, 2019 3:06:37 PM
 */
@Repository
public class RptGisMonitorSf6Dao extends BaseDao<RptGisMonitorSf6, String> {

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