package com.huatek.busi.dao;

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

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

/**
 * 容性设备-绝缘监测-阈值：022001 Dao
 *
 * @author anker_cheng
 * @date Aug 5, 2019 5:29:06 PM
 */
@Repository
public class  CapacitanceEquipmentInsulationMonitorThresholdDao extends BaseDao<CapacitanceEquipmentInsulationMonitorThreshold, String> {

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

