From 1d110285b5556baba2c068f40f84f7e8f8a487f8 Mon Sep 17 00:00:00 2001 From: lihongjie0209 Date: Tue, 19 Nov 2024 22:50:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84=E8=84=9A=E6=9C=AC?= =?UTF-8?q?=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cn/lihongjie/coal/Codegen.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/cn/lihongjie/coal/Codegen.java b/src/main/java/cn/lihongjie/coal/Codegen.java index c5125a73..1711d3cf 100644 --- a/src/main/java/cn/lihongjie/coal/Codegen.java +++ b/src/main/java/cn/lihongjie/coal/Codegen.java @@ -1017,15 +1017,16 @@ public class Codegen { import cn.lihongjie.coal.base.dto.CommonQuery import %s import org.springframework.context.ApplicationContext - + import com.fasterxml.jackson.databind.ObjectMapper ApplicationContext ioc = ioc; def controller = ioc.getBean(%s.class) + def objectMapper = ioc.getBean(ObjectMapper.class) as ObjectMapper - return controller.list(new CommonQuery()) + return controller.list(params!=null ? objectMapper.convertValue(params, CommonQuery.class ) : new CommonQuery()) """