push points
This commit is contained in:
parent
d3db08fd15
commit
c7828a5cad
@ -55,6 +55,5 @@ type GetFerrisWheelGameResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type GetFerrisWheelGameResponseData struct {
|
type GetFerrisWheelGameResponseData struct {
|
||||||
Game CustomerGameResponse `json:"game"`
|
Game CustomerGameResponse `json:"game"`
|
||||||
Prizes []CustomerGamePrizeResponse `json:"prizes"`
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -306,8 +306,7 @@ func (p *CustomerPointsProcessor) GetFerrisWheelGameAPI(ctx context.Context) (*m
|
|||||||
Status: "SUCCESS",
|
Status: "SUCCESS",
|
||||||
Message: "Ferris Wheel game retrieved successfully.",
|
Message: "Ferris Wheel game retrieved successfully.",
|
||||||
Data: &models.GetFerrisWheelGameResponseData{
|
Data: &models.GetFerrisWheelGameResponseData{
|
||||||
Game: gameResponse,
|
Game: gameResponse,
|
||||||
Prizes: prizeResponses,
|
|
||||||
},
|
},
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,7 +48,7 @@ func (r *customerPointsRepository) GetCustomerTotalTokens(ctx context.Context, c
|
|||||||
err := r.db.WithContext(ctx).
|
err := r.db.WithContext(ctx).
|
||||||
Model(&entities.CustomerTokens{}).
|
Model(&entities.CustomerTokens{}).
|
||||||
Where("customer_id = ?", customerID).
|
Where("customer_id = ?", customerID).
|
||||||
Select("COALESCE(SUM(tokens), 0)").
|
Select("COALESCE(SUM(balance), 0)").
|
||||||
Scan(&totalTokens).Error
|
Scan(&totalTokens).Error
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user