package com.huatek.busi.dao;

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

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

/**
 * GIS-红外测温每日汇总汇总表 Dao
 *
 * @author anker_cheng
 * @date Sep 29, 2019 3:15:17 PM
 */
@Repository
public class RptGisTemperSummaryDao extends BaseDao<RptGisTemperSummary, String> {

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