package io.hmit.modules.serviceOrder.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.serviceOrder.dao.NewsDocumentDao;
import io.hmit.modules.serviceOrder.dto.NewsDocumentDTO;
import io.hmit.modules.serviceOrder.entity.NewsDocumentEntity;
import io.hmit.modules.serviceOrder.service.NewsDocumentService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 服务及相关图片附件关联表
 *
 * @author zsh 408538940@qq.com
 * @since 1.0.0 2021-01-26
 */
@Service
public class NewsDocumentServiceImpl extends CrudServiceImpl<NewsDocumentDao, NewsDocumentEntity, NewsDocumentDTO> implements NewsDocumentService {

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

        QueryWrapper<NewsDocumentEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}