package com.huatek.busi.dao;

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

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

/**
 * 温度 Dao
 * @author buck_guo
 * @date 2019/11/06
 */
@Repository
public class TemperIncreaseRateDao extends BaseDao<TemperIncreaseRate, String> {

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