feat(orders): 号主可从自己的列表隐藏已结束订单

只写入隐藏时间,订单和款项仍保留给租客与后台。详情按钮固定对齐,删除跟在后面。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
yml2213
2026-10-01 16:22:55 +08:00
co-authored by Cursor
parent a1008f7e6a
commit e5cd7b5c34
15 changed files with 499 additions and 15 deletions
+11
View File
@@ -34,6 +34,7 @@ var (
ErrDepositHoldAmountEmpty = errors.New("deposit hold amount empty")
ErrOfflineSettlementCannotMark = errors.New("offline settlement cannot mark")
ErrInvalidSellerHandoffStatus = errors.New("invalid seller handoff status")
ErrOrderCannotHide = errors.New("order cannot hide")
)
const internalOrderHours = 24
@@ -63,6 +64,16 @@ func (s *Service) Cancel(ctx context.Context, userID uint64, orderID uint64) err
return s.repo.Cancel(ctx, userID, orderID)
}
func (s *Service) HideForOwner(ctx context.Context, userID uint64, orderID uint64) error {
if s.repo == nil {
return ErrDependencyUnavailable
}
if orderID == 0 {
return ErrOrderCannotHide
}
return s.repo.HideForOwner(ctx, userID, orderID)
}
func (s *Service) Pay(ctx context.Context, userID uint64, orderID uint64) error {
if s.repo == nil {
return ErrDependencyUnavailable