Subversion Repositories SmartDukaan

Rev

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

Rev 22485 Rev 22498
Line 182... Line 182...
182
		}
182
		}
183
		String firstChar = "?";
183
		String firstChar = "?";
184
		if (url.contains("?")) {
184
		if (url.contains("?")) {
185
			firstChar = "&";
185
			firstChar = "&";
186
		}
186
		}
187
		String redirectUrl = url + firstChar + sourceMap.get("affid_param") + "=" + sourceMap.get("affiliate_id");
187
		url = url + firstChar + sourceMap.get("affid_param") + "=" + sourceMap.get("affiliate_id");
188
		if (!StringUtils.isEmpty(sourceMap.get("sub_tag_param"))) {
188
		if (!StringUtils.isEmpty(sourceMap.get("sub_tag_param"))) {
189
			url += "&" + sourceMap.get("sub_tag_param") + "=" + tag;
189
			url += "&" + sourceMap.get("sub_tag_param") + "=" + tag;
190
		}
190
		}
191
		String base64Url = new String(Base64.encodeBase64(url.getBytes()));
191
		String base64Url = new String(Base64.encodeBase64(url.getBytes()));
192
		switch (sourceId) {
192
		switch (sourceId) {
Line 217... Line 217...
217
		click.setStoreProductId(storeProductId);
217
		click.setStoreProductId(storeProductId);
218
		clickRepository.persist(click);
218
		clickRepository.persist(click);
219
		response.setMessage("");
219
		response.setMessage("");
220
		response.setShowMessage(false);
220
		response.setShowMessage(false);
221
		response.setType("redirect");
221
		response.setType("redirect");
222
		response.setUrl(redirectUrl);
222
		response.setUrl(url);
223
		return responseSender.ok(response);
223
		return responseSender.ok(response);
224
	}
224
	}
225
}
225
}