Commit e1b4239e by 吴迪

【新增】首页接口提交

parent c5764b25
...@@ -4,6 +4,8 @@ import io.office.common.utils.R; ...@@ -4,6 +4,8 @@ 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.vo.request.DomesticCodeDetailRequest; import io.office.modules.manage.vo.request.DomesticCodeDetailRequest;
import io.office.modules.manage.vo.request.ProductionVo; import io.office.modules.manage.vo.request.ProductionVo;
import io.office.modules.sys.service.SysCaptchaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
...@@ -23,15 +25,19 @@ import javax.servlet.http.HttpServletRequest; ...@@ -23,15 +25,19 @@ import javax.servlet.http.HttpServletRequest;
@RequestMapping("production/api") @RequestMapping("production/api")
public class ProductionController { public class ProductionController {
@Autowired
SysCaptchaService sysCaptchaService;
@Login @Login
@RequestMapping("/search") @PostMapping("/search")
public String search(@RequestBody ProductionVo productionVo) { public R search(@RequestBody ProductionVo productionVo) {
boolean captcha = sysCaptchaService.validate(productionVo.getUuid(), productionVo.getCaptcha());
if(!captcha){
return R.error("验证码不正确");
}
return R.ok();
return "redirect:http://search.anccnet.com/searchResult2.aspx?keyword="+productionVo.getKeyword();
} }
......
...@@ -49,6 +49,10 @@ public class OAuth2Filter extends AuthenticatingFilter { ...@@ -49,6 +49,10 @@ public class OAuth2Filter extends AuthenticatingFilter {
return true; return true;
} }
if(((HttpServletRequest) request).getRequestURI().indexOf("uploadFileResource")>-1) {
return true;
}
return false; return false;
} }
......
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