feat: 小程序资金冻结只读接口(汇总/明细/兼容字段)
提现资产与角色信息增量返回 dongjie;新增 fund-freeze-mine/ledger 只读 API,不改扣款逻辑。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1050,6 +1050,7 @@ class TixianAssetView(APIView):
|
||||
'DashouProfile', 'ShopProfile', 'GuanshiProfile', 'ZuzhangProfile', 'ShenheguanProfile'
|
||||
).get(UserUID=request.user.UserUID)
|
||||
# 初始化返回数据,默认全部为0
|
||||
# 冻结字段为增量兼容字段:旧前端忽略;提现仍只读 *_yue / *_fenyong
|
||||
data = {
|
||||
'dashou_yue': '0.00',
|
||||
'dashou_yajin': '0.00',
|
||||
@@ -1057,6 +1058,10 @@ class TixianAssetView(APIView):
|
||||
'guanshi_fenyong': '0.00',
|
||||
'zuzhang_fenyong': '0.00',
|
||||
'kaoheguan_fenyong': '0.00',
|
||||
'dashou_dongjie_yue': '0.00',
|
||||
'guanshi_dongjie_yue': '0.00',
|
||||
'zuzhang_dongjie_yue': '0.00',
|
||||
'kaoheguan_dongjie_yue': '0.00',
|
||||
'dashou_rate': 0.00,
|
||||
'dashou_yajin_rate': 0.00,
|
||||
'shangjia_rate': 0.00,
|
||||
@@ -1070,6 +1075,7 @@ class TixianAssetView(APIView):
|
||||
dashou = user.DashouProfile
|
||||
data['dashou_yue'] = str(dashou.yue)
|
||||
data['dashou_yajin'] = str(dashou.yajin)
|
||||
data['dashou_dongjie_yue'] = str(getattr(dashou, 'dongjie_yue', 0) or 0)
|
||||
except ObjectDoesNotExist:
|
||||
pass
|
||||
|
||||
@@ -1084,6 +1090,7 @@ class TixianAssetView(APIView):
|
||||
try:
|
||||
guanshi = user.GuanshiProfile
|
||||
data['guanshi_fenyong'] = str(guanshi.yue)
|
||||
data['guanshi_dongjie_yue'] = str(getattr(guanshi, 'dongjie_yue', 0) or 0)
|
||||
except ObjectDoesNotExist:
|
||||
pass
|
||||
|
||||
@@ -1091,6 +1098,7 @@ class TixianAssetView(APIView):
|
||||
try:
|
||||
zuzhang = user.ZuzhangProfile
|
||||
data['zuzhang_fenyong'] = str(zuzhang.ketixian_jine)
|
||||
data['zuzhang_dongjie_yue'] = str(getattr(zuzhang, 'dongjie_yue', 0) or 0)
|
||||
except ObjectDoesNotExist:
|
||||
pass
|
||||
|
||||
@@ -1098,6 +1106,7 @@ class TixianAssetView(APIView):
|
||||
try:
|
||||
kaoheguan = user.ShenheguanProfile
|
||||
data['kaoheguan_fenyong'] = str(kaoheguan.yue)
|
||||
data['kaoheguan_dongjie_yue'] = str(getattr(kaoheguan, 'dongjie_yue', 0) or 0)
|
||||
except ObjectDoesNotExist:
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user