修复(#83): 修复脚本目录全量测试构建失败

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
2026-05-26 22:28:36 -07:00
parent 25811526bd
commit b7691567d8
7 changed files with 12 additions and 5 deletions
@@ -29,7 +29,7 @@ func (l *DeleteSubscribeApplicationLogic) DeleteSubscribeApplication(req *types.
err := l.svcCtx.ClientModel.Delete(l.ctx, req.Id)
if err != nil {
l.Errorf("Failed to delete subscribe application with ID %d: %v", req.Id, err)
return errors.Wrapf(xerr.NewErrCode(xerr.DatabaseDeletedError), err.Error())
return errors.Wrap(xerr.NewErrCode(xerr.DatabaseDeletedError), err.Error())
}
return nil
}
@@ -80,7 +80,7 @@ func (l *ResetSortWithNodeLogic) ResetSortWithNode(req *types.ResetSortRequest)
})
if err != nil {
l.Errorw("[NodeSort] Update Database Error: ", logger.Field("error", err.Error()))
return errors.Wrapf(xerr.NewErrCode(xerr.DatabaseUpdateError), err.Error())
return errors.Wrap(xerr.NewErrCode(xerr.DatabaseUpdateError), err.Error())
}
return nil
}
@@ -80,7 +80,7 @@ func (l *ResetSortWithServerLogic) ResetSortWithServer(req *types.ResetSortReque
})
if err != nil {
l.Errorw("[NodeSort] Update Database Error: ", logger.Field("error", err.Error()))
return errors.Wrapf(xerr.NewErrCode(xerr.DatabaseUpdateError), err.Error())
return errors.Wrap(xerr.NewErrCode(xerr.DatabaseUpdateError), err.Error())
}
return nil
}
@@ -46,7 +46,7 @@ func (l *DeviceWsConnectLogic) DeviceWsConnect(c *gin.Context) error {
_, err := l.svcCtx.UserModel.FindOneDeviceByIdentifier(l.ctx, identifier)
if err != nil && !sysErr.Is(err, gorm.ErrRecordNotFound) {
l.Errorf("DeviceWsConnectLogic DeviceWsConnect FindOneDeviceByIdentifier err: %v", err)
return errors.Wrapf(xerr.NewErrCode(xerr.DatabaseQueryError), err.Error())
return errors.Wrap(xerr.NewErrCode(xerr.DatabaseQueryError), err.Error())
}
value = l.ctx.Value(constant.CtxKeyUser)
@@ -67,7 +67,7 @@ func (l *DeviceWsConnectLogic) DeviceWsConnect(c *gin.Context) error {
err := l.svcCtx.UserModel.InsertDevice(l.ctx, &device)
if err != nil {
l.Errorf("DeviceWsConnectLogic DeviceWsConnect InsertDevice err: %v", err)
return errors.Wrapf(xerr.NewErrCode(xerr.DatabaseInsertError), err.Error())
return errors.Wrap(xerr.NewErrCode(xerr.DatabaseInsertError), err.Error())
}
}
//默认在线设备1
+2
View File
@@ -1,3 +1,5 @@
//go:build ignore
package main
import (
+3
View File
@@ -0,0 +1,3 @@
// Package scripts keeps standalone maintenance tools out of normal package
// builds. Run individual tools with go run scripts/<tool>.go.
package scripts
+2
View File
@@ -1,3 +1,5 @@
//go:build ignore
package main
import (