Commit 7399d889 authored by xiandafu's avatar xiandafu
Browse files

刷新bug修复

parent adc12f7b
......@@ -37,6 +37,10 @@ public class CoreCodeGenService {
Log log = LogFactory.getLog(CoreCodeGenService.class);
public void refresh() {
sqlManager.refresh();
}
public List<Entity> getAllEntityInfo(){
MetadataManager meta = sqlManager.getMetaDataManager();
Set<String> set = meta.allTable();
......
......@@ -53,6 +53,14 @@ public class CoreCodeGenController {
return view;
}
@PostMapping(MODEL + "/refresh.json")
@ResponseBody
public JsonResult<Boolean> refresh() {
codeGenService.refresh();
return JsonResult.success();
}
@GetMapping(MODEL + "/tableDetail.do")
public ModelAndView tableDetail(String table) {
......
/*访问后台的代码*/
layui.define([], function(exports) {
var api={
refresh:function(callback){
Common.post("/core/codeGen/refresh.json", {}, function(path){
callback();
});
},
gen:function(callback){
Common.post("/core/codeGen/getPath.json", {}, function(path){
Common.openPrompt("代码保存路径?",path,function(newPath){
......
layui.define([ 'form', 'laydate', 'table' ], function(exports) {
layui.define([ 'form', 'laydate', 'table','codeApi' ], function(exports) {
var form = layui.form;
var laydate = layui.laydate;
var table = layui.table;
var codeApi = layui.codeApi;
var codeTable = null;
var view ={
......@@ -10,7 +11,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
this.initToolBar();
},
initTable:function(){
blogTable = table.render({
codeTable = table.render({
elem : '#codeTable',
height : Lib.getTableHeight(1),
method : 'post',
......@@ -52,7 +53,10 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
},
refresh:function(){
codeTable.reload();
codeApi.refresh(function(){
codeTable.reload();
})
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment