|
@@ -37,7 +37,7 @@ public class HandleXiaomanData {
|
|
|
while ((line = br.readLine()) != null) {
|
|
|
jsonData += line;
|
|
|
}
|
|
|
- handleList(jsonData, new TypeReference<R<CustomerInfoVo>>() { });
|
|
|
+ handleDate(jsonData, new TypeReference<R<CustomerInfoVo>>() { });
|
|
|
// handleAllCustomer(jsonData);
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
@@ -46,7 +46,7 @@ public class HandleXiaomanData {
|
|
|
|
|
|
public static CustomerListApiVo handleAllCustomer(String res,Set<Long> allCustomer){
|
|
|
//反序列化对象
|
|
|
- CustomerListApiVo customerListApiVo = handleList(res, new TypeReference<R<CustomerListApiVo>>() { });
|
|
|
+ CustomerListApiVo customerListApiVo = handleDate(res, new TypeReference<R<CustomerListApiVo>>() { });
|
|
|
//判断列表是否为空
|
|
|
if (!customerListApiVo.getList().isEmpty()){
|
|
|
xiaomanCustomerService.handleSaveOrUpdate(customerListApiVo.getList(),allCustomer);
|
|
@@ -56,7 +56,7 @@ public class HandleXiaomanData {
|
|
|
|
|
|
|
|
|
|
|
|
- public static <T> T handleList(String res, TypeReference<R<T>> typeReference) {
|
|
|
+ public static <T> T handleDate(String res, TypeReference<R<T>> typeReference) {
|
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
|
try {
|
|
|
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|