|
@@ -123,21 +123,22 @@ func (this *SalesCreateOrder) CreateBySeller() {
|
|
|
tm := qutil.InterfaceToStr(data["time"])
|
|
|
switch { //大于一年才赠送
|
|
|
case strings.Contains(tm, "年"):
|
|
|
- dateStr := strings.Replace(tm, "年", "", -1)
|
|
|
+ dateStr := strings.ReplaceAll(tm, "年", "")
|
|
|
if qutil.IntAll(dateStr) >= 1 {
|
|
|
isSend = true
|
|
|
}
|
|
|
case strings.Contains(tm, "季"):
|
|
|
- dateStr := strings.Replace(tm, "季", "", -1)
|
|
|
+ dateStr := strings.ReplaceAll(tm, "季", "")
|
|
|
if qutil.IntAll(dateStr) >= 4 {
|
|
|
isSend = true
|
|
|
}
|
|
|
case strings.Contains(tm, "月"):
|
|
|
- dateStr := strings.Replace(tm, "月", "", -1)
|
|
|
+ dateStr := strings.ReplaceAll(tm, "月", "")
|
|
|
if qutil.IntAll(dateStr) >= 12 {
|
|
|
isSend = true
|
|
|
}
|
|
|
}
|
|
|
+ log.Println("待用户购买时长,", tm, isSend)
|
|
|
if inserMap.VipEndTime != "" {
|
|
|
endTime, _ := time.ParseInLocation(Date_Full_Layout, inserMap.VipEndTime, time.Local)
|
|
|
if isSend {
|