Selaa lähdekoodia

租赁费用增加year_no,month_no

weijianghai 2 kuukautta sitten
vanhempi
commit
19751841ed

+ 2 - 2
src/main/java/com/nokia/financeapi/config/web/RequestLogHandlerInterceptor.java

@@ -194,9 +194,9 @@ public class RequestLogHandlerInterceptor implements HandlerInterceptor, Request
                 log.info("请求体参数: {}", bodyStr);
                 RequestLogPo requestLogPo = REQUEST_LOG_PO_THREAD_LOCAL.get();
                 if (requestLogPo != null) {
-                    Map<String, String> requestParameters = objectMapper.readValue(requestLogPo.getRequestParameters(),
+                    Map<String, Object> requestParameters = objectMapper.readValue(requestLogPo.getRequestParameters(),
                             TypeFactory.defaultInstance().constructMapType(Map.class, String.class, String.class));
-                    requestParameters.put("request_body", bodyStr);
+                    requestParameters.put("request_body", body);
                     requestLogPo.setRequestParameters(objectMapper.writeValueAsString(requestParameters));
                 }
             }

+ 2 - 0
src/test/java/com/nokia/financeapi/shouqi/CarZuLinTests.java

@@ -219,6 +219,8 @@ class CarZuLinTests {
                     localDate = localDate.plusMonths(1);
                     Integer nextMonthInteger = Integer.valueOf(localDate.format(DateTimeFormatter.ofPattern("yyyyMM")));
                     t.put("year_month", nextMonthInteger.toString());
+                    t.put("year_no", localDate.format(DateTimeFormatter.ofPattern("yyyy")));
+                    t.put("month_no", localDate.format(DateTimeFormatter.ofPattern("MM")));
                     t.put("che_pai_hao", tiHuanNianYueInteger != null
                             && nextMonthInteger.compareTo(tiHuanNianYueInteger) >= 0 ? chePaiHaoTiHuan : chePaiHaoHeTong);
                     resultList.add(t);