mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-25 07:46:40 +08:00
feat: 完善脚本生成
This commit is contained in:
@@ -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())
|
||||
|
||||
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user