 package com.huatek.busi.dao;

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

import com.huatek.busi.entity.CapacitanceEquipmentSummary;
import com.huatek.torch.sql.dao.impl.BaseDao;
import com.huatek.torch.util.uuid.Uuid;
/**
 * 避雷器-绝缘介质日统计表
 * @author buck_guo
 * @date 2019/07/16
 */
@Repository
public class CapacitanceEquipmentSummaryDao extends BaseDao<CapacitanceEquipmentSummary, String>{

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