package com.huatek.busi.dao;

import com.huatek.busi.entity.BusiOfflineGeneratorBrand;
import com.huatek.torch.sql.dao.impl.BaseDao;
import com.huatek.torch.util.uuid.Uuid;
import org.springframework.stereotype.Repository;
import org.springframework.util.StringUtils;
/**
 * 大点击标牌信息表 Dao
 *
 * @author walker_wang
 * @date Jul 4, 2019 1:50:06 PM
 */
@Repository
public class BusiOfflineGeneratorDao extends BaseDao<BusiOfflineGeneratorBrand, String> {

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


}
