Browse Source

3.1收藏

kobe6258 3 months ago
parent
commit
336c9c308f

+ 41 - 9
common/component/es/es.go

@@ -36,15 +36,15 @@ const (
 	MatchAll = "match_all"
 	Match    = "match"
 
-	CountWithDocIds            = "count_with_doc_ids"
-	Range                      = "range"
-	MatchAllByCondition        = "match_all_by_condition"
-	RangeByCondition           = "range_by_condition"
-	RangeByConditionWithDocIds = "range_by_condition_with_doc_ids"
-
-	RangeWithDocIds = "range_with_doc_ids"
-	LimitByScore    = "limit_by_score"
-	HomeSearch      = "home_search"
+	CountWithDocIds                   = "count_with_doc_ids"
+	Range                             = "range"
+	MatchAllByCondition               = "match_all_by_condition"
+	RangeByCondition                  = "range_by_condition"
+	RangeByConditionWithDocIds        = "range_by_condition_with_doc_ids"
+	RangeByConditionWithDocIdsNoLimit = "range_by_condition_with_doc_ids_no_limit"
+	RangeWithDocIds                   = "range_with_doc_ids"
+	LimitByScore                      = "limit_by_score"
+	HomeSearch                        = "home_search"
 )
 
 func GetInstance() *ESClient {
@@ -426,6 +426,38 @@ func (req *ESQueryRequest) parseJsonQuery() (queryMap map[string]interface{}) {
 			},
 		}
 		return
