Browse Source

季度续费

wangshan 4 years ago
parent
commit
6b2ae78c03
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/jfw/modules/subscribepay/src/util/vrew.go

+ 6 - 1
src/jfw/modules/subscribepay/src/util/vrew.go

@@ -260,11 +260,16 @@ func MergeKws(userId string) {
 	}
 }
 
-//m 月 超过一年传12+n月 如14; endtime 当前周期结束时间戳 int64 ;val -   1:年 2:月
+//m 月 超过一年传12+n月 如14; endtime 当前周期结束时间戳 int64 ;val -   1:年 2:月 3:季度
 func GetDATE(val int, m int, endtime int64) (_endtime time.Time) {
+	//一年12个月
 	if val == 1 {
 		m = m * 12
 	}
+	//一个季度3个月
+	if val == 3 {
+		m = m * 3
+	}
 	endFormat := qutil.FormatDateByInt64(&endtime, qutil.Date_Short_Layout)
 	date_y, _ := strconv.Atoi(strings.Split(endFormat, "-")[0])
 	date_m, _ := strconv.Atoi(strings.Split(endFormat, "-")[1])