package com.hxhq.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hxhq.business.domain.StudyMethod;
import com.hxhq.business.domain.StudyMethodRead;
import com.hxhq.business.form.study.StudyMethodForm;
import com.hxhq.business.mapper.StudyMethodMapper;
import com.hxhq.business.mapper.StudyMethodReadMapper;
import com.hxhq.business.service.IStudyMethodReadService;
import com.hxhq.business.service.IStudyMethodService;
import com.hxhq.common.core.domain.MpBaseEntity;
import com.hxhq.system.api.domain.SysUser;
import com.hxhq.system.service.ISysUserService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 试验-试验方法已读Service业务层处理
 *
 * @author hxhq
 * @date 2025-12-29
 */
@Service
public class StudyMethodReadServiceImpl extends ServiceImpl<StudyMethodReadMapper, StudyMethodRead> implements IStudyMethodReadService
{


    @Override
    public List<StudyMethodRead> queryList(Long studyMethodId) {
        LambdaQueryWrapper<StudyMethodRead> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(StudyMethodRead::getStudyMethodId, studyMethodId);
        queryWrapper.orderByDesc(MpBaseEntity::getId);
        return this.list(queryWrapper);
    }
}
