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

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seer.teach.iot.common.resp.GuideResp;
import com.seer.teach.iot.convert.GuideConvert;
import com.seer.teach.iot.module.entity.GuideEntity;
import com.seer.teach.iot.module.mapper.GuideMapper;
import com.seer.teach.iot.service.GuideService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Wang
 * @since 2025-08-05 10:31:07
 */
@Service
public class GuideServiceImpl extends ServiceImpl<GuideMapper, GuideEntity> implements GuideService {

    @Override
    public List<GuideResp> getList() {
        List<GuideEntity> list = list(new LambdaQueryWrapper<GuideEntity>()
                .orderByAsc(GuideEntity::getSort));
        return GuideConvert.INSTANCE.toGuideRespList(list);
    }
}
