Commit 385c7acd by 吴迪

【修改】政府采购

parent 039552c0
package io.office.modules.manage.controller; package io.office.modules.manage.controller;
import java.util.Arrays; import io.office.common.utils.PageUtils;
import java.util.Map; import io.office.common.utils.R;
import io.office.modules.app.annotation.Login; import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.LogLoginEntity;
import io.office.modules.manage.service.LogLoginService;
import io.office.modules.manage.vo.request.DomesticCodeVo; import io.office.modules.manage.vo.request.DomesticCodeVo;
import io.office.modules.sys.service.SysCaptchaService; import io.office.modules.sys.service.SysCaptchaService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import io.office.modules.manage.entity.LogLoginEntity;
import io.office.modules.manage.service.LogLoginService;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import java.util.Arrays;
import java.util.Map;
/** /**
* ${comments} * ${comments}
* *
* @author wudi * @author wudi
* @email * @email
* @date 2021-12-08 17:47:13 * @date 2021-12-08 17:47:13
*/ */
@RestController @RestController
@RequestMapping("/loglogin") @RequestMapping("/loglogin")
public class LogLoginController { public class LogLoginController {
@Autowired @Autowired
private LogLoginService logLoginService; private LogLoginService logLoginService;
...@@ -112,4 +108,16 @@ public class LogLoginController { ...@@ -112,4 +108,16 @@ public class LogLoginController {
return R.ok(); return R.ok();
} }
@RequestMapping("/loginByCode")
public R loginByCode(@RequestBody Map<String, Object> params, HttpServletRequest request, HttpServletResponse response){
DomesticCodeVo domesticCodeVo = new DomesticCodeVo(params.get("uuid").toString(),params.get("captcha").toString());
boolean captcha = sysCaptchaService.validate(domesticCodeVo.getUuid(), domesticCodeVo.getCaptcha());
if(!captcha){
return R.error("验证码不正确");
}
return R.ok();
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment