|
@@ -251,7 +251,7 @@ func UpdateSyncRsCalendarRelation(thirdUserCalendar UserCalendar, rsCalendar *Rs
|
|
|
rsCalendarResearcher.EndWeek = utils.StrDateTimeToWeek(currentEndTimer.Weekday().String())
|
|
|
rsCalendarResearcher.Status = 2 // 已接受
|
|
|
rsCalendarResearcher.ModifyTime = time.Now()
|
|
|
- _, tmpErr := tx.Update(rsCalendarResearcher, "StartDate", "EndDate", "StartTime", "EndTime", "StartWeek", "EndWeek","Status", "ModifyTime")
|
|
|
+ _, tmpErr := tx.Update(rsCalendarResearcher, "StartDate", "EndDate", "StartTime", "EndTime", "StartWeek", "EndWeek", "Status", "ModifyTime")
|
|
|
if tmpErr != nil {
|
|
|
err = tmpErr
|
|
|
return
|
|
@@ -355,10 +355,11 @@ func GetRsCalendarResearcherInfoIByResearcherIdAndDate(researcherId int, startDa
|
|
|
//WHERE b.source=1 and a.status=2 and c.calendar_type=1 and a.researcher_id=? and start_date>=? and end_date <= ? `
|
|
|
|
|
|
//杭州创建的路演活动,如果上海被删除了,那么也要同步删除杭州的(所以相对于上面的逻辑,下面移除了来源的where条件)
|
|
|
+ // 需求池1065 同步上海CRM路演信息时,若某路演在我们的CRM中创建,即便在上海CRM中没有查到,也不做删除
|
|
|
sql := `SELECT a.*,c.third_calendar_id,c.calendar_type FROM rs_calendar_researcher a
|
|
|
join rs_calendar b on a.rs_calendar_id=b.rs_calendar_id
|
|
|
join rs_calendar_relation c on a.rs_calendar_researcher_id=c.self_calendar_id
|
|
|
-WHERE a.status=2 and c.calendar_type=1 and a.researcher_id=? and start_date>=? and end_date <= ? `
|
|
|
+WHERE a.status=2 and c.calendar_type=1 AND b.source = 1 and a.researcher_id=? and start_date>=? and end_date <= ? `
|
|
|
_, err = o.Raw(sql, researcherId, startDate, endDate).QueryRows(&items)
|
|
|
return
|
|
|
}
|