|
@ -70,6 +70,7 @@ func GetMeta(id uint) (string, error) { |
|
|
return meta, global.GVA_DB.Model(model.SysAutoCodeHistory{}).Select("request_meta").First(&meta, id).Error |
|
|
return meta, global.GVA_DB.Model(model.SysAutoCodeHistory{}).Select("request_meta").First(&meta, id).Error |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// GetSysHistoryPage 获取系统历史数据
|
|
|
func GetSysHistoryPage(info request.PageInfo) (err error, list interface{}, total int64) { |
|
|
func GetSysHistoryPage(info request.PageInfo) (err error, list interface{}, total int64) { |
|
|
limit := info.PageSize |
|
|
limit := info.PageSize |
|
|
offset := info.PageSize * (info.Page - 1) |
|
|
offset := info.PageSize * (info.Page - 1) |
|
@ -79,3 +80,8 @@ func GetSysHistoryPage(info request.PageInfo) (err error, list interface{}, tota |
|
|
err = db.Limit(limit).Offset(offset).Order("updated_at desc").Select("id,created_at,updated_at,struct_name,struct_cn_name,flag,table_name").Find(&fileLists).Error |
|
|
err = db.Limit(limit).Offset(offset).Order("updated_at desc").Select("id,created_at,updated_at,struct_name,struct_cn_name,flag,table_name").Find(&fileLists).Error |
|
|
return err, fileLists, total |
|
|
return err, fileLists, total |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// DeletePage 删除历史数据
|
|
|
|
|
|
func DeletePage(id uint) error { |
|
|
|
|
|
return global.GVA_DB.Delete(model.SysAutoCodeHistory{}, id).Error |
|
|
|
|
|
} |