package com.ruoyi.study.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.constant.Constants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.exception.GlobalException;
import com.ruoyi.common.core.web.page.PageInfo;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.goods.api.feignClient.GoodsClient;
import com.ruoyi.goods.api.model.TGoodsVO;
import com.ruoyi.management.api.feignClient.ManagementClient;
import com.ruoyi.management.api.model.TSysSet;
import com.ruoyi.study.domain.*;
import com.ruoyi.study.dto.*;
import com.ruoyi.study.service.*;
import com.ruoyi.study.vo.*;
import com.ruoyi.system.api.model.LoginUserParent;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import kotlin.random.Random;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
/**
*
* 学习类型前端控制器
*
*
* @author 无关风月
* @since 2024-04-26
*/
@RestController
@RequestMapping("/base/study")
@Api(tags = "学习端-主接口")
public class TStudyController {
@Autowired
private ITStudyAnswerService studyAnswerService;
@Autowired
private ITStudyInductionService studyInductionService;
@Autowired
private ITStudyLookService studyLookService;
@Autowired
private ITStudyListenService studyListenService;
@Autowired
private ITStudyPairService studyPairService;
@Autowired
private ITGameService gameService;
@Autowired
private ITStoryListenService storyListenService;
@Autowired
private ITSubjectService subjectService;
@Autowired
private ITStoryService storyService;
@Autowired
private ITStudyService studyService;
@Resource
private GoodsClient goodsClient;
@Resource
private ITGameRecordService gameRecordService;
@Resource
private ITUserStudyService userStudyService;
@Resource
private ITIntegralRecordService integralRecordService;
@Resource
private ITUserService userService;
@Resource
private TokenService tokenService;
@Resource
private ITSubjectRecordService subjectRecordService;
@Resource
private IUserStudyRecordService studyRecordService;
@Resource
private ManagementClient managementClient;
@Resource
private ITUserPresentRecordService userPresentRecordService;
@PostMapping("/testAddData")
@ApiOperation(value = "测试分片", tags = {"测试分片"})
public R