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.RptAretMonitorSummary;

/**
 * 避雷器--基础信息--每天汇总 Dao
 *
 * @author anker_cheng
 * @date Sep 26, 2019 8:58:56 PM
 */
@Repository
public class  RptAretMonitorSummaryDao extends BaseDao<RptAretMonitorSummary, String> {

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

