package com.zksy.web.controller.common;

import com.zksy.common.core.domain.AjaxResult;
import com.zksy.system.basicData.domain.Captcha;
import com.zksy.system.basicData.service.CaptchaService;
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;

/**
 * @author Administrator
 * @version 1.0
 * @project credit-rating
 * @description 滑块验证码
 * @date 2024/12/2 14:35:08
 */
@RestController
@RequestMapping("/captchaSlider")
public class CaptchaSliderController {
    @Autowired
    private CaptchaService captchaService;

    @ApiOperation(value = "生成验证码拼图")
    @PostMapping("getCaptcha")
    public AjaxResult getCaptcha(@RequestBody(required = false) Captcha captcha) {
        return AjaxResult.success(captchaService.getCaptcha(captcha));
    }
}
