Subversion Repositories SmartDukaan

Rev

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

Rev 26636 Rev 26639
Line 483... Line 483...
483
	@RequestMapping(value = "/mobileappsettings", method = RequestMethod.POST)
483
	@RequestMapping(value = "/mobileappsettings", method = RequestMethod.POST)
484
	public ResponseEntity<?> mobileAppSettings(HttpServletRequest request, @RequestParam(name = "t") int timestamp,
484
	public ResponseEntity<?> mobileAppSettings(HttpServletRequest request, @RequestParam(name = "t") int timestamp,
485
			@RequestParam(name = "imeinumber") String imeinumber)
485
			@RequestParam(name = "imeinumber") String imeinumber)
486
			throws ProfitMandiBusinessException, ClientProtocolException, IOException {
486
			throws ProfitMandiBusinessException, ClientProtocolException, IOException {
487
		LocalDateTime settingsLastUpdated = LocalDateTime.ofEpochSecond(timestamp, 0, ZoneOffset.ofHoursMinutes(5, 30));
487
		LocalDateTime settingsLastUpdated = LocalDateTime.ofEpochSecond(timestamp, 0, ZoneOffset.ofHoursMinutes(5, 30));
488
		List<MobileAppSettingsWrapper> mobileAppSettings = mobileAppSettingsRepository
488
		List<MobileAppSetting> mobileAppSettings = mobileAppSettingsRepository
-
 
489
				.getSettingAftera(settingsLastUpdated);
-
 
490
		
489
				.getSettingAftera(settingsLastUpdated).stream().map(x -> new MobileAppSettingsWrapper(x))
491
		List<MobileAppSettingsWrapper> mobileSettingsWrappersList = mobileAppSettings.stream().map(x -> new MobileAppSettingsWrapper(x))
490
				.collect(Collectors.toList());
492
				.collect(Collectors.toList());
491
		SettingsWrapper wrapper = new SettingsWrapper(mobileAppSettings);
493
		SettingsWrapper wrapper = new SettingsWrapper(mobileSettingsWrappersList);
492
		/*
494
		/*
493
		 * final String uri = "http://192.168.158.89/mobileappsettings?t=" + timestamp +
495
		 * final String uri = "http://192.168.158.89/mobileappsettings?t=" + timestamp +
494
		 * "&imeinumber=" + imeinumber; final String BASIC_AUTH = "Basic " +
496
		 * "&imeinumber=" + imeinumber; final String BASIC_AUTH = "Basic " +
495
		 * Base64.getEncoder().encodeToString("dtr:dtr18Feb2015".getBytes());
497
		 * Base64.getEncoder().encodeToString("dtr:dtr18Feb2015".getBytes());
496
		 * Map<String, String> headers = new HashMap<>(); Map<String, String> params =
498
		 * Map<String, String> headers = new HashMap<>(); Map<String, String> params =