排行榜按收益/流水排序;小程序配置与页面资源入库可后台管理
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import threading
|
||||
import threading
|
||||
import traceback
|
||||
from calendar import monthrange
|
||||
|
||||
@@ -27,6 +27,7 @@ from houtai.utils import verify_kefu_permission
|
||||
import xmltodict
|
||||
|
||||
from django.conf import settings
|
||||
from utils.xcx_sys_config import wx_cfg
|
||||
|
||||
from dingdan.models import Dashoutupian, Chufajilu, PreSettlement, OrderDashouHistory
|
||||
# apps/houtai/views.py 继续添加
|
||||
@@ -646,6 +647,7 @@ import xmltodict
|
||||
from decimal import Decimal
|
||||
|
||||
from django.conf import settings
|
||||
from utils.xcx_sys_config import wx_cfg
|
||||
from django.db import transaction
|
||||
from django.core.cache import cache
|
||||
from rest_framework.views import APIView
|
||||
@@ -1055,8 +1057,8 @@ class CrossPlatformRefundView(APIView):
|
||||
"https://api.weixin.qq.com/cgi-bin/token",
|
||||
params={
|
||||
"grant_type": "client_credential",
|
||||
"appid": settings.WEIXIN_APPID,
|
||||
"secret": settings.WEIXIN_SECRET,
|
||||
"appid": wx_cfg.WEIXIN_APPID,
|
||||
"secret": wx_cfg.WEIXIN_SECRET,
|
||||
},
|
||||
timeout=10,
|
||||
)
|
||||
@@ -1483,11 +1485,11 @@ class CrossPlatformRefundView(APIView):
|
||||
def _call_wechat_refund(self, order):
|
||||
"""调用微信支付退款接口,返回 {'code':0, 'msg':'success'} 或错误信息"""
|
||||
# 获取微信支付配置
|
||||
appid = getattr(settings, 'WEIXIN_APPID', '')
|
||||
mch_id = getattr(settings, 'WEIXIN_MCHID', '')
|
||||
key = getattr(settings, 'WEIXIN_SHANGHUMIYAO', '')
|
||||
cert_path = getattr(settings, 'WEIXIN_CERT_PATH', '')
|
||||
key_path = getattr(settings, 'WEIXIN_KEY_PATH', '')
|
||||
appid = wx_cfg.WEIXIN_APPID
|
||||
mch_id = wx_cfg.WEIXIN_MCHID
|
||||
key = wx_cfg.WEIXIN_SHANGHUMIYAO
|
||||
cert_path = wx_cfg.WEIXIN_CERT_PATH
|
||||
key_path = wx_cfg.WEIXIN_KEY_PATH
|
||||
|
||||
if not all([appid, mch_id, key, cert_path, key_path]):
|
||||
missing = [k for k, v in {'appid': appid, 'mch_id': mch_id, 'key': key, 'cert_path': cert_path, 'key_path': key_path}.items() if not v]
|
||||
@@ -10891,6 +10893,7 @@ class ZxkfghdsView(APIView):
|
||||
|
||||
|
||||
from django.conf import settings
|
||||
from utils.xcx_sys_config import wx_cfg
|
||||
from django.db.models import ObjectDoesNotExist
|
||||
from rest_framework import status
|
||||
from rest_framework.parsers import JSONParser
|
||||
|
||||
Reference in New Issue
Block a user