ActivityDetectionController.java 1.69 KB
package com.subsidy.controller;


import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.common.interceptor.TimeRequired;
import com.subsidy.dto.detection.GetCheckHistoryDTO;
import com.subsidy.dto.detection.VerifyDTO;
import com.subsidy.service.ActivityDetectionService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;

import javax.servlet.http.HttpServletRequest;

/**
 * <p>
 * 活跃度检测表 前端控制器
 * </p>
 *
 * @author DengMin
 * @since 2022-07-13
 */
@RestController
@Api(tags = "活跃度检测表")
@RequestMapping("/activityDetection")
public class ActivityDetectionController {

    @Autowired
    private ActivityDetectionService activityDetectionService;

    @PostMapping("verify")
    @ApiOperation("验证滑块  ticket randStr  memberId classId")
    @TimeRequired
    public ResponseVO verify(@RequestBody VerifyDTO verifyDTO, HttpServletRequest request){
        return ResponseData.generateCreatedResponse(0,activityDetectionService.verify(verifyDTO,request));
    }

    @PostMapping("getCheckHistory")
    @ApiOperation("获取某个人某个课程的活跃度验证详情  memberId  classId")
    public ResponseVO getCheckHistory(@RequestBody GetCheckHistoryDTO getCheckHistoryDTO){
        return ResponseData.generateCreatedResponse(0,activityDetectionService.getCheckHistory(getCheckHistoryDTO));
    }

}