package com.seer.teach.teacher.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seer.teach.teacher.module.entity.TeachTextAudiosEntity;
import com.seer.teach.teacher.module.mapper.TeachTextAudiosMapper;
import com.seer.teach.teacher.service.TeachTextAudiosService;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Wang
 * @since 2025-12-03 15:25:51
 */
@Service
public class TeachTextAudiosServiceImpl extends ServiceImpl<TeachTextAudiosMapper, TeachTextAudiosEntity> implements TeachTextAudiosService {

    @Override
    public List<TeachTextAudiosEntity> getTextAudiosByTextId(Integer id) {
        return this.lambdaQuery()
                .eq(TeachTextAudiosEntity::getTextId, id)
                .orderByAsc(TeachTextAudiosEntity::getSort)
                .list();
    }
}
