疯狂的狮子li
2021-10-27 695cb6d76b838b1e4cb161bae335faa948dca12a
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java
@@ -13,6 +13,9 @@
import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.framework.config.properties.CaptchaProperties;
import com.ruoyi.system.service.ISysConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -24,22 +27,22 @@
/**
 * 验证码操作处理
 *
 * @author ruoyi
 * @author Lion Li
 */
@Api(value = "验证码操作处理", tags = {"验证码管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
public class CaptchaController {
   @Autowired
   private CaptchaProperties captchaProperties;
   @Autowired
   private ISysConfigService configService;
    private final CaptchaProperties captchaProperties;
    private final ISysConfigService configService;
   /**
    * 生成验证码
    */
    @ApiOperation("生成验证码")
   @GetMapping("/captchaImage")
   public AjaxResult getCode() {
    public AjaxResult<Map<String, Object>> getCode() {
      Map<String, Object> ajax = new HashMap<>();
      boolean captchaOnOff = configService.selectCaptchaOnOff();
      ajax.put("captchaOnOff", captchaOnOff);