Browse Source

文档管理-bug修复

gmy 6 months ago
parent
commit
fd5125709b
2 changed files with 4 additions and 8 deletions
  1. 1 1
      models/report.go
  2. 3 7
      services/document_manage_service/document_manage_service.go

+ 1 - 1
models/report.go

@@ -101,7 +101,7 @@ type ReportList struct {
 	Author             string                    `description:"作者"`
 	Frequency          string                    `description:"频度"`
 	CreateTime         string                    `description:"创建时间"`
-	ModifyTime         time.Time                 `description:"修改时间"`
+	ModifyTime         string                    `description:"修改时间"`
 	State              int                       `description:"1:未发布;2:已发布;3-待提交;4-待审批;5-已驳回;6-已通过"`
 	PublishTime        string                    `description:"发布时间"`
 	PrePublishTime     string                    `description:"预发布时间"`

+ 3 - 7
services/document_manage_service/document_manage_service.go

@@ -152,7 +152,7 @@ func DocumentReportList(documentType int, chartPermissionIdList []string, classi
 		}
 	}
 	if keyword != "" {
-		condition += ` and t1.title like ? or t1.sys_user_name like ?`
+		condition += ` and (t1.title like ? or t1.sys_user_name like ?) `
 		pars = append(pars, "%"+keyword+"%", "%"+keyword+"%")
 	}
 
@@ -259,11 +259,6 @@ func RuiSiReportList(classifyIdFirst, classifyIdSecond, classifyIdThird int, key
 		return nil, err
 	}
 
-	for _, report := range reportList {
-		// 格式换时间格式
-		report.ModifyTime = report.ModifyTime.UTC()
-	}
-
 	reportPage.Paging = page
 	reportPage.List = reportList
 
@@ -280,6 +275,7 @@ func DocumentRuiSiDetail(reportId int) (*models.ReportDetail, error) {
 		}
 		return nil, err
 	}
+	reportDetail.Content = html.UnescapeString(reportDetail.Content)
 
 	return reportDetail, nil
 }
@@ -345,7 +341,7 @@ func DocumentReportDetail(outsideReportId int) (*document_manage_model.OutsideRe
 		Abstract:        outsideReport.Abstract,
 		ClassifyId:      outsideReport.ClassifyId,
 		ClassifyName:    outsideReport.ClassifyName,
-		Content:         html.EscapeString(outsideReport.Content),
+		Content:         html.UnescapeString(outsideReport.Content),
 		SysUserId:       outsideReport.SysUserId,
 		SysUserName:     outsideReport.SysUserName,
 		CreateTime:      outsideReport.CreateTime,