package com.huatek.busi.dao;

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

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

/**
 * 避雷器微气象日统计 Dao
 *
 * @author anker_cheng
 * @date Jul 17, 2019 10:21:26 AM
 */
@Repository
public class SubstationMicBlqDao extends BaseDao<SubstationMicBlq, String> {

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