作者 庄敏学

同步表结构接口更换

... ... @@ -82,11 +82,18 @@ func (logic *ByteNoticeLogic) handleNotice(conn transaction.Conn, notice *domain
if err != nil {
return err
}
tableInfo, err := logic.svcCtx.ByteMetadataService.TableInfo(logic.ctx, &bytelib.TableInfoRequest{
tablePreview, err := logic.svcCtx.ByteMetadataService.TableDataPreview(logic.ctx, &bytelib.TableDataPreviewRequest{
Token: accessToken,
TableId: notice.TableId,
ObjectId: int64(notice.TableId),
ObjectType: bytelib.ObjectMetaTable,
Where: &bytelib.TableQueryWhere{
PageNumber: 1,
PageSize: 1,
},
UseCache: false,
HiddenData: false,
})
if err != nil {
if err != nil || tablePreview.ObjectId <= 0 {
return nil
}
if len(list.List) > 0 {
... ... @@ -113,9 +120,9 @@ func (logic *ByteNoticeLogic) handleNotice(conn transaction.Conn, notice *domain
}
//保存字段
_, err = logic.saveFields(conn, &domain.ObjectField{
Id: int64(tableInfo.TableId),
Name: tableInfo.Name,
Fields: tableInfo.Fields,
Id: tablePreview.ObjectId,
Name: tablePreview.Name,
Fields: tablePreview.Fields,
})
if err != nil {
return err
... ...
... ... @@ -77,7 +77,7 @@ func (m *ObjectNotice) IsDeletedEvent() bool {
//拆解模块 方案启用、禁用
//计算模块 计算项和计算集启用、禁用
if m.Event == "table.query.set.update.status" {
if m.MetaData.Status&bytelib.ModuleChartTemplate == 0 {
if m.MetaData.Status&bytelib.ModuleDigitalCenter == 0 {
return true
}
}
... ...