package com.pjilisense.flxai.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.pjilisense.flxai.base.service.impl.CrudServiceImpl;
import com.pjilisense.flxai.dao.FileChunksDao;
import com.pjilisense.flxai.dto.FileChunksDTO;
import com.pjilisense.flxai.entity.FileChunksEntity;
import com.pjilisense.flxai.service.FileChunksService;
import cn.hutool.core.util.StrUtil;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * ${comments}
 *
 * @author liushujing liushujing@philisense.com
 * @since 1.0.0 2025-02-10
 */
@Service
public class FileChunksServiceImpl extends CrudServiceImpl<FileChunksDao, FileChunksEntity, FileChunksDTO> implements FileChunksService {

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

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

        return wrapper;
    }


}