+	case RangeByConditionWithDocIdsNoLimit:
+		queryMap = map[string]interface{}{
+			"query": map[string]interface{}{
+				"match": map[string]interface{}{
+					req.Column: req.Key,
+				},
+			},
+			"highlight": map[string]interface{}{
+				"fields": map[string]interface{}{
+					req.Column: map[string]interface{}{},
+				},
+				"pre_tags":  []string{"<span style='color:#0078E8'>"},
+				"post_tags": []string{"</span>"},
+			},
+			"post_filter": map[string]interface{}{
+				"bool": map[string]interface{}{
+					"must": []map[string]interface{}{
+						{
+							"term": map[string]interface{}{
+								req.Condition: req.ConditionValue,
+							},
+						},
+						{
+							"terms": map[string]interface{}{
+								"_id": req.DocIds,
+							},
+						},
+					},
+				},
+			},
+		}
+		return
 	case LimitByScore:
 		queryMap = map[string]interface{}{
 			"query": map[string]interface{}{

+ 62 - 92
controllers/user/bookmark_controller.go

@@ -1,7 +1,6 @@
 package user
 
 import (
-	"encoding/json"
 	"errors"
 	"eta/eta_mini_ht_api/common/component/cache"
 	logger "eta/eta_mini_ht_api/common/component/log"
@@ -223,45 +222,60 @@ type BookMarkListReq struct {
 	SourceType string `json:"source_type"`
 }
 
-type BookMarkChart struct {
-	ChartName   string `json:"chartName"`
-	ChartImage  string `json:"chartImage"`
-	UniqueCode  string `json:"uniqueCode"`
-	ChartInfoId int    `json:"chartInfoId"`
-}
-
-type BookMarkReport struct {
-	Type             string                `json:"type"`
-	ReportID         int                   `json:"reportId"`
-	OrgId            int                   `json:"orgId"`
-	Title            string                `json:"title"`
-	Author           string                `json:"author"`
-	AuthorInfo       []reportDomian.Anthor `json:"authorInfo"`
-	Source           string                `json:"source"`
-	Abstract         string                `json:"abstract"`
-	PublishedTime    string                `json:"publishedTime"`
-	RiskLevel        string                `json:"riskLevel"`
-	PlateName        string                `json:"-"`
-	ClassifyId       int                   `json:"-"`
-	SecondPermission map[int]string        `json:"-"`
-	Permissions      map[int]string        `json:"-"`
-	PermissionNames  interface {
-	} `json:"permissionNames"`
-	Highlight       []string        `json:"highlight"`
-	Detail          json.RawMessage `json:"detail"`
-	PdfUrl          string          `json:"pdfUrl"`
-	CoverSrc        int             `json:"coverSrc"`
-	CoverUrl        string          `json:"coverUrl"`
-	Login           bool            `json:"login"`
-	RiskLevelStatus string          `json:"riskLevelStatus"`
-	IsFree          bool            `json:"isFree"`
-	IsSubscribe     bool            `json:"isSubscribe"`
-	SubscribeStatus string          `json:"subscribeStatus"`
-	Price           string          `json:"price"`
-	ProductId       int             `json:"productId"`
-	IsPackage       bool            `json:"isPackage"`
-	Score           float64         `json:"score"`
-	Show            bool            `json:"-"`
+// SearchBookMark 获取收藏列表
+// @Description 获取收藏列表
+// @Success 200 {object}
+// @router /searchBookMark [get]
+func (bk *BookMarkController) SearchBookMark(sourceType string, key string) {
+	controllers.Wrap(&bk.BaseController, func() (result *controllers.WrapData, err error) {
+		result = bk.InitWrapData("分页搜索收藏列表失败")
+		pageRes := page.Page{
+			Current:  bk.PageInfo.Current,
+			PageSize: bk.PageInfo.PageSize,
+		}
+		if sourceType == "" || (sourceType != Report && sourceType != Chart) {
+			err = exception.New(exception.IllegalSourceType)
+			bk.FailedResult("分页搜索收藏列表失败", result)
+			return
+		}
+		userInfo := bk.Data["user"].(user.User)
+		var sourceIds []int
+		pageRes.Total, sourceIds, err = user.GetTotalBookMarkPageBySourceType(userInfo.Id, sourceType)
+		//隐藏品种信息未设置风险等级的报告
+		if sourceType == Report {
+			pageRes.Total, sourceIds, err = report.FilterReportIds(sourceIds)
+		}
+		if pageRes.Total == 0 {
+			bookMarks := new(page.PageResult)
+			bookMarks.Data = []interface{}{}
+			bookMarks.Page = pageRes
+			bk.SuccessResult("分页搜索收藏列表列表成功", bookMarks, result)
+			return
+		}
+		pageRes.Total = bk.PageInfo.Total
+		pageRes.TotalPage = page.TotalPages(pageRes.Total, pageRes.PageSize)
+		var bookMarkList userService.BookMarkInterface
+		bookMarkList, err = user.SearchBookMark(key, sourceType, sourceIds, bk.PageInfo, userInfo.Id)
+		switch sourceType {
+		case Chart:
+			var list []userService.BookMarkChart
+			list, err = getChartList(bk.PageInfo, userInfo.Id)
+			if err != nil {
+				err = exception.NewWithException(exception.GetBookMarkListFailed, err.Error())
+				bk.FailedResult("分页查询收藏列表失败", result)
+				return
+			}
+			bookMarks := new(page.PageResult)
+			bookMarks.Data = list
+			bookMarks.Page = pageRes
+			bk.SuccessResult("分页查询收藏列表成功", bookMarks, result)
+			return
+		default:
+			err = exception.New(exception.IllegalSourceType)
+			bk.FailedResult("分页查询收藏列表失败", result)
+			return
+		}
+	})
 }
 
 // BookMarkList 获取收藏列表
@@ -298,7 +312,7 @@ func (bk *BookMarkController) BookMarkList(sourceType string) {
 		pageRes.TotalPage = page.TotalPages(pageRes.Total, pageRes.PageSize)
 		switch sourceType {
 		case Report:
-			var list []BookMarkReport
+			var list []userService.BookMarkReport
 			list, err = getReportList(bk.PageInfo, userInfo.Id, sourceIds)
 			if err != nil {
 				err = exception.NewWithException(exception.GetBookMarkListFailed, err.Error())
@@ -311,7 +325,7 @@ func (bk *BookMarkController) BookMarkList(sourceType string) {
 			bk.SuccessResult("分页查询收藏列表成功", bookMarks, result)
 			return
 		case Chart:
-			var list []BookMarkChart
+			var list []userService.BookMarkChart
 			list, err = getChartList(bk.PageInfo, userInfo.Id)
 			if err != nil {
 				err = exception.NewWithException(exception.GetBookMarkListFailed, err.Error())
@@ -331,7 +345,7 @@ func (bk *BookMarkController) BookMarkList(sourceType string) {
 	})
 }
 
-func getReportList(info page.PageInfo, templateUserId int, sourceIds []int) (list []BookMarkReport, err error) {
+func getReportList(info page.PageInfo, templateUserId int, sourceIds []int) (list []userService.BookMarkReport, err error) {
 	sourceIds, err = userService.GetBookMarkPageRangeBySourceType(templateUserId, info, Report, sourceIds)
 	if err != nil {
 		return
@@ -361,12 +375,12 @@ func getReportList(info page.PageInfo, templateUserId int, sourceIds []int) (lis
 	if err != nil {
 		return nil, err
 	}
-	list = make([]BookMarkReport, len(sourceIds))
+	list = make([]userService.BookMarkReport, len(sourceIds))
 	// 并发获取数据
 	for index, sourceId := range sourceIds {
 		for _, reportDTO := range reports {
 			if reportDTO.ReportID == sourceId {
-				reportInfo := convertToBookMarkReport(reportDTO)
+				reportInfo := userService.ConvertToBookMarkReport(reportDTO)
 				list[index] = reportInfo
 			}
 		}
@@ -374,13 +388,13 @@ func getReportList(info page.PageInfo, templateUserId int, sourceIds []int) (lis
 	return
 }
 
-func getChartList(info page.PageInfo, templateUserId int) (list []BookMarkChart, err error) {
+func getChartList(info page.PageInfo, templateUserId int) (list []userService.BookMarkChart, err error) {
 	sourceIds, err := userService.GetBookMarkPageBySourceType(templateUserId, info, Chart)
 	if err != nil {
 		return
 	}
 	// 创建一个切片来存储结果,长度与 sourceIds 相同
-	list = make([]BookMarkChart, len(sourceIds))
+	list = make([]userService.BookMarkChart, len(sourceIds))
 	// 使用 WaitGroup 来等待所有 goroutine 完成
 	var wg sync.WaitGroup
 	wg.Add(len(sourceIds))
@@ -392,7 +406,7 @@ func getChartList(info page.PageInfo, templateUserId int) (list []BookMarkChart,
 			defer wg.Done()
 			var data chartService.ChartInfo
 			data, err = chartService.GetChartById(id)
-			chartInfo := convertToBookMarkChart(data)
+			chartInfo := userService.ConvertToBookMarkChart(data)
 			if err != nil {
 				logger.Error("获取数据失败: %v", err)
 			}
@@ -407,47 +421,3 @@ func getChartList(info page.PageInfo, templateUserId int) (list []BookMarkChart,
 	wg.Wait()
 	return
 }
-
-func convertToBookMarkChart(chart chartService.ChartInfo) BookMarkChart {
-	return BookMarkChart{
-		ChartName:   chart.ChartName,
-		ChartImage:  chart.ChartImage,
-		UniqueCode:  chart.UniqueCode,
-		ChartInfoId: chart.ChartInfoId,
-	}
-}
-
-func convertToBookMarkReport(report reportDomian.ReportDTO) BookMarkReport {
-	return BookMarkReport{
-		Abstract:         report.Abstract,
-		Author:           report.Author,
-		AuthorInfo:       report.AuthorInfo,
-		ClassifyId:       report.ClassifyId,
-		CoverSrc:         report.CoverSrc,
-		CoverUrl:         report.CoverUrl,
-		Detail:           report.Detail,
-		Highlight:        report.Highlight,
-		IsFree:           report.IsFree,
-		IsPackage:        report.IsPackage,
-		IsSubscribe:      report.IsSubscribe,
-		Login:            report.Login,
-		OrgId:            report.OrgId,
-		PdfUrl:           report.PdfUrl,
-		PermissionNames:  report.PermissionNames,
-		Permissions:      report.Permissions,
-		PlateName:        report.PlateName,
-		Price:            report.Price,
-		ProductId:        report.ProductId,
-		PublishedTime:    report.PublishedTime,
-		ReportID:         report.ReportID,
-		RiskLevel:        report.RiskLevel,
-		RiskLevelStatus:  report.RiskLevelStatus,
-		Score:            report.Score,
-		SecondPermission: report.SecondPermission,
-		Show:             report.Show,
-		Source:           report.Source,
-		SubscribeStatus:  report.SubscribeStatus,
-		Title:            report.Title,
-		Type:             report.Type,
-	}
-}

+ 11 - 1
domian/report/report_service.go

@@ -342,7 +342,12 @@ func SearchReportList(key string, ids []int, from int, size int, max int64) (rep
 		docIds = append(docIds, strconv.Itoa(id))
 	}
 	sorts := append(sortField, "publishedTime:desc")
-	request := matchRangeByDocId(key, from, size, max, sorts, docIds)
+	var request *es.ESQueryRequest
+	if max == -1 {
+		request = matchRangeWithDocIds(key, from, size, sorts, docIds)
+	} else {
+		request = matchRangeByDocId(key, from, size, max, sorts, docIds)
+	}
 	re, err := elastic().Search(request)
 	if err != nil {
 		logger.Error("es搜索异常:%v", err)
@@ -1100,6 +1105,11 @@ func matchRangeByDocId(key string, from int, to int, max int64, sorts []string,
 	req := new(es.ESQueryRequest)
 	return req.CreateESQueryRequest(htConfig.GetReportIndex(), ESColumn, key, from, to, sorts, es.RangeByConditionWithDocIds).Range(0, max, ESRangeColumn).ByCondition("status", "PUBLISH").WithDocs(docIds)
 }
+func matchRangeWithDocIds(key string, from int, to int, sorts []string, docIds []string) (request *es.ESQueryRequest) {
+	req := new(es.ESQueryRequest)
+	return req.CreateESQueryRequest(htConfig.GetReportIndex(), ESColumn, key, from, to, sorts, es.RangeByConditionWithDocIds).ByCondition("status", "PUBLISH").WithDocs(docIds)
+}
+
 func CountByDocId(key string, sorts []string, docIds []string) (request *es.ESQueryRequest) {
 	req := new(es.ESQueryRequest)
 	return req.CreateESQueryRequest(htConfig.GetReportIndex(), ESColumn, key, 0, 1, sorts, es.CountWithDocIds).WithDocs(docIds)

+ 0 - 1
domian/user/bookmark_service.go

@@ -112,7 +112,6 @@ func GetBookMarkedBySource(sourceId int, templateUserId int, sourceType string)
 	bookMarkDTO = convertUserBookmark(bookMark)
 	return
 }
-
 func convertUserBookmark(bookmark userDao.UserBookmark) (bookMark BookMarkDTO) {
 	bookMark.ID = bookmark.ID
 	bookMark.UserID = bookmark.UserID

+ 50 - 0
service/media/chart_service.go

@@ -1,8 +1,13 @@
 package media
 
 import (
+	"encoding/json"
+	"eta/eta_mini_ht_api/common/component/config"
+	"eta/eta_mini_ht_api/common/component/es"
 	logger "eta/eta_mini_ht_api/common/component/log"
+	"eta/eta_mini_ht_api/common/contants"
 	chartService "eta/eta_mini_ht_api/domian/media"
+	"strconv"
 )
 
 type ChartInfo struct {
@@ -12,6 +17,18 @@ type ChartInfo struct {
 	UniqueCode  string
 }
 
+const (
+	ESColumn = "chartName"
+)
+
+var (
+	sortField = []string{"_score:desc"}
+	htConfig  = config.GetConfig(contants.HT).(*config.HTBizConfig)
+)
+
+func elastic() *es.ESClient {
+	return es.GetInstance()
+}
 func AddChartToEs(chartInfo ChartInfo) {
 	success := chartService.AddChartToEs(chartService.EsChartInfo{
 		ChartInfoId: chartInfo.ChartInfoId,
@@ -23,7 +40,40 @@ func AddChartToEs(chartInfo ChartInfo) {
 		logger.Error("新增图表到ES失败, chartInfoId:%d,uniqueCode:%s", chartInfo.ChartInfoId, chartInfo.UniqueCode)
 	}
 }
+func SearchChartList(key string, ids []int, from int, size int) (charts []ChartInfo, err error) {
+	//同步es
+	var docIds []string
+	for _, id := range ids {
+		docIds = append(docIds, strconv.Itoa(id))
+	}
+	sorts := append(sortField)
+	request := matchRangeWithDocIds(key, from, size, sorts, docIds)
+	re, err := elastic().Search(request)
+	if err != nil {
+		logger.Error("es搜索异常:%v", err)
+	}
+	hits := elastic().GetSource(re.Hits)
+	if len(hits) == 0 {
+		return
+	}
+	for _, hit := range hits {
+		var content map[string][]string
+		err = json.Unmarshal(hit.Highlight, &content)
+		chart := ChartInfo{}
+		err = json.Unmarshal(hit.Source, &chart)
+		if err != nil {
+			logger.Error("解析研报数据失败:%v", err)
+			continue
+		}
+		charts = append(charts, chart)
+	}
+	return
+}
 
+func matchRangeWithDocIds(key string, from int, to int, sorts []string, docIds []string) (request *es.ESQueryRequest) {
+	req := new(es.ESQueryRequest)
+	return req.CreateESQueryRequest(htConfig.GetReportIndex(), ESColumn, key, from, to, sorts, es.RangeByConditionWithDocIds).ByCondition("status", "PUBLISH").WithDocs(docIds)
+}
 func UpdateChartImage(image string, id int) bool {
 	return chartService.UpdateChartImage(image, id)
 }

+ 31 - 1
service/report/report_service.go

@@ -195,7 +195,37 @@ func SearchReportList(key string, Ids []int, pageInfo page.PageInfo, isLogin boo
 	}
 	return
 }
-
+func SearchReportBookMark(key string, Ids []int, pageInfo page.PageInfo, isLogin bool, userId int) (list []reportService.ReportDTO, err error) {
+	userProfile, userErr := user.GetUserProfile(userId)
+	if userErr != nil {
+		if errors.Is(userErr, gorm.ErrRecordNotFound) {
+			err = exception.New(exception.TemplateUserNotFound)
+		} else {
+			err = exception.New(exception.TemplateUserFoundFailed)
+		}
+		logger.Error("获取临时客户信息失败:%v", err)
+		return
+	}
+	var mappingRiskLevel, userRiskStatus string
+	userRiskStatus = userProfile.RiskLevelStatus
+	if userProfile.RiskLevel != "" {
+		var mapping permissionService.CustomerProductRiskMappingDTO
+		mapping, err = permissionService.GetRiskMappingByCustomerRiskLevel(userProfile.RiskLevel)
+		if err != nil {
+			logger.Error("查询产品风险等级映射失败:%v", err)
+			return
+		}
+		mappingRiskLevel = mapping.ProductRiskLevel
+	}
+	offset := page.StartIndex(pageInfo.Current, pageInfo.PageSize)
+	var reports []reportService.ReportDTO
+	reports, err = reportService.SearchReportList(key, Ids, offset, pageInfo.PageSize, -1)
+	list, err = dealReportInfo(reports, isLogin, userId, mappingRiskLevel, userRiskStatus)
+	if err != nil {
+		err = exception.New(exception.SearchReportPageFailed)
+	}
+	return
+}
 func SearchReportProduct(key string, docIds []int) (list []reportService.ReportDTO, err error) {
 	list, err = reportService.SearchReportProduct(key, 100, 0, docIds)
 	if err != nil {

+ 134 - 0
service/user/user_service.go

@@ -1,16 +1,20 @@
 package user
 
 import (
+	"encoding/json"
 	"errors"
 	logger "eta/eta_mini_ht_api/common/component/log"
 	"eta/eta_mini_ht_api/common/exception"
 	"eta/eta_mini_ht_api/common/utils/page"
 	permissionService "eta/eta_mini_ht_api/domian/config"
 	analystService "eta/eta_mini_ht_api/domian/financial_analyst"
+	reportDomian "eta/eta_mini_ht_api/domian/report"
 	userService "eta/eta_mini_ht_api/domian/user"
 	merchantDao "eta/eta_mini_ht_api/models/merchant"
 	userDao "eta/eta_mini_ht_api/models/user"
 	"eta/eta_mini_ht_api/service/config"
+	chartService "eta/eta_mini_ht_api/service/media"
+	reportService "eta/eta_mini_ht_api/service/report"
 	"gorm.io/gorm"
 	"sort"
 	"sync"
@@ -533,3 +537,133 @@ func GetReportBookMarked(sourceId int, templateUserId int) (collected bool, err
 	collected = bookMark.Status == string(userDao.Marked)
 	return
 }
+
+type BookMarkChart struct {
+	ChartName   string `json:"chartName"`
+	ChartImage  string `json:"chartImage"`
+	UniqueCode  string `json:"uniqueCode"`
+	ChartInfoId int    `json:"chartInfoId"`
+}
+type BookMarkInterface interface {
+	GetID() int
+	GetSourceType() string
+}
+type BookMarkReport struct {
+	Type             string                `json:"type"`
+	ReportID         int                   `json:"reportId"`
+	OrgId            int                   `json:"orgId"`
+	Title            string                `json:"title"`
+	Author           string                `json:"author"`
+	AuthorInfo       []reportDomian.Anthor `json:"authorInfo"`
+	Source           string                `json:"source"`
+	Abstract         string                `json:"abstract"`
+	PublishedTime    string                `json:"publishedTime"`
+	RiskLevel        string                `json:"riskLevel"`
+	PlateName        string                `json:"-"`
+	ClassifyId       int                   `json:"-"`
+	SecondPermission map[int]string        `json:"-"`
+	Permissions      map[int]string        `json:"-"`
+	PermissionNames  interface {
+	} `json:"permissionNames"`
+	Highlight       []string        `json:"highlight"`
+	Detail          json.RawMessage `json:"detail"`
+	PdfUrl          string          `json:"pdfUrl"`
+	CoverSrc        int             `json:"coverSrc"`
+	CoverUrl        string          `json:"coverUrl"`
+	Login           bool            `json:"login"`
+	RiskLevelStatus string          `json:"riskLevelStatus"`
+	IsFree          bool            `json:"isFree"`
+	IsSubscribe     bool            `json:"isSubscribe"`
+	SubscribeStatus string          `json:"subscribeStatus"`
+	Price           string          `json:"price"`
+	ProductId       int             `json:"productId"`
+	IsPackage       bool            `json:"isPackage"`
+	Score           float64         `json:"score"`
+	Show            bool            `json:"-"`
+}
+
+func (bk BookMarkReport) GetID() int {
+	return bk.ReportID
+}
+func (bk BookMarkReport) GetSourceType() string {
+	return ReportBookMark
+}
+func (bk BookMarkChart) GetID() int {
+	return bk.ChartInfoId
+}
+func (bk BookMarkChart) GetSourceType() string {
+	return ChartBookMark
+}
+func SearchBookMark(key string, sourceType string, ids []int, pageInfo page.PageInfo, userId int) (list []BookMarkInterface, err error) {
+	switch sourceType {
+	case ReportBookMark:
+		reportList, reportErr := reportService.SearchReportBookMark(key, ids, pageInfo, true, userId)
+		if reportErr != nil {
+			logger.Error("搜索研报列表失败%v", err)
+			err = exception.NewWithException(exception.GetBookMarkListFailed, reportErr.Error())
+			return
+		}
+		for _, report := range reportList {
+			list = append(list, ConvertToBookMarkReport(report))
+		}
+		return
+	case ChartBookMark:
+		offset := page.StartIndex(pageInfo.Current, pageInfo.PageSize)
+		chartList, chartErr := chartService.SearchChartList(key, ids, offset, pageInfo.PageSize)
+		if chartErr != nil {
+			logger.Error("搜索研报列表失败%v", err)
+			err = exception.NewWithException(exception.GetBookMarkListFailed, chartErr.Error())
+			return
+		}
+		for _, chart := range chartList {
+			list = append(list, ConvertToBookMarkChart(chart))
+		}
+		return
+	default:
+		err = exception.NewWithException(exception.GetBookMarkListFailed, "不支持的收藏类型")
+		return
+	}
+}
+func ConvertToBookMarkChart(chart chartService.ChartInfo) BookMarkChart {
+	return BookMarkChart{
+		ChartName:   chart.ChartName,
+		ChartImage:  chart.ChartImage,
+		UniqueCode:  chart.UniqueCode,
+		ChartInfoId: chart.ChartInfoId,
+	}
+}
+
+func ConvertToBookMarkReport(report reportDomian.ReportDTO) BookMarkReport {
+	return BookMarkReport{
+		Abstract:         report.Abstract,
+		Author:           report.Author,
+		AuthorInfo:       report.AuthorInfo,
+		ClassifyId:       report.ClassifyId,
+		CoverSrc:         report.CoverSrc,
+		CoverUrl:         report.CoverUrl,
+		Detail:           report.Detail,
+		Highlight:        report.Highlight,
+		IsFree:           report.IsFree,
+		IsPackage:        report.IsPackage,
+		IsSubscribe:      report.IsSubscribe,
+		Login:            report.Login,
+		OrgId:            report.OrgId,
+		PdfUrl:           report.PdfUrl,
+		PermissionNames:  report.PermissionNames,
+		Permissions:      report.Permissions,
+		PlateName:        report.PlateName,
+		Price:            report.Price,
+		ProductId:        report.ProductId,
+		PublishedTime:    report.PublishedTime,
+		ReportID:         report.ReportID,
+		RiskLevel:        report.RiskLevel,
+		RiskLevelStatus:  report.RiskLevelStatus,
+		Score:            report.Score,
+		SecondPermission: report.SecondPermission,
+		Show:             report.Show,
+		Source:           report.Source,
+		SubscribeStatus:  report.SubscribeStatus,
+		Title:            report.Title,
+		Type:             report.Type,
+	}
+}