package com.huatek.busi.dao;

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

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

/**
 * 变压器标牌信息 Dao
 * 
 * @author walker_wang
 *
 */
@Repository
public class BusiOfflineTransformerBrandDao extends BaseDao<BusiOfflineTransformerBrand, String> {

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