package io.renren.modules.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.demo.dao.SubjectSelectionDao;
import io.renren.modules.demo.dto.SubjectSelectionDTO;
import io.renren.modules.demo.entity.SubjectSelectionEntity;
import io.renren.modules.demo.service.SubjectSelectionService;
import cn.hutool.core.util.StrUtil;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 选题表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2025-03-06
 */
@Service
public class SubjectSelectionServiceImpl extends CrudServiceImpl<SubjectSelectionDao, SubjectSelectionEntity, SubjectSelectionDTO> implements SubjectSelectionService {

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

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

        return wrapper;
    }


}