浏览代码

no message

xingzai 1 年之前
父节点
当前提交
b9b617ff58
共有 2 个文件被更改,包括 10 次插入1 次删除
  1. 3 0
      services/task.go
  2. 7 1
      services/yidong.go

+ 3 - 0
services/task.go

@@ -49,6 +49,9 @@ func Task() {
 		getYiDongActivityMeeting := task.NewTask("getYiDongActivityMeeting", "0 */10 * * * *", GetYiDongActivityMeeting) //同步易董的活动信息
 		task.AddTask("getYiDongActivityMeeting", getYiDongActivityMeeting)
 
+		yiDongSignAppointmentsForThird := task.NewTask("yiDongSignAppointmentsForThird", "0 */10 * * * *", YiDongSignAppointmentsForThird) //会前一小时将,报名信息同步到易董
+		task.AddTask("yiDongSignAppointmentsForThird", yiDongSignAppointmentsForThird)
+
 		//修改任务状
 		updateActivitySattus := task.NewTask("syncTacticsListAddreport", "0 */1 6-23 * * *", UpdateActivitySattus)
 		task.AddTask("updateActivitySattus", updateActivitySattus)

+ 7 - 1
services/yidong.go

@@ -764,6 +764,7 @@ func YiDongSignAppointmentsForThird(cont context.Context) (err error) {
 		return
 	}
 	url := utils.YiDongHuaWeiYunUrl + "app/hz/signAppointmentsForThird"
+	var outCallStatus string
 	for _, v := range activityList {
 		var parsSignUp []interface{}
 		var conditionSignUp string
@@ -779,6 +780,11 @@ func YiDongSignAppointmentsForThird(cont context.Context) (err error) {
 			continue
 		}
 		for _, vS := range listSignUp {
+			if vS.SignupType == 1 {
+				outCallStatus = "1"
+			} else {
+				outCallStatus = "0"
+			}
 			params := SignAppointmentsForThirdParam{
 				ActivityId:        v.YidongActivityIdByCygx,
 				MobileCountryCode: "+" + vS.CountryCode,
@@ -788,7 +794,7 @@ func YiDongSignAppointmentsForThird(cont context.Context) (err error) {
 				PersonName:        vS.RealName,
 				JoinRole:          "2",
 				CompanyName:       vS.CompanyName,
-				OutCallStatus:     "1",
+				OutCallStatus:     outCallStatus,
 			}
 			postData, e := json.Marshal(params)
 			if e != nil {