lrj
1 天以前 93eb6b470773bc49ea6e1a9d4cbd914eb95d525b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.rongyichuang;
 
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.jdbc.core.JdbcTemplate;
 
import java.util.List;
import java.util.Map;
 
@SpringBootTest(classes = RycBackendApplication.class)
public class CheckActivityPlayerRatingTableTest {
 
    @Autowired
    private JdbcTemplate jdbcTemplate;
 
    @Test
    public void checkTableStructure() {
        try {
            String sql1 = "DESCRIBE t_activity_player_rating";
            List<Map<String, Object>> result1 = jdbcTemplate.queryForList(sql1);
            
            System.out.println("=== t_activity_player_rating 表结构 ===");
            for (Map<String, Object> row : result1) {
                System.out.println("Field: " + row.get("Field") + 
                                 ", Type: " + row.get("Type") + 
                                 ", Null: " + row.get("Null") + 
                                 ", Key: " + row.get("Key") + 
                                 ", Default: " + row.get("Default"));
            }
            
            System.out.println("\n=== t_activity_player_rating_item 表结构 ===");
            String sql2 = "DESCRIBE t_activity_player_rating_item";
            List<Map<String, Object>> result2 = jdbcTemplate.queryForList(sql2);
            
            for (Map<String, Object> row : result2) {
                System.out.println("Field: " + row.get("Field") + 
                                 ", Type: " + row.get("Type") + 
                                 ", Null: " + row.get("Null") + 
                                 ", Key: " + row.get("Key") + 
                                 ", Default: " + row.get("Default"));
            }
        } catch (Exception e) {
            System.err.println("检查表结构失败: " + e.getMessage());
            e.printStackTrace();
        }
    }
}