xingzai 1 anno fa
parent
commit
54c1630842
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      services/cygx_yanxuan_special_company.go

+ 3 - 0
services/cygx_yanxuan_special_company.go

@@ -67,6 +67,9 @@ func GetStocksFromVmp(cont context.Context) (err error) {
 
 // 记录用户阅读时长
 func AddSpecialRecord(user *models.WxUserItem, specialId, stopTime int) (err error) {
+	if user.UserId == 0 {
+		return
+	}
 	defer func() {
 		if err != nil {
 			go utils.SendAlarmMsg(fmt.Sprint("记录用户阅读时长 失败 AddSpecialRecord Err:"+err.Error(), "userId:", user.UserId, "specialId:", specialId), 2)