代理后端出版
This commit is contained in:
@@ -46,7 +46,7 @@ router.get('/', agentAuth, async (req, res) => {
|
||||
}
|
||||
|
||||
if (type) {
|
||||
whereConditions.push('t.type = ?');
|
||||
whereConditions.push('t.source_type = ?');
|
||||
queryParams.push(type);
|
||||
}
|
||||
|
||||
@@ -84,10 +84,10 @@ router.get('/', agentAuth, async (req, res) => {
|
||||
t.from_user_id,
|
||||
t.to_user_id,
|
||||
t.amount,
|
||||
t.type,
|
||||
t.source_type,
|
||||
t.status,
|
||||
t.description,
|
||||
t.transaction_id,
|
||||
t.matching_order_id,
|
||||
t.created_at,
|
||||
t.updated_at,
|
||||
u1.username as from_username,
|
||||
@@ -199,10 +199,10 @@ router.get('/:id', agentAuth, async (req, res) => {
|
||||
t.from_user_id,
|
||||
t.to_user_id,
|
||||
t.amount,
|
||||
t.type,
|
||||
t.source_type,
|
||||
t.status,
|
||||
t.description,
|
||||
t.transaction_id,
|
||||
t.matching_order_id,
|
||||
t.created_at,
|
||||
t.updated_at,
|
||||
u1.username as from_username,
|
||||
@@ -334,7 +334,7 @@ router.get('/export/data', agentAuth, async (req, res) => {
|
||||
}
|
||||
|
||||
if (type) {
|
||||
whereConditions.push('t.type = ?');
|
||||
whereConditions.push('t.source_type = ?');
|
||||
queryParams.push(type);
|
||||
}
|
||||
|
||||
@@ -365,10 +365,10 @@ router.get('/export/data', agentAuth, async (req, res) => {
|
||||
SELECT
|
||||
t.id,
|
||||
t.amount,
|
||||
t.type,
|
||||
t.source_type,
|
||||
t.status,
|
||||
t.description,
|
||||
t.transaction_id,
|
||||
t.matching_order_id,
|
||||
t.created_at,
|
||||
u1.username as from_username,
|
||||
u1.real_name as from_real_name,
|
||||
@@ -395,7 +395,7 @@ router.get('/export/data', agentAuth, async (req, res) => {
|
||||
transfer.type || '',
|
||||
transfer.status || '',
|
||||
(transfer.description || '').replace(/,/g, ','), // 替换逗号避免CSV格式问题
|
||||
transfer.transaction_id || '',
|
||||
transfer.matching_order_id || '',
|
||||
transfer.from_real_name || transfer.from_username || '',
|
||||
transfer.from_phone || '',
|
||||
transfer.to_real_name || transfer.to_username || '',
|
||||
|
||||
Reference in New Issue
Block a user