|
@@ -1,13 +1,15 @@
|
|
|
package co.weiku.beetlsqldemo.web;
|
|
|
|
|
|
-import co.weiku.beetlsqldemo.bean.UserEntity;
|
|
|
import co.weiku.beetlsqldemo.mapper.UserMapper;
|
|
|
import org.beetl.sql.core.SQLManager;
|
|
|
+import org.beetl.sql.core.SqlId;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Qualifier;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
* 演示控制器
|
|
|
* 作者:Xing Gang
|
|
@@ -85,9 +87,12 @@ public class HomeController {
|
|
|
//SQLReady sql = new SQLReady("select * from [sys_sql]");
|
|
|
//var list = sqlManager3.execute(sql, LinkedHashMap.class);
|
|
|
|
|
|
- UserEntity u = new UserEntity();
|
|
|
- u.setName("moxiao");
|
|
|
- var list = sqlManager1.template(u);
|
|
|
+ // UserEntity u = new UserEntity();
|
|
|
+ // u.setName("moxiao");
|
|
|
+ // var list = sqlManager1.template(u);
|
|
|
+
|
|
|
+ SqlId sql = SqlId.of("user", "getDateTime");
|
|
|
+ var list = sqlManager1.select(sql, Map.class);
|
|
|
|
|
|
return list;
|
|
|
}
|