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.CniyvArticleDao;
import io.bdty.modules.cniyv.dto.CniyvArticleDTO;
import io.bdty.modules.cniyv.entity.CniyvArticleEntity;
import io.bdty.modules.cniyv.service.CniyvArticleService;
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 CniyvArticleServiceImpl extends CrudServiceImpl<CniyvArticleDao, CniyvArticleEntity, CniyvArticleDTO> implements CniyvArticleService {

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

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

        return wrapper;
    }


}