package com.huatek.busi.dao;

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

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

/**
 * 避雷器--红外测温超标率每日汇总表 Dao
 *
 * @author anker_cheng
 * @date Sep 26, 2019 8:58:55 PM
 */
@Repository
public class RptAretTemperSummaryChaobiaolvDao extends BaseDao<RptAretTemperSummaryChaobiaolv, String> {

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