...
|
...
|
@@ -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
|
...
|
...
|
|