ziwen пре 1 година
родитељ
комит
92039562ba
1 измењених фајлова са 13 додато и 2 уклоњено
  1. 13 2
      services/cygx/activity_points_set.go

+ 13 - 2
services/cygx/activity_points_set.go

@@ -100,8 +100,19 @@ func ActivitySpecialCompanyApproval(companyId int) (err error) {
 	if userType == 2{
 		packageTypeMap := map[int]int{1: 16, 2: 10}
 		totalTrip := packageTypeMap[packageType]
-		itemBill.BillDetailed = totalTrip
-		itemBill.Total = strconv.Itoa(totalTrip) + "次"
+		if len(inheritList) > 0 {
+			for _, v := range inheritList {
+				if v.ChartPermissionId == 0 {
+					itemBill.BillDetailed = totalTrip + v.Points
+				} else {
+					itemBill.BillDetailed = totalTrip
+				}
+			}
+		} else {
+			itemBill.BillDetailed = totalTrip
+		}
+
+		itemBill.Total = strconv.Itoa(itemBill.BillDetailed) + "次"
 		if totalTrip == 10 {
 			itemBill.Content = "45w大套餐转正"
 		} else {