|
@@ -170,6 +170,7 @@ func (this *MyChartController) Collect(c *gin.Context) {
|
|
exists.ReportID = req.ReportId
|
|
exists.ReportID = req.ReportId
|
|
exists.ReportChapterID = req.ReportChapterId
|
|
exists.ReportChapterID = req.ReportChapterId
|
|
exists.ModifyTime = nowTime
|
|
exists.ModifyTime = nowTime
|
|
|
|
+ exists.Source = chartInfo.Source
|
|
updateCols := []string{"ChartName", "ChartImage", "ReportID", "ReportChapterID", "ModifyTime"}
|
|
updateCols := []string{"ChartName", "ChartImage", "ReportID", "ReportChapterID", "ModifyTime"}
|
|
if e = exists.Update(updateCols); e != nil {
|
|
if e = exists.Update(updateCols); e != nil {
|
|
response.FailMsg("操作失败", "更新收藏失败, Err: "+e.Error(), c)
|
|
response.FailMsg("操作失败", "更新收藏失败, Err: "+e.Error(), c)
|
|
@@ -210,6 +211,7 @@ func (this *MyChartController) Collect(c *gin.Context) {
|
|
ob.ReportChapterID = req.ReportChapterId
|
|
ob.ReportChapterID = req.ReportChapterId
|
|
ob.CreateTime = nowTime
|
|
ob.CreateTime = nowTime
|
|
ob.ModifyTime = nowTime
|
|
ob.ModifyTime = nowTime
|
|
|
|
+ ob.Source = chartInfo.Source
|
|
if e = ob.Create(); e != nil {
|
|
if e = ob.Create(); e != nil {
|
|
response.FailMsg("操作失败", "新增收藏失败, Err: "+e.Error(), c)
|
|
response.FailMsg("操作失败", "新增收藏失败, Err: "+e.Error(), c)
|
|
return
|
|
return
|