|
|
@ -360,14 +360,8 @@ func (t *OrderDrawCtl) ListOfWinners() { |
|
|
|
orderDrawRuleId := t.MustGetInt64("order_draw_rule_id") |
|
|
|
rehearsalId := t.MustGetInt64("rehearsal_id") |
|
|
|
|
|
|
|
result := make([]*WinnerResult, 0) |
|
|
|
err := core.GetXormAuto().Table(new(models.OrderDrawRecord)).Alias("r"). |
|
|
|
Select("r.user_id, u.nickname as username, u.phone as user_phone, u.avatar, r.prize_name"). |
|
|
|
Join("LEFT", new(models.User).Alias("u"), "u.id=r.user_id and u.is_delete=0"). |
|
|
|
Where("r.is_delete=0 and r.order_draw_rule_id=? and r.rehearsal_id=?", |
|
|
|
orderDrawRuleId, rehearsalId).Find(&result) |
|
|
|
result, err := lottery_service.GetOrderWinnersResult(orderDrawRuleId, rehearsalId) |
|
|
|
t.CheckErr(err) |
|
|
|
|
|
|
|
t.JSON(map[string]interface{}{ |
|
|
|
"total": len(result), |
|
|
|
"list": result, |
|
|
|