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 dm
|
* @since 2025/03/31 16:44
|
*/
|
@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());
|
}
|
}
|