|
@@ -215,8 +215,16 @@ func GetYiDongActivity(cont context.Context) (err error) {
|
|
|
utils.FileLog.Info(err.Error())
|
|
|
return
|
|
|
}
|
|
|
- fmt.Println(body)
|
|
|
- utils.FileLog.Info(string(body))
|
|
|
+
|
|
|
+ //添加请求日志记录
|
|
|
+ itemApiLog := new(models.CygxThreeApiLog)
|
|
|
+ itemApiLog.CreateTime = time.Now()
|
|
|
+ itemApiLog.Source = 1
|
|
|
+ itemApiLog.Url = url
|
|
|
+ itemApiLog.Body = utils.ReplaceSpaceAndWrap(fmt.Sprint(payload))
|
|
|
+ itemApiLog.Result = string(body)
|
|
|
+ go models.AddCygxThreeApiLog(itemApiLog)
|
|
|
+
|
|
|
err = json.Unmarshal(body, &ApifoxModal)
|
|
|
if err != nil {
|
|
|
fmt.Println("Getres.PublicGetDate Err:", err.Error())
|
|
@@ -227,6 +235,7 @@ func GetYiDongActivity(cont context.Context) (err error) {
|
|
|
if err != nil {
|
|
|
fmt.Println(err)
|
|
|
utils.FileLog.Info(string(err.Error()))
|
|
|
+ return
|
|
|
}
|
|
|
mapOldYiDong := make(map[string]string)
|
|
|
mapOldYiDongBody := make(map[string]string)
|
|
@@ -234,7 +243,6 @@ func GetYiDongActivity(cont context.Context) (err error) {
|
|
|
mapOldYiDong[v.YidongActivityId] = v.YidongActivityId
|
|
|
mapOldYiDongBody[v.YidongActivityId] = fmt.Sprint(v.ActivityName, v.Label, v.ChartPermissionId, v.ActivityTime, v.YidongActivityEndTime, v.DistinguishedGuest)
|
|
|
}
|
|
|
- fmt.Println(mapOldYiDongBody)
|
|
|
var itemsAdd []*models.CygxActivity
|
|
|
if len(ApifoxModal.Result) > 0 {
|
|
|
actList := ApifoxModal.Result
|
|
@@ -273,6 +281,7 @@ func GetYiDongActivity(cont context.Context) (err error) {
|
|
|
if err != nil {
|
|
|
fmt.Println(err)
|
|
|
utils.FileLog.Info(string(err.Error()))
|
|
|
+ return err
|
|
|
}
|
|
|
|
|
|
//把公司名称当做标的 对活动进行产业标的的关联
|
|
@@ -280,9 +289,6 @@ func GetYiDongActivity(cont context.Context) (err error) {
|
|
|
} else {
|
|
|
//如果内容主体有做变更,就修改内容
|
|
|
if mapOldYiDongBody[v.ID] != fmt.Sprint(item.ActivityName, item.Label, item.ChartPermissionId, item.ActivityTime, item.YidongActivityEndTime, item.DistinguishedGuest) {
|
|
|
- //fmt.Println("修改")
|
|
|
- //fmt.Println(mapOldYiDongBody[v.ID])
|
|
|
- //fmt.Println(fmt.Sprint(item.ActivityName, item.Label, item.ChartPermissionId, item.ActivityTime, item.DistinguishedGuest))
|
|
|
updateParams := make(map[string]interface{})
|
|
|
updateParams["ActivityName"] = item.ActivityName
|
|
|
updateParams["Label"] = item.Label
|
|
@@ -344,7 +350,16 @@ func GetYiDongActivityDetail(activityId string) (detail *models.ApifoxModaldetai
|
|
|
utils.FileLog.Info(err.Error())
|
|
|
return
|
|
|
}
|
|
|
- utils.FileLog.Info(string(body))
|
|
|
+
|
|
|
+ //添加请求日志记录
|
|
|
+ //itemApiLog := new(models.CygxThreeApiLog)
|
|
|
+ //itemApiLog.CreateTime = time.Now()
|
|
|
+ //itemApiLog.Source = 1
|
|
|
+ //itemApiLog.Url = url
|
|
|
+ //itemApiLog.Body = utils.ReplaceSpaceAndWrap(fmt.Sprint(payload))
|
|
|
+ //itemApiLog.Result = string(body)
|
|
|
+ //go models.AddCygxThreeApiLog(itemApiLog)
|
|
|
+
|
|
|
err = json.Unmarshal(body, &ApifoxModal)
|
|
|
if err != nil {
|
|
|
fmt.Println("Getres.PublicGetDate Err:", err.Error())
|
|
@@ -395,8 +410,6 @@ func GetYiDongCreateUserInfo(user *models.WxUserItem) (userTgc string, err error
|
|
|
utils.FileLog.Info(err.Error())
|
|
|
return
|
|
|
}
|
|
|
- utils.FileLog.Info(string(body))
|
|
|
- fmt.Println(string(body))
|
|
|
err = json.Unmarshal(body, &ApifoxModal)
|
|
|
if err != nil {
|
|
|
fmt.Println("Getres.PublicGetDate Err:", err.Error())
|
|
@@ -464,7 +477,6 @@ func GetYiDongActivityMeeting(cont context.Context) (err error) {
|
|
|
fmt.Println("GetActivityListByYidong Err:", err.Error())
|
|
|
return err
|
|
|
}
|
|
|
- fmt.Println(artivityListYidong)
|
|
|
//return err
|
|
|
if len(artivityListYidong) == 0 {
|
|
|
return err
|
|
@@ -579,7 +591,6 @@ func YidongActivityGroup(subjectName string, activityId int) (err error) {
|
|
|
subjectActivityItems = append(subjectActivityItems, subjectActivityItem)
|
|
|
mapSubjectName[v.SubjectName] = v.SubjectName
|
|
|
}
|
|
|
- fmt.Println(v)
|
|
|
}
|
|
|
err = models.AddCygxActiuvityGroupMulti(industrialActivityItems, subjectActivityItems)
|
|
|
if err != nil {
|