k94314517
2024-05-22 c8bc6fdbdc37f551388b71372c35d4f42f58e571
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package com.doumee.cloud.web;
 
import com.doumee.cloud.web.ApiController;
import com.doumee.config.annotation.LoginNoRequired;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.utils.Constants;
import com.doumee.core.wx.wxPlat.WxPlatNotice;
import com.doumee.dao.web.reqeust.FinishAnswerDTO;
import com.doumee.dao.web.response.ProblemsVO;
import com.doumee.service.business.ProblemLogService;
import com.doumee.service.business.ProblemsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/12/8 8:54
 */
 
@Api(tags = "【公众号】题目业务")
@Trace(exclude = true)
@RestController
@LoginNoRequired
@RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/web/problem")
@Slf4j
public class ProblemWebController extends ApiController {
 
    @Autowired
    private ProblemsService problemsService;
 
    @Autowired
    private ProblemLogService problemLogService;
 
    @Autowired
    private WxPlatNotice wxPlatNotice;
 
 
    @ApiOperation(value = "获取题目数据", notes = "H5")
    @GetMapping("/getProblemsVO")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "useType", value = "使用场景 2劳务人员 1普通访客", required = true)
    })
    public ApiResponse<List<ProblemsVO>> getProblemsVO(@RequestParam Integer useType) {
        return ApiResponse.success("查询成功",problemsService.getProblemsVO(useType));
    }
 
 
    @ApiOperation(value = "保存答题记录", notes = "H5")
    @PostMapping("/finishAnswer")
    public ApiResponse<Integer> finishAnswer(@RequestBody FinishAnswerDTO finishAnswerDTO) {
        return ApiResponse.success("查询成功",problemLogService.finishAnswer(finishAnswerDTO));
    }
 
 
 
 
}