package com.huatek.busi.dao;

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

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

/**
 * 红外测温温度增长率表 Dao
 *
 * @author anker_cheng
 * @date Oct 24, 2019 10:40:55 AM
 */
@Repository
public class HwTemperIncreaseRateDao extends BaseDao<HwTemperIncreaseRate, String> {

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