删掉租期相关错误东西

This commit is contained in:
yml2213
2026-05-23 14:44:32 +08:00
parent e6cc9f1255
commit a6a1afb879
41 changed files with 127 additions and 312 deletions
+3 -1
View File
@@ -15,6 +15,8 @@ var (
ErrPermissionDenied = errors.New("permission denied")
)
const internalOrderHours = 24
type Service struct {
repo *Repository
}
@@ -27,7 +29,7 @@ func (s *Service) Create(userID uint64, req CreateRequest) (*OrderDTO, error) {
if s.repo == nil {
return nil, ErrDependencyUnavailable
}
if req.ListingID == 0 || req.RentHours <= 0 {
if req.ListingID == 0 {
return nil, ErrInvalidRentHours
}
return s.repo.Create(userID, req)