Commit 66c87bd6ecef24263b37224558cebd75015ea043
1 parent
cf971757
修复接口日志
Showing
2 changed files
with
12 additions
and
3 deletions
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/config/address/service/impl/AddressServiceImpl.java
@@ -23,7 +23,8 @@ public class AddressServiceImpl extends ServiceImpl<AddressMapper, Address> impl | @@ -23,7 +23,8 @@ public class AddressServiceImpl extends ServiceImpl<AddressMapper, Address> impl | ||
23 | public Address getAddressByUrl(String url, String warehouseCode) { | 23 | public Address getAddressByUrl(String url, String warehouseCode) { |
24 | LambdaQueryWrapper<Address> addressLambdaQueryWrapper = Wrappers.lambdaQuery(); | 24 | LambdaQueryWrapper<Address> addressLambdaQueryWrapper = Wrappers.lambdaQuery(); |
25 | addressLambdaQueryWrapper.eq(Address::getUrl, url) | 25 | addressLambdaQueryWrapper.eq(Address::getUrl, url) |
26 | - .eq(Address::getWarehouseCode, warehouseCode); | 26 | + .eq(Address::getWarehouseCode, warehouseCode) |
27 | + .last(" limit 1"); | ||
27 | Address address = getOne(addressLambdaQueryWrapper); | 28 | Address address = getOne(addressLambdaQueryWrapper); |
28 | return address; | 29 | return address; |
29 | } | 30 | } |
jeecg-boot-master/jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/wms/framework/aspectj/ApiLogAspect.java
@@ -471,11 +471,19 @@ public class ApiLogAspect | @@ -471,11 +471,19 @@ public class ApiLogAspect | ||
471 | for (int i = 0; i < m.getParameterNames().length; i++) { | 471 | for (int i = 0; i < m.getParameterNames().length; i++) { |
472 | String name = m.getParameterNames()[i]; | 472 | String name = m.getParameterNames()[i]; |
473 | // Class type = m.getParameterTypes()[i]; | 473 | // Class type = m.getParameterTypes()[i]; |
474 | - map.put(name, args[i]); | 474 | + if(args[i] instanceof HttpServletRequest){ |
475 | + continue; | ||
476 | + } else { | ||
477 | + map.put(name, args[i]); | ||
478 | + } | ||
475 | } | 479 | } |
476 | 480 | ||
477 | if(!map.isEmpty()) { | 481 | if(!map.isEmpty()) { |
478 | - log.setRequestBody(JSONObject.toJSONString(map)); | 482 | + if(map.keySet().size() == 1) { |
483 | + log.setRequestBody(JSONObject.toJSONString(map.values().iterator().next())); | ||
484 | + }else{ | ||
485 | + log.setRequestBody(JSONObject.toJSONString(map)); | ||
486 | + } | ||
479 | } | 487 | } |
480 | }catch (Exception e){ | 488 | }catch (Exception e){ |
481 | e.printStackTrace(); | 489 | e.printStackTrace(); |