package com.huatek.busi.dao;

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

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

/**
 * 测温柜-全部测温点汇总表 Dao
 *
 * @author anker_cheng
 * @date Jul 1, 2019 4:04:57 PM
 */
@Repository
public class RptTermperRecordDao extends BaseDao<RptTermperRecord, String> {

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