修复编译问题和版本兼容问题
This commit is contained in:
@@ -100,7 +100,7 @@ func (r *OrderRepository) UpdateStatus(ctx context.Context, orderNo string, stat
|
||||
Where("order_no = ?", orderNo).Updates(updates).Error
|
||||
}
|
||||
|
||||
func (r *OrderRepository) GetStatistics(ctx context.Context) (totalUsers, totalOrders, todayOrders int32, todayRevenue float64, pendingOrders int32, err error) {
|
||||
func (r *OrderRepository) GetStatistics(ctx context.Context) (totalUsers, totalOrders, todayOrders int64, todayRevenue float64, pendingOrders int64, err error) {
|
||||
// 总用户数
|
||||
if err = r.db.WithContext(ctx).Model(&model.User{}).Count(&totalUsers).Error; err != nil {
|
||||
return 0, 0, 0, 0, 0, fmt.Errorf("count users failed: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user