package com.huatek.busi.dao;

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

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

/**
 * IEC104-业务点表配置表 Dao
 *
 * @author anker_cheng
 * @date 2019-8-1 16:15:22
 */
@Repository
public class  IecPointsConfDao extends BaseDao<IecPointsConf, String> {

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

