Browse Source

同步创建者信息

xyxie 10 months ago
parent
commit
717e31c0a0
2 changed files with 6 additions and 0 deletions
  1. 5 0
      services/chart_info.go
  2. 1 0
      services/eta_forum/eta_forum_hub.go

+ 5 - 0
services/chart_info.go

@@ -128,6 +128,11 @@ func UpdateChart(chartInfoId int) (err error, errMsg string) {
 	req.EdbInfoList = edbInfoList
 	req.EdbInfoDataList = edbInfoDataList
 	req.EdbInfoCalculateMapping = edbMappingList
+	// 查询创建者信息
+	creatorInfo, _ := models.GetSysUserById(chartInfo.SysUserId)
+	if creatorInfo != nil {
+		req.CreatorInfo = creatorInfo
+	}
 
 	// 添加计算指标
 	reqJson, err := json.Marshal(req)

+ 1 - 0
services/eta_forum/eta_forum_hub.go

@@ -22,6 +22,7 @@ type ChartSaveLibReq struct {
 	EdbInfoDataList         []*AddEdbDataReq
 	ChartEdbMapping         []*models.ChartEdbMapping
 	EdbInfoCalculateMapping []*models.EdbInfoCalculateMapping
+	CreatorInfo             *models.Admin //创建者的账号信息
 }
 
 type ChartSaveLibResp struct {