...
|
...
|
@@ -4,6 +4,7 @@ import ( |
|
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/application/factory"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/domain"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/utils"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/log"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/protocol"
|
|
|
"time"
|
|
|
)
|
...
|
...
|
@@ -39,6 +40,7 @@ func OrderDetail(header *protocol.RequestHeader, request *protocol.OrderDetailRe |
|
|
}
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
log.Error(err)
|
|
|
transactionContext.RollbackTransaction()
|
|
|
}
|
|
|
}()
|
...
|
...
|
@@ -82,6 +84,7 @@ func OrderStatistics(header *protocol.RequestHeader, request *protocol.OrderStat |
|
|
}
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
log.Error(err)
|
|
|
transactionContext.RollbackTransaction()
|
|
|
}
|
|
|
}()
|
...
|
...
|
@@ -131,16 +134,22 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
|
|
}
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
log.Error(err)
|
|
|
transactionContext.RollbackTransaction()
|
|
|
}
|
|
|
}()
|
|
|
queryOption := &domain.OrderQueryOption{
|
|
|
PartnerId: header.UserId,
|
|
|
OrderType: request.OrderAction,
|
|
|
OrderStatus: request.OrderAction + 1,
|
|
|
Limit: request.PageSize,
|
|
|
Offset: request.PageSize * request.PageIndex,
|
|
|
SortByUpdateTime: domain.DESC,
|
|
|
}
|
|
|
if request.OrderAction == 1 {
|
|
|
queryOption.OrderStatus = domain.OrderStatusDeliverSome
|
|
|
} else if request.OrderAction == 2 {
|
|
|
queryOption.OrderStatus = domain.OrderStatusDeliverAll
|
|
|
}
|
|
|
if request.StartTime > 0 {
|
|
|
queryOption.BeginTime = time.Unix(request.StartTime/1000, 0)
|
|
|
}
|
...
|
...
|
|