|
|
@ -78,7 +78,7 @@ func (t *RewardCtl) Reward() { |
|
|
|
UpdatedAt: time.Now(), |
|
|
|
} |
|
|
|
|
|
|
|
if _type == 1 || activity.RehearsalId != 0 { // 彩排或者直播不需要审核
|
|
|
|
if activity.RehearsalId != 0 { // 彩排不需要支付
|
|
|
|
history.Status = 0 |
|
|
|
} |
|
|
|
|
|
|
@ -93,15 +93,20 @@ func (t *RewardCtl) List() { |
|
|
|
uid := t.MustGetUID() |
|
|
|
activityId := t.MustGetInt64("activity_id") |
|
|
|
|
|
|
|
activity := new(models.Activity) |
|
|
|
exist, err := models.GetById(activity, activityId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.Assert(exist, code.MSG_ACTIVITY_NOT_EXIST, "互动不存在") |
|
|
|
|
|
|
|
rs := new(models.RewardServer) |
|
|
|
exist, err := rs.GetByActivityId(activityId) |
|
|
|
exist, err = rs.GetByActivityId(activityId) |
|
|
|
t.CheckErr(err) |
|
|
|
t.Assert(exist, code.MSG_REWARD_NOT_EXIST, "打赏不存在") |
|
|
|
|
|
|
|
// todo: 检查订单
|
|
|
|
t.CheckErr(bully_reward_service.CheckRewardStatus(rs.Id)) |
|
|
|
////// todo: 检查订单
|
|
|
|
//t.CheckErr(bully_reward_service.CheckRewardStatus(rs.Id))
|
|
|
|
|
|
|
|
list, err := bully_reward_service.GetRewardList(uid, rs.Id) |
|
|
|
list, err := bully_reward_service.GetRewardList(uid, activity.RehearsalId, rs.Id) |
|
|
|
t.CheckErr(err) |
|
|
|
t.JSON(map[string]interface{}{ |
|
|
|
"total": len(list), |
|
|
|
xxxxxxxxxx