瀏覽代碼

Merge branch 'mfyx_3.6' of http://8.136.199.33:3000/cxzhang/hongze_web_mfyx into debug

xingzai 7 月之前
父節點
當前提交
64d6714d51
共有 1 個文件被更改,包括 11 次插入4 次删除
  1. 11 4
      services/order.go

+ 11 - 4
services/order.go

@@ -196,17 +196,24 @@ func GetActivityVivoPoints(item *models.ActivityDetail, wxUser *models.WxUserIte
 	vivoPointsResp.CompanyPoints = fmt.Sprint(companyPointsNum)
 	vivoPointsResp.CompanyPoints = fmt.Sprint(companyPointsNum)
 
 
 	if havePower {
 	if havePower {
-		if companyPointsNum >= vivoPointsSetDetail.PointsNum {
-			vivoPointsResp.PointPermission = 1
+		if vivoPointsSetDetail.PointsNum == 0 { //有权限情况下,点数为零的时候直接播放
+			vivoPointsResp.HavePoint = true
+		}
+		if companyPointsNum > 0 {
+			if companyPointsNum >= vivoPointsSetDetail.PointsNum {
+				vivoPointsResp.PointPermission = 1
+			} else {
+				vivoPointsResp.PointPermission = 2
+			}
 		} else {
 		} else {
-			vivoPointsResp.PointPermission = 2
+			//客户剩余点数为0的情况下,直接支付
+			vivoPointsResp.PointPermission = 3
 		}
 		}
 	} else {
 	} else {
 		if vivoPointsSetDetail.GoodsMoney > 0 {
 		if vivoPointsSetDetail.GoodsMoney > 0 {
 			vivoPointsResp.PointPermission = 3
 			vivoPointsResp.PointPermission = 3
 		}
 		}
 	}
 	}
-
 	return
 	return
 }
 }