package com.huatek.busi.dao;

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

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

/**
 * GIS微气象日统计 Dao
 *
 * @author anker_cheng
 * @date Jul 17, 2019 10:21:26 AM
 */
@Repository
public class SubstationMicGisDao extends BaseDao<SubstationMicGis, String> {

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