package com.ruoyi.cgb.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.cgb.mapper.CgbScoreSessionMapper;
import com.ruoyi.cgb.domain.CgbScoreSession;
import com.ruoyi.cgb.service.ICgbScoreSessionService;

/**
 * 评分场次Service业务层处理
 *
 * @author ruoyi
 * @date 2023-08-16
 */
@Service
public class CgbScoreSessionServiceImpl extends ServiceImpl<CgbScoreSessionMapper, CgbScoreSession> implements ICgbScoreSessionService {

	/**
	 * 查询评分场次列表
	 *
	 * @param cgbScoreSession 评分场次
	 * @return 评分场次集合
	 * @date 2023-08-16
	 */
	@Override
	public List<CgbScoreSession> queryList(CgbScoreSession cgbScoreSession) {
		QueryWrapper<CgbScoreSession> queryWrapper = Wrappers.query();
		if (StringUtils.isNotEmpty(cgbScoreSession.getStatus())) {
			queryWrapper.eq("status", cgbScoreSession.getStatus());
		}
		queryWrapper.orderByDesc("id");
		return this.list(queryWrapper);
	}
}
