Browse Source

no message

xingzai 1 năm trước cách đây
mục cha
commit
3f3099d49c
1 tập tin đã thay đổi với 8 bổ sung2 xóa
  1. 8 2
      services/cygx_yanxuan_special_company.go

+ 8 - 2
services/cygx_yanxuan_special_company.go

@@ -93,6 +93,12 @@ func AddSpecialRecord(user *models.WxUserItem, specialId, stopTime int) (err err
 			return
 		}
 
+		detail, e := models.GetYanxuanSpecialBySpecialId(specialId)
+		if e != nil {
+			err = errors.New("GetYanxuanSpecialBySpecialId, Err: " + e.Error())
+			return
+		}
+
 		item := new(models.CygxYanxuanSpecialRecord)
 		item.UserId = user.UserId
 		item.Mobile = user.Mobile
@@ -122,7 +128,7 @@ func AddSpecialRecord(user *models.WxUserItem, specialId, stopTime int) (err err
 			}
 
 			//专栏作者Pv数量进行加一
-			e = models.UpdateCygxYanxuanSpecialAuthorPv(user.UserId)
+			e = models.UpdateCygxYanxuanSpecialAuthorPv(detail.UserId)
 			if e != nil {
 				err = errors.New("UpdateCygxYanxuanSpecialAuthorPv, Err: " + e.Error())
 				return
@@ -137,7 +143,7 @@ func AddSpecialRecord(user *models.WxUserItem, specialId, stopTime int) (err err
 				}
 
 				//专栏作者Uv数量进行加一
-				e = models.UpdateCygxYanxuanSpecialAuthorUv(user.UserId)
+				e = models.UpdateCygxYanxuanSpecialAuthorUv(detail.UserId)
 				if e != nil {
 					err = errors.New("UpdateCygxYanxuanSpecialAuthorUv, Err: " + e.Error())
 					return