Merge branch 'develop' of https://github.com/Kitzanos/GEPAFIN-BE into develop

This commit is contained in:
Piyush
2025-05-09 18:32:06 +05:30

View File

@@ -294,11 +294,14 @@ public class Utils {
return pattern.matcher(email).matches(); return pattern.matcher(email).matches();
} }
// public static String randomKey(Integer range) {
// String data = String.valueOf(System.currentTimeMillis());
// return data.substring(data.length() - range);
//
// }
public static String randomKey(Integer range) { public static String randomKey(Integer range) {
String data = String.valueOf(System.currentTimeMillis()); return UUID.randomUUID().toString().replace("-", "").substring(0, range);
return data.substring(data.length() - range);
} }
public static String convertObjectToJsonString(Object object) { public static String convertObjectToJsonString(Object object) {
try { try {
// Check if the object is a string // Check if the object is a string