|
@@ -4,6 +4,7 @@ import (
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
"hongze/hongze_web_mfyx/models"
|
|
|
+ "hongze/hongze_web_mfyx/models/order"
|
|
|
"hongze/hongze_web_mfyx/utils"
|
|
|
"strconv"
|
|
|
"strings"
|
|
@@ -899,11 +900,17 @@ func ActivityArrButtonShow(items []*models.ActivityDetail, user *models.WxUserIt
|
|
|
}
|
|
|
activityPointsByUserAllMap := GetActivityPointsByUserAllMap() // 获取对用户进行研选扣点的活动
|
|
|
|
|
|
- //virtualAssetActivityList ,e := order.GetCygxOrderVirtualAssetActivityList(activityIds, user.Mobile)
|
|
|
- //if e != nil {
|
|
|
- // e = errors.New("GetCygxOrderVirtualAssetActivityList, Err: " + e.Error())
|
|
|
- // return
|
|
|
- //}
|
|
|
+ virtualAssetActivityList, e := order.GetCygxOrderVirtualAssetActivityList(activityIds, user.Mobile) // 获取用户购买的单场活动信息
|
|
|
+ if e != nil {
|
|
|
+ e = errors.New("GetCygxOrderVirtualAssetActivityList, Err: " + e.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ virtualAssetActivityIds := make(map[int]bool)
|
|
|
+ for _, v := range virtualAssetActivityList {
|
|
|
+ virtualAssetActivityIds[v.SourceId] = true
|
|
|
+ }
|
|
|
+ userCardTotal := GetCygxOrderUserCardTotal(user.Mobile) //用户是否持有有效卡片
|
|
|
+
|
|
|
for _, activityDetail := range items {
|
|
|
|
|
|
//IsShowAppointment bool `description:"是否展示预约纪要"`
|
|
@@ -1130,6 +1137,14 @@ func ActivityArrButtonShow(items []*models.ActivityDetail, user *models.WxUserIt
|
|
|
au.HasPermission = 1
|
|
|
}
|
|
|
}
|
|
|
+ if (!v.IsResearchPoints && v.IsLimitPeople == 0) || v.YidongActivityId != "" { //易董的活动 或者(不扣点且不限制人数)走月卡日卡逻辑
|
|
|
+ if userCardTotal > 0 {
|
|
|
+ au.HasPermission = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if virtualAssetActivityIds[v.ActivityId] {
|
|
|
+ au.HasPermission = 1
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 无权限的弹框提示
|