package com.aircraft.modules.article.service.impl;

import com.aircraft.modules.article.domain.CpLabel;
import com.aircraft.modules.article.domain.dto.CpArticleVo;
import com.aircraft.modules.article.domain.dto.CpLabelVo;
import com.aircraft.modules.article.mapper.CpLabelMapper;
import com.aircraft.modules.article.service.CpLabelService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 标签表 服务实现类
 * </p>
 *
 * @author cli
 * @since 2025-07-10
 */
@Service
public class CpLabelServiceImpl extends ServiceImpl<CpLabelMapper, CpLabel> implements CpLabelService {
    @Autowired
    private CpLabelMapper cpLabelMapper;

    @Override
    public void updateDelFlagById(Integer id, Integer delFlag) {
        baseMapper.updateDelFlagById(id, delFlag);
    }

    @Override
    public IPage<CpLabelVo> findByPage(Page<CpLabelVo> page, String name) {
        IPage<CpLabelVo> cpLabelVoIPage = cpLabelMapper.selectVoPage(page, name);
        return cpLabelVoIPage;
    }
}
