sync: soul-admin 前端、soul-api 接口逻辑 | 原因: 前端代码修改、后端接口逻辑修改

This commit is contained in:
卡若
2026-03-08 15:40:50 +08:00
parent 4f04c1aaf7
commit 12f7296f06
4 changed files with 520 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ func DBMatchRecordsList(c *gin.Context) {
var byType []TypeCount
db.Model(&model.MatchRecord{}).Select("match_type as match_type, count(*) as count").Group("match_type").Scan(&byType)
var uniqueUsers int64
db.Model(&model.MatchRecord{}).Distinct("user_id").Count(&uniqueUsers)
db.Raw("SELECT COUNT(DISTINCT user_id) FROM match_records WHERE user_id IS NOT NULL AND user_id != ''").Scan(&uniqueUsers)
// 匹配收益product_type=match 且 status=paid 的订单金额总和
var matchRevenue float64