added userId in the faq table

This commit is contained in:
harish
2024-08-22 12:32:27 +05:30
parent ce27dcd4a9
commit f8f58689c4
9 changed files with 136 additions and 19 deletions

View File

@@ -3,9 +3,12 @@ package net.gepafin.tendermanagement.util;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import io.micrometer.common.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import java.util.List;
import java.util.stream.Collectors;
@@ -58,5 +61,12 @@ public class Utils {
return filePath;
}
}
public static String decodeBase64String(String decodedString) {
if (StringUtils.isBlank(decodedString)) {
return decodedString;
}
byte[] decode = Base64.getDecoder().decode(decodedString.getBytes(StandardCharsets.UTF_8));
return new String(decode, StandardCharsets.UTF_8);
}
}