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

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seer.teach.teacher.module.entity.TreasuryBoxArticleAudiosEntity;
import com.seer.teach.teacher.module.mapper.TreasuryBoxArticleAudiosMapper;
import com.seer.teach.teacher.service.TreasuryBoxArticleAudiosService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Wang
 * @since 2025-08-07 16:23:39
 */
@Service
public class TreasuryBoxArticleAudiosServiceImpl extends ServiceImpl<TreasuryBoxArticleAudiosMapper, TreasuryBoxArticleAudiosEntity> implements TreasuryBoxArticleAudiosService {

    @Override
    public List<TreasuryBoxArticleAudiosEntity> getTreasuryBoxArticleAudios(Integer articleId) {
        return list(new LambdaQueryWrapper<TreasuryBoxArticleAudiosEntity>()
                .eq(TreasuryBoxArticleAudiosEntity::getArticleId, articleId)
                .orderByAsc(TreasuryBoxArticleAudiosEntity::getSort));
    }
}
