|
@@ -683,6 +683,7 @@ class serveManagement(View):
|
|
|
orderType = request_dict.get('orderType', None)
|
|
|
serialNumber = request_dict.get('serialNumber', None)
|
|
|
trade_no = request_dict.get('tradeNo', None)
|
|
|
+ userID__phone = request_dict.get('userID__phone', None)
|
|
|
|
|
|
if not all([pageNo, pageSize]):
|
|
|
return response.json(444)
|
|
@@ -710,6 +711,8 @@ class serveManagement(View):
|
|
|
omqs = omqs.filter(order_type=int(orderType))
|
|
|
if trade_no:
|
|
|
omqs = omqs.filter(trade_no=trade_no)
|
|
|
+ if userID__phone:
|
|
|
+ omqs = omqs.filter(userID__phone=userID__phone)
|
|
|
if serialNumber:
|
|
|
device_uid = CommonService.query_uid_with_serial(serialNumber)
|
|
|
omqs = omqs.filter(UID=device_uid)
|
|
@@ -728,7 +731,7 @@ class serveManagement(View):
|
|
|
order_ql = omqs.values("orderID", "UID", "userID__username", "userID__NickName", "channel", "desc", "price",
|
|
|
"refunded_amount", "currency", "addTime", "updTime", "paypal", "payType",
|
|
|
"rank__day", "rank__price", "status", "order_type", "paymentID", "trade_no",
|
|
|
- "payTime", "userID__region_country")
|
|
|
+ "payTime", "userID__region_country", "userID__phone")
|
|
|
order_ql = order_ql.order_by('-addTime') # 根据CDK创建时间降序排序
|
|
|
order_ql = order_ql[(page - 1) * line:page * line]
|
|
|
for order in order_ql:
|
|
@@ -758,7 +761,8 @@ class serveManagement(View):
|
|
|
'order_type': order['order_type'],
|
|
|
'payTime': order['payTime'] if order['payTime'] else 'N/A',
|
|
|
'serialNumber': 'N/A' if serialNumber == order['UID'] else serialNumber,
|
|
|
- 'country': country
|
|
|
+ 'country': country,
|
|
|
+ 'userID__phone': order['userID__phone'],
|
|
|
}
|
|
|
# 订单显示(或不显示)停用/退款功能
|
|
|
if order['order_type'] == 0: # 云存
|