|
@@ -4,6 +4,7 @@ import ( |
|
@@ -4,6 +4,7 @@ import ( |
|
4
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/application/factory"
|
4
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/application/factory"
|
|
5
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/domain"
|
5
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/domain"
|
|
6
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/utils"
|
6
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/utils"
|
|
|
|
7
|
+ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/log"
|
|
7
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/protocol"
|
8
|
"gitlab.fjmaimaimai.com/mmm-go/partner/pkg/protocol"
|
|
8
|
"time"
|
9
|
"time"
|
|
9
|
)
|
10
|
)
|
|
@@ -39,6 +40,7 @@ func OrderDetail(header *protocol.RequestHeader, request *protocol.OrderDetailRe |
|
@@ -39,6 +40,7 @@ func OrderDetail(header *protocol.RequestHeader, request *protocol.OrderDetailRe |
|
39
|
}
|
40
|
}
|
|
40
|
defer func() {
|
41
|
defer func() {
|
|
41
|
if err != nil {
|
42
|
if err != nil {
|
|
|
|
43
|
+ log.Error(err)
|
|
42
|
transactionContext.RollbackTransaction()
|
44
|
transactionContext.RollbackTransaction()
|
|
43
|
}
|
45
|
}
|
|
44
|
}()
|
46
|
}()
|
|
@@ -82,6 +84,7 @@ func OrderStatistics(header *protocol.RequestHeader, request *protocol.OrderStat |
|
@@ -82,6 +84,7 @@ func OrderStatistics(header *protocol.RequestHeader, request *protocol.OrderStat |
|
82
|
}
|
84
|
}
|
|
83
|
defer func() {
|
85
|
defer func() {
|
|
84
|
if err != nil {
|
86
|
if err != nil {
|
|
|
|
87
|
+ log.Error(err)
|
|
85
|
transactionContext.RollbackTransaction()
|
88
|
transactionContext.RollbackTransaction()
|
|
86
|
}
|
89
|
}
|
|
87
|
}()
|
90
|
}()
|
|
@@ -131,16 +134,22 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
|
@@ -131,16 +134,22 @@ func OrderList(header *protocol.RequestHeader, request *protocol.OrderListReques |
|
131
|
}
|
134
|
}
|
|
132
|
defer func() {
|
135
|
defer func() {
|
|
133
|
if err != nil {
|
136
|
if err != nil {
|
|
|
|
137
|
+ log.Error(err)
|
|
134
|
transactionContext.RollbackTransaction()
|
138
|
transactionContext.RollbackTransaction()
|
|
135
|
}
|
139
|
}
|
|
136
|
}()
|
140
|
}()
|
|
137
|
queryOption := &domain.OrderQueryOption{
|
141
|
queryOption := &domain.OrderQueryOption{
|
|
138
|
PartnerId: header.UserId,
|
142
|
PartnerId: header.UserId,
|
|
139
|
- OrderType: request.OrderAction,
|
143
|
+ OrderStatus: request.OrderAction + 1,
|
|
140
|
Limit: request.PageSize,
|
144
|
Limit: request.PageSize,
|
|
141
|
Offset: request.PageSize * request.PageIndex,
|
145
|
Offset: request.PageSize * request.PageIndex,
|
|
142
|
SortByUpdateTime: domain.DESC,
|
146
|
SortByUpdateTime: domain.DESC,
|
|
143
|
}
|
147
|
}
|
|
|
|
148
|
+ if request.OrderAction == 1 {
|
|
|
|
149
|
+ queryOption.OrderStatus = domain.OrderStatusDeliverSome
|
|
|
|
150
|
+ } else if request.OrderAction == 2 {
|
|
|
|
151
|
+ queryOption.OrderStatus = domain.OrderStatusDeliverAll
|
|
|
|
152
|
+ }
|
|
144
|
if request.StartTime > 0 {
|
153
|
if request.StartTime > 0 {
|
|
145
|
queryOption.BeginTime = time.Unix(request.StartTime/1000, 0)
|
154
|
queryOption.BeginTime = time.Unix(request.StartTime/1000, 0)
|
|
146
|
}
|
155
|
}
|