提交
This commit is contained in:
@@ -170,7 +170,8 @@ router.get('/directly_operated', agentAuth, async (req, res) => {
|
||||
// 构建查询条件
|
||||
let whereConditions = ['u.inviter = ?'];
|
||||
let queryParams = [agentId];
|
||||
|
||||
whereConditions.push('u.user_type = ?')
|
||||
queryParams.push('directly_operated');
|
||||
// 添加搜索条件
|
||||
if (search) {
|
||||
whereConditions.push('(u.username LIKE ? OR u.real_name LIKE ? OR u.phone LIKE ?)');
|
||||
@@ -324,7 +325,7 @@ router.post('/withdraw', agentAuth, async (req, res) => {
|
||||
WHERE id = ?`, [amount, userId])
|
||||
await db.execute(
|
||||
'INSERT INTO transfers (from_user_id, to_user_id, transfer_type,status,amount,description,source_type) VALUES (?, ?, ?,?,?,?,?)',
|
||||
[agentId, userId, 'agent_to_operated', 'received', amount, '直营商户提现', 'agent']
|
||||
[agentId, userId, 'agent_to_operated', 'received', amount, '直营商户提现', 'withdraw']
|
||||
);
|
||||
// 提交事务
|
||||
await db.query('COMMIT');
|
||||
|
||||
Reference in New Issue
Block a user