feat: 完善分销提现审核与转账流程,增强帖子详情交互
这个提交包含在:
@@ -1417,6 +1417,7 @@ class Post extends V1
|
||||
}
|
||||
|
||||
$publisher = ['id' => 0, 'name' => '', 'avatar' => '', 'isMerchant' => false, 'verified' => false];
|
||||
$merchant = null;
|
||||
if (!empty($row['user_id'])) {
|
||||
$pub = Db::name('user')->where('id', $row['user_id'])->find();
|
||||
if ($pub) {
|
||||
@@ -1430,6 +1431,24 @@ class Post extends V1
|
||||
'verified' => (bool)$isMerchant,
|
||||
];
|
||||
}
|
||||
// 若为商家用户或以商家身份发布,查询关联门店信息
|
||||
$m = Db::name('fc_merchant')->where('user_id', $row['user_id'])->find();
|
||||
if ($m) {
|
||||
$merchant = [
|
||||
'id' => (int)$m['id'],
|
||||
'name' => (string)$m['name'],
|
||||
'logo' => (string)(isset($m['logo']) ? $m['logo'] : ''),
|
||||
'banner' => (string)(isset($m['banner']) ? $m['banner'] : ''),
|
||||
'address' => (string)(isset($m['address']) ? $m['address'] : ''),
|
||||
'lat' => (isset($m['lat']) && $m['lat'] !== null && $m['lat'] !== '') ? (float)$m['lat'] : null,
|
||||
'lng' => (isset($m['lng']) && $m['lng'] !== null && $m['lng'] !== '') ? (float)$m['lng'] : null,
|
||||
'contact' => (string)(isset($m['contact']) ? $m['contact'] : ''),
|
||||
'category' => (string)(isset($m['category']) ? $m['category'] : ''),
|
||||
'notice' => (string)(isset($m['notice']) ? $m['notice'] : ''),
|
||||
'auditStatus' => (int)$m['audit_status'],
|
||||
'verified' => (int)$m['audit_status'] === 1,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$tags = [];
|
||||
@@ -1476,6 +1495,7 @@ class Post extends V1
|
||||
|
||||
return [
|
||||
'id' => $postId,
|
||||
'userId' => (int)$row['user_id'],
|
||||
'categoryId' => (int)$row['category_id'],
|
||||
'categoryName' => $categoryName,
|
||||
'identityType' => (isset($row['identity_type']) && (int)$row['identity_type'] === 2) ? 'merchant' : 'person',
|
||||
@@ -1499,6 +1519,7 @@ class Post extends V1
|
||||
'createdAt' => $this->iso($row['createtime']),
|
||||
'tags' => $tags,
|
||||
'publisher' => $publisher,
|
||||
'merchant' => $merchant,
|
||||
'commentCount' => (int)$row['comment_count'],
|
||||
'lat' => $lat,
|
||||
'lng' => $lng,
|
||||
|
||||
在新工单中引用
屏蔽一个用户