fix(admin): 用户360画像订单归属改用 expert_id IN (本人档案 id),与列表口径一致且避免 id 撞号
这个提交包含在:
@@ -4261,11 +4261,11 @@ export class MysqlRepository {
|
||||
duration_hours as durationHours, amount, location, status, created_at as createdAt
|
||||
FROM orders
|
||||
WHERE buyer_id = ?
|
||||
OR expert_id = ?
|
||||
OR claimed_by = ?
|
||||
OR companion_name IN (SELECT name FROM companions WHERE user_id = ? OR id = ?)
|
||||
OR expert_id IN (SELECT id FROM companions WHERE user_id = ?)
|
||||
OR companion_name IN (SELECT name FROM companions WHERE user_id = ?)
|
||||
ORDER BY created_at DESC
|
||||
`, [id, id, id, id, id]);
|
||||
`, [id, id, id, id]);
|
||||
|
||||
// 资金流水(按 user_id 精确归属)
|
||||
const [financeRecords]: any = await pool.query(`
|
||||
|
||||
在新工单中引用
屏蔽一个用户