Browse Source

fix:我的日历新增同步上海活动

Roc 2 years ago
parent
commit
ee12b5c514
1 changed files with 9 additions and 1 deletions
  1. 9 1
      controllers/roadshow/calendar.go

+ 9 - 1
controllers/roadshow/calendar.go

@@ -1704,7 +1704,7 @@ func (this *CalendarController) ResearcherCalendarDetail() {
 		this.FailWithMessage("研究员异常!", "研究员异常"+err.Error())
 		return
 	}
-	_ = rs.SyncCalendarFromShanghai(researcherInfo.Mobile, startDate, endDate)
+	go rs.SyncCalendarFromShanghai(researcherInfo.Mobile, startDate, endDate)
 
 	condition += ` AND b.start_date>=?`
 	pars = append(pars, startDate)
@@ -1782,6 +1782,14 @@ func (this *CalendarController) MyCalendarDetail() {
 		roleTypeCode == utils.ROLE_TYPE_CODE_RAI_SELLER {
 		condition += ` AND b.researcher_id=?`
 		pars = append(pars, sysUser.AdminId)
+
+		//同步上海数据
+		researcherInfo, err := admin.GetAdminById(sysUser.AdminId)
+		if err != nil {
+			this.FailWithMessage("研究员异常!", "研究员异常"+err.Error())
+			return
+		}
+		go rs.SyncCalendarFromShanghai(researcherInfo.Mobile, startDate, endDate)
 	}
 
 	//中级/普通/admin 管理员