package com.fs.course.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fs.course.domain.FsUserCourseTrainingCamp;
import com.fs.course.vo.FsUserCourseTrainingCampVO;
import com.fs.his.vo.OptionsVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * 会员训练营Mapper接口
 *
 * @author fs
 * @date 2025-04-15
 */
public interface FsUserCourseTrainingCampMapper extends BaseMapper<FsUserCourseTrainingCamp>
{

    /**
     * 查询训练营列表
     * @param params    参数
     * @return  list
     */
    List<FsUserCourseTrainingCampVO> selectFsUserCourseTrainingCampVOListByMap(@Param("params") Map<String, Object> params);

    /**
     * 获取序号
     * @return 序号
     */
    @Select("select ifnull(max(order_number), 0) + 1 from fs_user_course_training_camp")
    Long getOrderNumber();

    /**
     * 查询训练营选项列表
     * @param params    参数
     * @return  list
     */
    List<OptionsVO> selectCampListByMap(@Param("params") Map<String, Object> params);
}
