| | |
| | | package com.dy.pipIrrApp.captcha; |
| | | |
| | | import com.dy.common.multiDataSource.DataSourceContext; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.pipIrrApp.captcha.dto.CaptchaDomain; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaCaptcha; |
| | | import jakarta.servlet.ServletOutputStream; |
| | |
| | | */ |
| | | @GetMapping("/get") |
| | | @ResponseBody |
| | | public CaptchaDomain getCaptcha(HttpServletRequest request, @RequestParam(value = "type", required = false, defaultValue = "char") String type) { |
| | | public BaseResponse<CaptchaDomain> getCaptcha(HttpServletRequest request, @RequestParam(value = "type", required = false, defaultValue = "char") String type) { |
| | | // 配置数据源 |
| | | HttpServletRequest httpRequest = (HttpServletRequest) request; |
| | | String wxDataSourceName = httpRequest.getHeader("tag"); |
| | |
| | | captchaDomain.setText(null); |
| | | captchaDomain.setCode(null); |
| | | // 返回前端信息 |
| | | return captchaDomain; |
| | | return BaseResponseUtils.buildSuccess(captchaDomain); |
| | | } else { |
| | | return null; |
| | | } |