package com.tuoheng.admin.service.questiontype.query;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.tuoheng.admin.entity.domain.QuestionType;
import com.tuoheng.admin.enums.MarkEnum;
import com.tuoheng.admin.mapper.QuestionTypeMapper;
import com.tuoheng.common.core.utils.JsonResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 查询问题类型列表业务层处理
 *
 * @author wanjing
 * @team tuoheng
 * @date 2022-12-06
 */
@Slf4j
@Service
public class QueryQuestionTypeListService {

    @Autowired
    private QuestionTypeMapper questionTypeMapper;

    public JsonResult getist() {
//        log.info("进入查询问题类型列表业务");
        List<QuestionType> questionTypeList = questionTypeMapper.selectList(new LambdaQueryWrapper<QuestionType>()
                .eq(QuestionType::getMark, MarkEnum.VALID.getCode()));
        return JsonResult.success(questionTypeList);
    }

}
