Subversion Repositories SmartDukaan

Rev

Rev 27462 | Rev 27466 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27462 Rev 27464
Line 1125... Line 1125...
1125
 
1125
 
1126
				Request request1 = new Request.Builder().url("https://v3.api.hypertrack.com/geofences").post(body)
1126
				Request request1 = new Request.Builder().url("https://v3.api.hypertrack.com/geofences").post(body)
1127
						.addHeader("Authorization", authString).build();
1127
						.addHeader("Authorization", authString).build();
1128
 
1128
 
1129
				Response response = client.newCall(request1).execute();
1129
				Response response = client.newCall(request1).execute();
-
 
1130
				LOGGER.info("response" + response.body().string());
1130
 
1131
 
1131
				String geofenceId = null;
-
 
1132
				JSONArray ja = new JSONArray(response.body().string());
1132
				JSONArray ja = new JSONArray(response.body().string());
1133
				for (int i = 0; i < ja.length(); i++) {
1133
				for (int i = 0; i < ja.length(); i++) {
1134
					JSONObject c = ja.getJSONObject(i);
1134
					JSONObject c = ja.getJSONObject(i);
1135
					geofenceId = c.getString("geofence_id");
1135
					String geofenceId = c.getString("geofence_id");
1136
 
-
 
-
 
1136
					LOGGER.info("geofenceId" + geofenceId);
1137
					FofoStoreGeofence fsg = new FofoStoreGeofence();
1137
					FofoStoreGeofence fsg = new FofoStoreGeofence();
1138
					fsg.setFofoId(customRetailer.getPartnerId());
1138
					fsg.setFofoId(customRetailer.getPartnerId());
1139
					fsg.setGeofenceId(geofenceId);
1139
					fsg.setGeofenceId(geofenceId);
1140
					fofoStoreGeofenceRepository.persist(fsg);
1140
					fofoStoreGeofenceRepository.persist(fsg);
1141
 
1141
 
1142
				}
1142
				}
1143
 
1143
 
1144
				LOGGER.info("response" + response.body().string());
-
 
1145
			}
1144
			}
1146
 
1145
 
1147
		}
1146
		}
1148
 
1147
 
1149
	}
1148
	}