Merge branch 'develop' of https://gitee.com/cunkebao/cunkebao_v3 into develop
This commit is contained in:
@@ -37,7 +37,19 @@ const AccountListModal: React.FC<AccountListModalProps> = ({
|
|||||||
try {
|
try {
|
||||||
const detailRes = await fetchDistributionRuleDetail(ruleId);
|
const detailRes = await fetchDistributionRuleDetail(ruleId);
|
||||||
const accountData = detailRes?.config?.accountGroupsOptions || [];
|
const accountData = detailRes?.config?.accountGroupsOptions || [];
|
||||||
setAccounts(accountData);
|
|
||||||
|
// 映射数据字段
|
||||||
|
const formattedAccounts = accountData.map((account: any) => ({
|
||||||
|
id: account.id,
|
||||||
|
nickname: account.nickname || account.realName || account.userName || "",
|
||||||
|
wechatId: account.userName || account.wechatId || "",
|
||||||
|
avatar: account.avatar || "",
|
||||||
|
status: account.status || "normal",
|
||||||
|
realName: account.realName || "",
|
||||||
|
memo: account.memo || "",
|
||||||
|
}));
|
||||||
|
|
||||||
|
setAccounts(formattedAccounts);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("获取账号详情失败:", error);
|
console.error("获取账号详情失败:", error);
|
||||||
message.error("获取账号详情失败");
|
message.error("获取账号详情失败");
|
||||||
@@ -127,12 +139,18 @@ const AccountListModal: React.FC<AccountListModalProps> = ({
|
|||||||
<div className={style.accountInfo}>
|
<div className={style.accountInfo}>
|
||||||
<div className={style.accountName}>
|
<div className={style.accountName}>
|
||||||
{account.nickname ||
|
{account.nickname ||
|
||||||
|
(account as any).realName ||
|
||||||
account.wechatId ||
|
account.wechatId ||
|
||||||
`账号${account.id}`}
|
`账号${account.id}`}
|
||||||
</div>
|
</div>
|
||||||
<div className={style.accountWechatId}>
|
<div className={style.accountWechatId}>
|
||||||
{account.wechatId || "未绑定微信号"}
|
{account.wechatId || "未绑定微信号"}
|
||||||
</div>
|
</div>
|
||||||
|
{(account as any).memo && (
|
||||||
|
<div className={style.accountMemo}>
|
||||||
|
{(account as any).memo}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className={style.accountStatus}>
|
<div className={style.accountStatus}>
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -38,17 +38,29 @@ const PoolListModal: React.FC<PoolListModalProps> = ({
|
|||||||
setLoading(true);
|
setLoading(true);
|
||||||
try {
|
try {
|
||||||
const detailRes = await fetchDistributionRuleDetail(ruleId);
|
const detailRes = await fetchDistributionRuleDetail(ruleId);
|
||||||
const poolData = detailRes?.config?.pools || [];
|
const poolData = detailRes?.config?.poolGroupsOptions || [];
|
||||||
|
|
||||||
const formattedPools = poolData.map((pool: any) => ({
|
const formattedPools = poolData.map((pool: any) => {
|
||||||
id: pool.id || pool.poolId,
|
// 处理创建时间:如果是时间戳,转换为日期字符串
|
||||||
name: pool.name || pool.poolName || `流量池${pool.id}`,
|
let createdAt = "";
|
||||||
description: pool.description || pool.desc || "",
|
if (pool.createTime) {
|
||||||
userCount: pool.userCount || pool.count || 0,
|
if (typeof pool.createTime === "number") {
|
||||||
tags: pool.tags || [],
|
createdAt = new Date(pool.createTime * 1000).toLocaleString("zh-CN");
|
||||||
createdAt: pool.createdAt || pool.createTime || "",
|
} else {
|
||||||
deviceIds: pool.deviceIds || [],
|
createdAt = pool.createTime;
|
||||||
}));
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
id: pool.id || pool.poolId,
|
||||||
|
name: pool.name || pool.poolName || `流量池${pool.id}`,
|
||||||
|
description: pool.description || pool.desc || "",
|
||||||
|
userCount: pool.num || pool.userCount || pool.count || 0,
|
||||||
|
tags: pool.tags || [],
|
||||||
|
createdAt: createdAt,
|
||||||
|
deviceIds: pool.deviceIds || [],
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
setPools(formattedPools);
|
setPools(formattedPools);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ interface SendRecordItem {
|
|||||||
isRecycle?: number;
|
isRecycle?: number;
|
||||||
sendTime?: string;
|
sendTime?: string;
|
||||||
sendCount?: number;
|
sendCount?: number;
|
||||||
|
account?: string;
|
||||||
|
username?: string;
|
||||||
|
createTime?: string;
|
||||||
|
recycleTime?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SendRcrodModalProps {
|
interface SendRcrodModalProps {
|
||||||
@@ -227,6 +231,12 @@ const SendRcrodModal: React.FC<SendRcrodModalProps> = ({
|
|||||||
<div className={style.accountWechatId}>
|
<div className={style.accountWechatId}>
|
||||||
{record.wechatId || "未绑定微信号"}
|
{record.wechatId || "未绑定微信号"}
|
||||||
</div>
|
</div>
|
||||||
|
{record.account && (
|
||||||
|
<div className={style.accountAccount}>
|
||||||
|
所属账号:{record.account}
|
||||||
|
{record.username && `(${record.username})`}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className={style.accountStatus}>
|
<div className={style.accountStatus}>
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -205,6 +205,15 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.accountAccount {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #666;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.accountStatus {
|
.accountStatus {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -135,10 +135,10 @@ class WorkbenchGroupCreateJob
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取已入群的用户(排除已成功入群的)
|
// 获取已入群的用户(排除已成功入群的)111
|
||||||
$groupUser = Db::name('workbench_group_create_item')
|
$groupUser = Db::name('workbench_group_create_item')
|
||||||
->where('workbenchId', $workbench->id)
|
->where('workbenchId', $workbench->id)
|
||||||
->where('status', 'in', [self::STATUS_SUCCESS, self::STATUS_ADMIN_FRIEND_ADDED])
|
->where('status', 'in', [self::STATUS_SUCCESS, self::STATUS_ADMIN_FRIEND_ADDED, self::STATUS_CREATING])
|
||||||
->whereIn('wechatId', $poolItem)
|
->whereIn('wechatId', $poolItem)
|
||||||
->group('wechatId')
|
->group('wechatId')
|
||||||
->column('wechatId');
|
->column('wechatId');
|
||||||
|
|||||||
Reference in New Issue
Block a user