 package com.huatek.busi.dao;

 import com.huatek.busi.entity.InfraredThreshold;
 import com.huatek.busi.entity.WindingThreshold;
 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;

 /**
  * 绕组测温阈值
  * @author buck_guo
  * @date 2019/08/09
  */
 @Repository
 public class WindingThresholdDao extends BaseDao<WindingThreshold, String>{

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