111
k94314517
2023-11-08 2bb847e3b8bdc2692d88ad9df0d4ad54a3ccd890
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
package com.doumee.api.common;
 
import com.doumee.api.BaseController;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.service.common.CaptchaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * @author Eva.
     * @author Eva.Caesar Liu
     * @date 2023/02/14 11:14
        */
    @Api(tags = "图片验证码接口")
    @Trace(exclude = true)
    @RestController
    @RequestMapping("/common")
    public class CaptchaController extends BaseController {
 
        @Autowired
        private CaptchaService captchaService;
 
 
    @ApiOperation("获取图片验证码")
    @GetMapping("/captcha")
    public ApiResponse<CaptchaService.Captcha> getCaptcha() {
        return ApiResponse.success(captchaService.genCaptcha());
    }
}