Commit ad815608 by wang_jiaxing

统一访问接口json判断

parent 3668f4d6
......@@ -22,7 +22,7 @@ public class TbStAppDzblController {
@PostMapping("/saveNewDzbl")
@LogOper(czxxLbdm = "02", yymcJyqk = "0710", czxxJyqk = "新增电子笔录")
public R saveNewDzbl(TbStAppDzbl dzbl) {
public R saveNewDzbl(@RequestBody TbStAppDzbl dzbl) {
try {
String xxzjbh = tbStAppDzblService.saveNewDzbl(dzbl);
return R.ok().data("xxzjbh", xxzjbh);
......
......@@ -19,9 +19,7 @@ import java.io.InputStreamReader;
import java.net.InetAddress;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.*;
/**
* TODO
......@@ -37,6 +35,8 @@ public class ForwardController {
@RequestMapping("/method")
public R method(HttpServletRequest request, @RequestParam(required = false) String sjdata) {
Set<String> jsonUrlSet = new HashSet<>();
jsonUrlSet.add("/dzbl/saveNewDzbl");
String url = request.getHeader("url");
if (StringUtils.isEmpty(url)) {
return R.error("url不能为空");
......@@ -86,7 +86,7 @@ public class ForwardController {
headers.put("userIp", ip);
if ("post".equalsIgnoreCase(type)) {
String contentType = request.getContentType();
if ("application/json".equals(contentType)) {
if ("application/json".equals(contentType) || jsonUrlSet.contains(url)) {
try {
// BufferedReader streamReader = new BufferedReader(new InputStreamReader(request.getInputStream(), StandardCharsets.UTF_8));
// StringBuilder sb = new StringBuilder();
......
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