|
@@ -160,6 +160,7 @@ func (this *MyChartController) Collect(c *gin.Context) {
|
|
|
return
|
|
|
}
|
|
|
nowTime := time.Now().Local()
|
|
|
+ collectId := 0
|
|
|
if exists != nil && exists.MyChartID > 0 {
|
|
|
// 更新收藏信息
|
|
|
exists.ChartName = chartInfo.ChartName
|
|
@@ -172,6 +173,7 @@ func (this *MyChartController) Collect(c *gin.Context) {
|
|
|
response.FailMsg("操作失败", "更新收藏失败, Err: "+e.Error(), c)
|
|
|
return
|
|
|
}
|
|
|
+ collectId = exists.MyChartID
|
|
|
} else {
|
|
|
// 新增收藏
|
|
|
ob.ChartInfoID = chartInfo.ChartInfoId
|
|
@@ -187,8 +189,9 @@ func (this *MyChartController) Collect(c *gin.Context) {
|
|
|
response.FailMsg("操作失败", "新增收藏失败, Err: "+e.Error(), c)
|
|
|
return
|
|
|
}
|
|
|
+ collectId = ob.MyChartID
|
|
|
}
|
|
|
- response.Ok("操作成功", c)
|
|
|
+ response.OkData("操作成功", collectId, c)
|
|
|
}
|
|
|
|
|
|
// 取消收藏 CollectCancel
|