Browse Source

no message

xingzai 1 year ago
parent
commit
a6b764a250
1 changed files with 3 additions and 0 deletions
  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)