Browse Source

no message

xingzai 1 year ago
parent
commit
53182982a7
2 changed files with 9 additions and 3 deletions
  1. 8 2
      services/cygx_yanxuan_special_company.go
  2. 1 1
      services/task.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

+ 1 - 1
services/task.go

@@ -35,7 +35,7 @@ func Task() {
 		getChartListByApi := task.NewTask("getChartListByApi", "0 */10 * * * *", GetChartDetailByChartId) //同步图表
 		task.AddTask("getChartListByApi", getChartListByApi)
 
-		getYiDongActivityMeeting := task.NewTask("getYiDongActivityMeeting", "0 */60 * * * *", GetYiDongActivityMeeting) //同步易董的活动信息
+		getYiDongActivityMeeting := task.NewTask("getYiDongActivityMeeting", "0 */60 * * * *", GetYiDongActivityMeeting) //同步易董的活动到会信息
 		task.AddTask("getYiDongActivityMeeting", getYiDongActivityMeeting)
 
 		yiDongSignAppointmentsForThird := task.NewTask("yiDongSignAppointmentsForThird", "0 */10 * * * *", YiDongSignAppointmentsForThird) //会前一小时将,报名信息同步到易董