fix: 充值投诉仅允许已支付流水(前后端硬拦)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -330,6 +330,15 @@ class ChongzhiRecordListView(APIView):
|
||||
leixing = request.data.get('leixing')
|
||||
if leixing not in (None, ''):
|
||||
qs = qs.filter(leixing=int(leixing))
|
||||
# 投诉选单:仅已支付;普通充值记录页不传此参数则展示全部状态
|
||||
only_paid = str(
|
||||
request.data.get('only_paid')
|
||||
or request.data.get('for_complaint')
|
||||
or ''
|
||||
).lower() in ('1', 'true', 'yes')
|
||||
if only_paid:
|
||||
from products.czjilu_types import CZJILU_PAID_STATUS
|
||||
qs = qs.filter(zhuangtai=CZJILU_PAID_STATUS)
|
||||
total = qs.count()
|
||||
start = max(page - 1, 0) * page_size
|
||||
type_map = {
|
||||
|
||||
Reference in New Issue
Block a user