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.PensionServiceDocumentDao;
import io.hmit.modules.serviceOrder.dto.PensionServiceDocumentDTO;
import io.hmit.modules.serviceOrder.entity.PensionServiceDocumentEntity;
import io.hmit.modules.serviceOrder.service.PensionServiceDocumentService;
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 PensionServiceDocumentServiceImpl extends CrudServiceImpl<PensionServiceDocumentDao, PensionServiceDocumentEntity, PensionServiceDocumentDTO> implements PensionServiceDocumentService {

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

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

        return wrapper;
    }


}