package com.nailart.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nailart.dataobj.TagDO;
import com.nailart.mapper.TagInfoMapper;
import com.nailart.service.TagInfoService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description 标签信息服务实现类
 * @Classname TagInfoServiceImpl
 * @Date 2025/7/14 23:25
 * @Created by 21616
 */
@Service
public class TagInfoServiceImpl extends ServiceImpl<TagInfoMapper, TagDO> implements TagInfoService {
    @Override
    public Integer saveTagInfo(TagDO tagDO) {
        if (tagDO == null) {
            return 0;
        }
        try {

            return this.saveTagInfo(tagDO);
        } catch (Exception e) {
            return 0;
        }
    }

    @Override
    public TagDO getTagInfoById(Long id) {
        if (id == null) {
            return null;
        }
        return this.getTagInfoById(id);
    }

    @Override
    public Integer deleteTagInfoById(Long id) {
        if (id == null) {
            return 0;
        }
        return this.deleteTagInfoById(id);
    }

    @Override
    public Integer updateTagInfoById(TagDO tagDO) {
        if (tagDO == null) {
            return 0;
        }
        return this.updateTagInfoById(tagDO);
    }

    @Override
    public List<TagDO> getAllTagInfo() {
        return this.list();
    }
}
