zhibo/test_balance_api.sql

21 lines
506 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 测试余额API - 检查用户余额数据
-- 1. 查看测试用户的余额
SELECT uid, account, nickname, now_money, integral
FROM eb_user
WHERE uid IN (43, 44, 45, 46)
ORDER BY uid;
-- 2. 检查now_money字段是否存在
SHOW COLUMNS FROM eb_user LIKE 'now_money';
-- 3. 给测试用户添加一些余额如果为0
UPDATE eb_user
SET now_money = 1000.00
WHERE uid = 43 AND now_money = 0;
-- 4. 再次查看余额
SELECT uid, account, nickname, now_money
FROM eb_user
WHERE uid = 43;