| | |
| | | import java.util.Optional; |
| | | import java.util.function.BiConsumer; |
| | | import java.util.function.Function; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by vincent on 2023/3/14 |
| | |
| | | return snakeCaseField + (order.isEmpty() ? "" : " " + order); |
| | | } |
| | | |
| | | public static String processTemplate(String template, Map<String, Object> params) { |
| | | if (template == null || params == null) { |
| | | return template; |
| | | } |
| | | String processed = template; |
| | | for (Map.Entry<String, Object> entry : params.entrySet()) { |
| | | processed = processed.replace("${" + entry.getKey() + "}", entry.getValue().toString()); |
| | | } |
| | | return processed; |
| | | } |
| | | |
| | | } |