浏览代码

fix:代用户下单记录赠送时长是否生效

duxin 9 月之前
父节点
当前提交
27c02d43f7
共有 1 个文件被更改,包括 18 次插入18 次删除
  1. 18 18
      src/jfw/modules/subscribepay/src/service/salesCreateOrder.go

+ 18 - 18
src/jfw/modules/subscribepay/src/service/salesCreateOrder.go

@@ -120,25 +120,25 @@ func (this *SalesCreateOrder) CreateBySeller() {
 			saleDep = qutil.ObjToString(sellData["ts"])
 			deptId = qutil.IntAll(sellData["ti"])
 			var isSend bool
-			if inserMap.VipEndTime != "" {
-				tm := qutil.InterfaceToStr(data["time"])
-				switch { //大于一年才赠送
-				case strings.Contains(tm, "年"):
-					dateStr := strings.Replace(tm, "年", "", -1)
-					if qutil.IntAll(dateStr) >= 1 {
-						isSend = true
-					}
-				case strings.Contains(tm, "季"):
-					dateStr := strings.Replace(tm, "季", "", -1)
-					if qutil.IntAll(dateStr) >= 4 {
-						isSend = true
-					}
-				case strings.Contains(tm, "月"):
-					dateStr := strings.Replace(tm, "月", "", -1)
-					if qutil.IntAll(dateStr) >= 12 {
-						isSend = true
-					}
+			tm := qutil.InterfaceToStr(data["time"])
+			switch { //大于一年才赠送
+			case strings.Contains(tm, "年"):
+				dateStr := strings.Replace(tm, "年", "", -1)
+				if qutil.IntAll(dateStr) >= 1 {
+					isSend = true
 				}
+			case strings.Contains(tm, "季"):
+				dateStr := strings.Replace(tm, "季", "", -1)
+				if qutil.IntAll(dateStr) >= 4 {
+					isSend = true
+				}
+			case strings.Contains(tm, "月"):
+				dateStr := strings.Replace(tm, "月", "", -1)
+				if qutil.IntAll(dateStr) >= 12 {
+					isSend = true
+				}
+			}
+			if inserMap.VipEndTime != "" {
 				endTime, _ := time.ParseInLocation(Date_Full_Layout, inserMap.VipEndTime, time.Local)
 				if isSend {
 					if tt == 1 {