package io.bdty.modules.cniyv.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.bdty.common.service.impl.CrudServiceImpl;
import io.bdty.modules.cniyv.dao.CniyvArticleTypeDao;
import io.bdty.modules.cniyv.dto.CniyvArticleTypeDTO;
import io.bdty.modules.cniyv.entity.CniyvArticleTypeEntity;
import io.bdty.modules.cniyv.service.CniyvArticleTypeService;
import cn.hutool.core.util.StrUtil;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 文章分类
 *
 * @author zxj zxj
 * @since 1.0.0 2024-03-13
 */
@Service
public class CniyvArticleTypeServiceImpl extends CrudServiceImpl<CniyvArticleTypeDao, CniyvArticleTypeEntity, CniyvArticleTypeDTO> implements CniyvArticleTypeService {

    @Override
    public QueryWrapper<CniyvArticleTypeEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<CniyvArticleTypeEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StrUtil.isNotBlank(id), "id", id);

        return wrapper;
    }


}