skyouc
3 天以前 45a230e870b26b51d3006273a36df78203521253
rsf-server/src/main/java/com/vincent/rsf/server/system/controller/BaseController.java
@@ -9,10 +9,12 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
 * Created by vincent on 1/30/2024
 */
public class BaseController {
    public User getLoginUser() {
@@ -41,6 +43,13 @@
    }
    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();