修复了客服日统计时机,展示更加全面的数据
This commit is contained in:
@@ -17,8 +17,7 @@ from merchant_ops.services.order_query import (
|
||||
from merchant_ops.services.order_enrich import staff_order_list_item
|
||||
from merchant_ops.services.audit import audit_staff
|
||||
from merchant_ops.services.dispatch import staff_dispatch_order
|
||||
from merchant_ops.services.stats import bump_cancel_count, bump_penalty_count, update_merchant_and_staff_stats
|
||||
from merchant_ops.constants import STAT_ACTION_REFUND, STAT_ACTION_SETTLE
|
||||
from merchant_ops.services.stats import bump_cancel_count, bump_penalty_count
|
||||
from orders.models import MerchantOrderExt
|
||||
from orders.views import (
|
||||
ShangjiaDingdanXiangqingView, ShangjiaJiesuanView, ShangjiaChexiaoView,
|
||||
@@ -155,11 +154,6 @@ class StaffSettleView(APIView):
|
||||
resp = proxy_merchant_order_view(request, member, ShangjiaJiesuanView, 'order_settle')
|
||||
if resp.data.get('code') in (0, 200):
|
||||
audit_staff(member, 'SETTLE', request, resource_id=pick_order_id(request.data))
|
||||
from orders.models import Order
|
||||
oid = pick_order_id(request.data)
|
||||
o = Order.query.filter(OrderID=oid).first()
|
||||
if o:
|
||||
update_merchant_and_staff_stats(member.merchant_id, member, o.Amount, STAT_ACTION_SETTLE)
|
||||
return resp
|
||||
except Exception as e:
|
||||
return _err(e)
|
||||
@@ -189,11 +183,6 @@ class StaffRefundView(APIView):
|
||||
resp = proxy_merchant_order_view(request, member, ShangjiaTuikuanShenqingView, 'order_refund_apply')
|
||||
if resp.data.get('code') in (0, 200):
|
||||
audit_staff(member, 'REFUND_APPLY', request, resource_id=pick_order_id(request.data))
|
||||
from orders.models import Order
|
||||
oid = pick_order_id(request.data)
|
||||
o = Order.query.filter(OrderID=oid).first()
|
||||
if o:
|
||||
update_merchant_and_staff_stats(member.merchant_id, member, o.Amount, STAT_ACTION_REFUND)
|
||||
return resp
|
||||
except Exception as e:
|
||||
return _err(e)
|
||||
|
||||
Reference in New Issue
Block a user