chore: stabilize lint and verify builds

This commit is contained in:
2026-02-06 11:51:32 +08:00
parent edede17880
commit 1782f64417
114 changed files with 3032 additions and 1345 deletions

View File

@@ -82,6 +82,7 @@ func (s *tenant) GetPublicProfile(ctx context.Context, tenantID, userID int64) (
if errors.Is(err, gorm.ErrRecordNotFound) {
return nil, errorx.ErrRecordNotFound
}
return nil, errorx.ErrDatabaseError.WithCause(err)
}
@@ -101,6 +102,7 @@ func (s *tenant) GetPublicProfile(ctx context.Context, tenantID, userID int64) (
}
cfg := t.Config.Data()
return &dto.TenantProfile{
ID: t.ID,
Name: t.Name,
@@ -142,6 +144,7 @@ func (s *tenant) Follow(ctx context.Context, tenantID, userID int64) error {
if Notification != nil {
_ = Notification.Send(ctx, tenantID, t.UserID, "interaction", "新增粉丝", "有人关注了您的店铺: "+t.Name)
}
return nil
}
@@ -157,6 +160,7 @@ func (s *tenant) Unfollow(ctx context.Context, tenantID, userID int64) error {
if err != nil {
return errorx.ErrDatabaseError.WithCause(err)
}
return nil
}
@@ -242,8 +246,10 @@ func (s *tenant) GetModelByID(ctx context.Context, id int64) (*models.Tenant, er
if errors.Is(err, gorm.ErrRecordNotFound) {
return nil, errorx.ErrRecordNotFound
}
return nil, errorx.ErrDatabaseError.WithCause(err)
}
return u, nil
}
@@ -271,6 +277,7 @@ func (s *tenant) countFollowers(ctx context.Context, tenantIDs []int64) (map[int
for _, row := range rows {
result[row.TenantID] = row.Total
}
return result, nil
}
@@ -293,5 +300,6 @@ func (s *tenant) countPublishedContents(ctx context.Context, tenantIDs []int64)
for _, row := range rows {
result[row.TenantID] = row.Total
}
return result, nil
}