+
{{ $t('payment.risk.blacklist.tip.typeValueImmutable') }}
-
-
-
-
-
-
-
+
+
+
@@ -197,7 +332,11 @@
-
+
@@ -221,5 +360,5 @@
{{ $t('common.save') }}
-
+
diff --git a/apps/daxpay-admin/src/views/payment/risk/blacklist/PayBlacklistList.vue b/apps/daxpay-admin/src/views/payment/risk/blacklist/PayBlacklistList.vue
index e86075d4f..9a8d547cb 100644
--- a/apps/daxpay-admin/src/views/payment/risk/blacklist/PayBlacklistList.vue
+++ b/apps/daxpay-admin/src/views/payment/risk/blacklist/PayBlacklistList.vue
@@ -12,6 +12,10 @@
type PayBlacklistQuery,
type PayBlacklistVo,
} from '#/api/payment/risk/blacklist.api';
+ import {
+ type WxPlatformApp,
+ WxPlatformAppApi,
+ } from '#/api/payment/wx/platform-app.api';
import { BQuery, type QueryField } from '#/components/query';
import { PermCodes } from '#/constants/perm-codes';
import { useMessage } from '#/hooks/useMessage';
@@ -31,6 +35,8 @@
const pageConfig = ref({ currentPage: 1, pageSize: 10, total: 0 });
const tableData = ref([]);
const editRef = ref();
+ // 平台应用名缓存(列表作用范围展示)
+ const platformAppNameMap = ref>({});
const queryFields = computed(() => [
{
@@ -41,7 +47,8 @@
placeholder: $t('common.pleaseSelect'),
selectList: [
{ label: $t('payment.risk.blacklist.type.ip'), value: 'ip' },
- { label: $t('payment.risk.blacklist.type.open_id'), value: 'open_id' },
+ { label: $t('payment.risk.blacklist.type.alipay_user'), value: 'alipay_user' },
+ { label: $t('payment.risk.blacklist.type.wechat_openid'), value: 'wechat_openid' },
],
},
{
@@ -62,15 +69,24 @@
{ label: $t('payment.risk.blacklist.status.disable'), value: 'disable' },
],
},
- {
- type: 'string',
- field: 'channel',
- // 通道族
- name: $t('payment.risk.blacklist.field.channel'),
- placeholder: $t('common.pleaseInput'),
- },
]);
+ /** 加载平台应用名称映射 */
+ async function loadPlatformAppNames() {
+ try {
+ const { data } = await WxPlatformAppApi.listAll();
+ const map: Record = {};
+ (data || []).forEach((app: WxPlatformApp) => {
+ if (app.wxAppId) {
+ map[app.wxAppId] = app.appName || app.wxAppId;
+ }
+ });
+ platformAppNameMap.value = map;
+ } catch {
+ platformAppNameMap.value = {};
+ }
+ }
+
/** 分页查询 */
function queryPage() {
loading.value = true;
@@ -128,24 +144,45 @@
});
}
+ /** 类型列 */
function typeLabel(type?: string) {
- if (type === 'open_id') return $t('payment.risk.blacklist.type.open_id');
- if (type === 'ip') return $t('payment.risk.blacklist.type.ip');
+ if (type === 'ip') {
+ return $t('payment.risk.blacklist.type.ip');
+ }
+ if (type === 'alipay_user') {
+ return $t('payment.risk.blacklist.type.alipay_user');
+ }
+ if (type === 'wechat_openid') {
+ return $t('payment.risk.blacklist.type.wechat_openid');
+ }
return type || '';
}
+ /** 作用范围:全局 / 应用名或 AppId */
+ function scopeLabel(row: PayBlacklistVo) {
+ if (row.type === 'ip' || row.type === 'alipay_user') {
+ return $t('payment.risk.blacklist.scope.global');
+ }
+ if (row.type === 'wechat_openid' && row.wxAppId) {
+ const name = platformAppNameMap.value[row.wxAppId];
+ return name ? `${name}(${row.wxAppId})` : row.wxAppId;
+ }
+ return '-';
+ }
+
function statusColor(status?: string) {
return status === 'enable' ? 'success' : 'default';
}
onMounted(() => {
xTable.value?.connectToolbar(xToolbar.value as VxeToolbarInstance);
+ void loadPlatformAppNames();
queryPage();
});
-
+
@@ -170,13 +207,15 @@
-
+
{{ typeLabel(row.type) }}
-
-
+
+
+ {{ scopeLabel(row) }}
+
diff --git a/apps/daxpay-admin/src/views/payment/risk/hit/PayRiskHitList.vue b/apps/daxpay-admin/src/views/payment/risk/hit/PayRiskHitList.vue
index 21c28152f..d011b3d60 100644
--- a/apps/daxpay-admin/src/views/payment/risk/hit/PayRiskHitList.vue
+++ b/apps/daxpay-admin/src/views/payment/risk/hit/PayRiskHitList.vue
@@ -48,7 +48,8 @@
placeholder: $t('common.pleaseSelect'),
selectList: [
{ label: $t('payment.risk.blacklist.type.ip'), value: 'ip' },
- { label: $t('payment.risk.blacklist.type.open_id'), value: 'open_id' },
+ { label: $t('payment.risk.blacklist.type.alipay_user'), value: 'alipay_user' },
+ { label: $t('payment.risk.blacklist.type.wechat_openid'), value: 'wechat_openid' },
],
},
{
@@ -162,7 +163,19 @@
{{ phaseLabel(row.phase) }}
-
+
+
+ {{
+ row.hitType === 'ip'
+ ? $t('payment.risk.blacklist.type.ip')
+ : row.hitType === 'alipay_user'
+ ? $t('payment.risk.blacklist.type.alipay_user')
+ : row.hitType === 'wechat_openid'
+ ? $t('payment.risk.blacklist.type.wechat_openid')
+ : row.hitType
+ }}
+
+