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