|
|
@ -73,8 +73,8 @@ func (t *ShakeRedEnvelopeRecord) UpdateById(id int64, field ...string) (int64, e |
|
|
|
func GetRedEnvelopesByUserId(userId, activityId, rehearsalId int64) ([]*ShakeRedEnvelopeRecord, error) { |
|
|
|
records := make([]*ShakeRedEnvelopeRecord, 0) |
|
|
|
err := core.GetXormAuto().Where("user_id=? and rehearsal_id=? and activity_id=? and "+ |
|
|
|
"is_delete=0 and is_draw<>-1", rehearsalId, activityId, userId). |
|
|
|
Desc("created_at").Find(&records) |
|
|
|
"is_delete=0 and is_draw<>-1", userId, rehearsalId, activityId).Desc("created_at"). |
|
|
|
Find(&records) |
|
|
|
for index := range records { |
|
|
|
records[index].IsValid = true |
|
|
|
} |
|
|
|