|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  | import java.util.Objects; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * Created by vincent on 1/30/2024 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public class BaseController { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public class BaseController { | 
|---|
|  |  |  | public User getLoginUser() { | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public <T extends BaseParam> T buildParam(Map<String, Object> map, Class<T> clz) { | 
|---|
|  |  |  | if (!Objects.isNull(map.get("meta"))) { | 
|---|
|  |  |  | Map<String, Object> meta = (Map<String, Object>) map.get("meta"); | 
|---|
|  |  |  | meta.keySet().forEach(key -> { | 
|---|
|  |  |  | map.put(key, meta.get(key)); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | map.remove("meta"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | T t  = null; | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | t = clz.getDeclaredConstructor().newInstance(); | 
|---|