feat: 商家退款申请支持证据图片
新增 tuikuantupian 表;申请退款必传图片;打手详情与客服订单详情返回退款图。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1641,13 +1641,24 @@ class KefuGetOrderDetailView(APIView):
|
||||
logger.exception(f"[kefuhqddxq] 打手图片查询异常 dingdan_id={dingdan_id}")
|
||||
response_data['dashou_images'] = []
|
||||
|
||||
# 7. 退款理由
|
||||
# 7. 退款理由 + 证据图
|
||||
try:
|
||||
tuikuan_record = RefundRecord.query.filter(OrderID=dingdan_id).order_by('-CreateTime').first()
|
||||
response_data['tuikuan_liyou'] = tuikuan_record.Reason if tuikuan_record and tuikuan_record.Reason else ''
|
||||
except Exception as e:
|
||||
logger.exception(f"[kefuhqddxq] 退款理由查询异常 dingdan_id={dingdan_id}")
|
||||
response_data['tuikuan_liyou'] = ''
|
||||
try:
|
||||
from orders.models import RefundEvidenceImage
|
||||
response_data['tuikuan_tupian'] = list(
|
||||
RefundEvidenceImage.query.filter(OrderID=dingdan_id)
|
||||
.exclude(ImageURL__isnull=True)
|
||||
.exclude(ImageURL='')
|
||||
.values_list('ImageURL', flat=True)
|
||||
)
|
||||
except Exception as e:
|
||||
logger.exception(f"[kefuhqddxq] 退款图片查询异常 dingdan_id={dingdan_id}")
|
||||
response_data['tuikuan_tupian'] = []
|
||||
|
||||
# 8. 指定打手响应
|
||||
ZHIDING_HF_TEXT = {1: '想接', 2: '不想接', 3: '等会接'}
|
||||
|
||||
Reference in New Issue
Block a user