package com.huatek.busi.dao;

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

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

/**
 * Dao
 *
 * @author anker_cheng
 * @date Oct 28, 2019 4:24:35 PM
 */
@Repository
public class RptTemperRecordChartsDao extends BaseDao<RptTemperRecordCharts, String> {

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