order.go 701 B

1234567891011121314151617181920212223242526272829
  1. package service
  2. import (
  3. "time"
  4. "go-common/app/admin/ep/melloi/model"
  5. )
  6. // QueryOrder query order by order object
  7. func (s *Service) QueryOrder(qor *model.QueryOrderRequest) (*model.QueryOrderResponse, error) {
  8. return s.dao.QueryOrder(&qor.Order, qor.PageNum, qor.PageSize)
  9. }
  10. // UpdateOrder update perf order information
  11. func (s *Service) UpdateOrder(order *model.Order) error {
  12. return s.dao.UpdateOrder(order)
  13. }
  14. // AddOrder create new order
  15. func (s *Service) AddOrder(order *model.Order) error {
  16. order.ApplyDate = time.Now()
  17. order.Active = 1
  18. return s.dao.AddOrder(order)
  19. }
  20. // DelOrder delete order info by orderID
  21. func (s *Service) DelOrder(id int64) error {
  22. return s.dao.DelOrder(id)
  23. }