|
@@ -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
|
|
|
+ }
|
|
|
+ virtualAssetActivityIds := make(map[int]bool)
|
|
|
+ for _, v := range virtualAssetActivityList {
|
|
|
+ virtualAssetActivityIds[v.SourceId] = true
|
|
|
+ }
|
|
|
+ userCardTotal := GetCygxOrderUserCardTotal(user.Mobile)
|
|
|
+
|
|
|
for _, activityDetail := range items {
|
|
|
|
|
|
|
|
@@ -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
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|