...
|
...
|
@@ -6,6 +6,7 @@ import ( |
|
|
"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/infrastructure/repository"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/infrastructure/starrocks"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/character-library-metadata-bastion/pkg/log"
|
|
|
)
|
|
|
|
|
|
type TableEditDataService struct {
|
...
|
...
|
@@ -38,7 +39,9 @@ func (ptr *TableEditDataService) RowEdit(ctx *domain.Context, request domain.Edi |
|
|
}
|
|
|
|
|
|
for _, l := range request.AddList {
|
|
|
ptr.add(ctx, table, l, request.Where)
|
|
|
if addErr := ptr.add(ctx, table, l, request.Where); addErr != nil {
|
|
|
log.Logger.Error(addErr.Error())
|
|
|
}
|
|
|
}
|
|
|
if len(request.RemoveList) > 0 {
|
|
|
// 日志
|
...
|
...
|
@@ -49,11 +52,15 @@ func (ptr *TableEditDataService) RowEdit(ctx *domain.Context, request domain.Edi |
|
|
return nil, err
|
|
|
}
|
|
|
for _, l := range request.RemoveList {
|
|
|
ptr.remove(ctx, table, l, request.Where)
|
|
|
if e := ptr.remove(ctx, table, l, request.Where); e != nil {
|
|
|
log.Logger.Error(e.Error())
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
for _, l := range request.UpdateList {
|
|
|
ptr.update(ctx, table, l, request.Where)
|
|
|
if e := ptr.update(ctx, table, l, request.Where); e != nil {
|
|
|
log.Logger.Error(e.Error())
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return nil, nil
|
...
|
...
|
|