|
@@ -77,11 +77,20 @@ type PermissionDTO struct {
|
|
|
|
|
|
func GetGetReportById(reportId int) (ReportDTO ReportDTO, err error) {
|
|
|
report, err := reportDao.GetReportById(reportId)
|
|
|
- if err == nil {
|
|
|
- ReportDTO = convertReportDTO(report)
|
|
|
+ if err != nil {
|
|
|
+ return
|
|
|
}
|
|
|
+ orgId := report.OrgID
|
|
|
+ names, _ := reportDao.GetAuthorByOrgId(orgId)
|
|
|
+ if names != nil && len(names) > 1 {
|
|
|
+ names = stringUtils.UniqueItems(names)
|
|
|
+ report.Author = strings.Join(names, ",")
|
|
|
+ }
|
|
|
+ report.PublishedTime = report.PublishedTime[:10]
|
|
|
+ ReportDTO = convertReportDTO(report)
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
func GetTotalPageCount() (total int64) {
|
|
|
return reportDao.GetTotalPageCount()
|
|
|
}
|