package com.huatek.busi.dao;

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

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

/**
 * Gis离线试验报告Dao
 * 
 * @author anker_cheng
 * @date 2019/08/24
 */
@Repository
public class GisOfflineExperimentReportDao extends BaseDao<GisOfflineExperimentReport, String> {

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