Browse Source

Merge branch 'bugfix_6627' into debug

xiziwen 19 hours ago
parent
commit
3684f12c45

+ 5 - 5
controllers/roadshow/calendar.go

@@ -2078,11 +2078,11 @@ func (this *CalendarController) MattersUpdate() {
 		updateParams["matter_content"] = req.MatterContent
 	}
 	req.EditReason = strings.TrimSpace(req.EditReason)
-	if req.EditReason == "" {
-		br.Msg = "请填写修改原因"
-		return
-	}
-	updateParams["edit_reason"] = req.EditReason
+	//if req.EditReason == "" {
+	//	br.Msg = "请填写修改原因"
+	//	return
+	//}
+	//updateParams["edit_reason"] = req.EditReason
 
 	startDateTime := req.StartDate + " " + req.StartTime
 	endDateTime := req.EndDate + " " + req.EndTime

+ 1 - 1
models/roadshow/rs_calendar_api_log.go

@@ -12,7 +12,7 @@ type RsCalendarApiLog struct {
 	Result                 string    `description:"返回参数"`
 	CreateTime             time.Time `description:"创建时间"`
 	Remark                 string    `description:"备注说明"`
-	RsCalendarResearcherId int       `description:"表rs_calendar 主键ID"`
+	RsCalendarResearcherId int       `description:"表rs_calendar_researcher 主键ID"`
 }
 
 // 添加日志记录

+ 7 - 9
services/roadshow/calendar.go

@@ -351,7 +351,13 @@ func postCurl(urlStr string, form url.Values, num int) (body []byte, err error,
 		return
 	}
 	utils.FileLog.Info(fmt.Sprint("post request url:", finalUrl, ";params:", form.Encode(), ";response:", string(body)))
-
+	itemApiLog := new(roadshow.RsCalendarApiLog)
+	itemApiLog.CreateTime = time.Now()
+	itemApiLog.Remark = "post请求上海接口"
+	itemApiLog.Url = urlStr
+	itemApiLog.Body = utils.ReplaceSpaceAndWrap(fmt.Sprint(form))
+	itemApiLog.Result = string(body)
+	go roadshow.AddRsCalendarApiLog(itemApiLog)
 	//如果是token失效,同时只是第一次请求(没有尝试强制刷新token,那么重新请求)
 	if response.Code == 4001 && num <= 0 {
 		//token失效
@@ -366,14 +372,6 @@ func postCurl(urlStr string, form url.Values, num int) (body []byte, err error,
 		err = errors.New(response.Msg)
 		return
 	}
-
-	itemApiLog := new(roadshow.RsCalendarApiLog)
-	itemApiLog.CreateTime = time.Now()
-	itemApiLog.Remark = "post请求上海接口"
-	itemApiLog.Url = urlStr
-	itemApiLog.Body = utils.ReplaceSpaceAndWrap(fmt.Sprint(form))
-	itemApiLog.Result = string(body)
-	go roadshow.AddRsCalendarApiLog(itemApiLog)
 	return
 }