Commit eef76d3f1be1f84ae6d0147e3d8420b520c5e118

Authored by 张志伟
1 parent 8caeaad4

feature(*): 修复bug

- 修复bug
fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/param/CustomerQueryReq.java
... ... @@ -167,7 +167,7 @@ public class CustomerQueryReq implements Serializable {
167 167 this.excludeCustomerIds = excludeCustomerIds;
168 168 }
169 169  
170   - public boolean getIncludePublic() {
  170 + public Boolean getIncludePublic() {
171 171 return includePublic;
172 172 }
173 173  
... ...
fw-valhalla-server/src/test/java/cn/fw/valhalla/Demo.java 0 → 100644
  1 +package cn.fw.valhalla;
  2 +
  3 +import cn.fw.valhalla.sdk.param.CustomerQueryReq;
  4 +import com.alibaba.fastjson.JSONObject;
  5 +import com.fasterxml.jackson.core.JsonProcessingException;
  6 +import com.fasterxml.jackson.databind.ObjectMapper;
  7 +import org.junit.jupiter.api.Test;
  8 +
  9 +/**
  10 + * @author : kurisu
  11 + * @version :
  12 + * @className : Demo
  13 + * @description :
  14 + * @date : 2023-05-04 09:13
  15 + */
  16 +public class Demo {
  17 +
  18 + @Test
  19 + public void phoneTest() throws JsonProcessingException {
  20 + CustomerQueryReq req = new CustomerQueryReq();
  21 + ObjectMapper objectMapper = new ObjectMapper();
  22 + String jsonString = JSONObject.toJSONString(req);
  23 + System.out.println(jsonString);
  24 +
  25 + jsonString = objectMapper.writeValueAsString(req);
  26 + System.out.println(jsonString);
  27 + }
  28 +}
... ...
fw-valhalla-server/src/test/java/cn/fw/valhalla/ValhallaAppTests.java
... ... @@ -11,7 +11,6 @@ import org.springframework.test.web.servlet.MockMvc;
11 11 import org.springframework.test.web.servlet.result.MockMvcResultHandlers;
12 12  
13 13 import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
14   -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
15 14 import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
16 15  
17 16 @RunWith(SpringRunner.class)
... ... @@ -29,16 +28,16 @@ class ValhallaAppTests {
29 28 @Test
30 29 public void exampleTest() throws Exception {
31 30 this.mvc.perform(
32   - get("/app/accident/demo")
33   - .header("Authorization", "4B70342B7CC9709C7D76A982217570ADB407D23ECDC0763C4AD3F5D069B8DEB33C5FCE9E493D9F6DE05D532E7A8B5DD1")
34   - .param("val", "12345"))
  31 + get("/app/accident/demo")
  32 + .header("Authorization", "4B70342B7CC9709C7D76A982217570ADB407D23ECDC0763C4AD3F5D069B8DEB33C5FCE9E493D9F6DE05D532E7A8B5DD1")
  33 + .param("val", "12345"))
35 34 .andExpect(status().isOk())
36 35 .andDo(MockMvcResultHandlers.print());
37 36 }
38 37  
39 38 @Test
40 39 public void phoneTest() {
41   - String phone ="+8619142820251";
  40 + String phone = "+8619142820251";
42 41 System.out.println(ValidationUtils.checkMobile(phone));
43 42 }
44 43 }
... ...