package com.huatek.busi.dao;

import com.huatek.busi.entity.ArresterInsulationMonitorThreshold;
import com.huatek.busi.entity.XParamMark;
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;

/**
 * 打标字段增长率，偏差率
 */
@Repository
public class XParamMarkDao extends BaseDao<XParamMark, String> {

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

