package com.huatek.busi.dao;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;

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

/**
 * GIS投运验收结论 Dao
 *
 * @author anker_cheng
 * @date Jul 4, 2019 2:00:00 PM
 */
@Repository
public class  BusiOfflineGisCheckDao extends BaseDao<BusiOfflineGisCheck, String> {

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

