kobe6258 4 месяцев назад
Родитель
Сommit
ea9a26188b

+ 8 - 5
domian/financial_analyst/financial_analyst_service.go

@@ -74,10 +74,13 @@ func convert(dto FinancialAnalystDTO) (financialAnalyst financialAnalystDao.CrmF
 }
 func convertToBaseDTO(financialAnalyst financialAnalystDao.CrmFinancialAnalyst) (dto FinancialAnalystDTO) {
 	return FinancialAnalystDTO{
-		Id:           financialAnalyst.Id,
-		ETAId:        financialAnalyst.ETAId,
-		HeadImgUrl:   financialAnalyst.HeadImgURL,
-		Name:         financialAnalyst.Name,
-		Introduction: financialAnalyst.Introduction,
+		Id:                      financialAnalyst.Id,
+		ETAId:                   financialAnalyst.ETAId,
+		HeadImgUrl:              financialAnalyst.HeadImgURL,
+		Name:                    financialAnalyst.Name,
+		Introduction:            financialAnalyst.Introduction,
+		ProfessionalCertificate: financialAnalyst.ProfessionalCertificate,
+		InvestmentCertificate:   financialAnalyst.InvestmentCertificate,
+		Position:                financialAnalyst.Position,
 	}
 }

+ 16 - 10
service/analyst/analyst_service.go

@@ -10,11 +10,14 @@ import (
 )
 
 type Analyst struct {
-	Id           int    `json:"id"`
-	Name         string `json:"name"`
-	HeadImgUrl   string `json:"headImgUrl"`
-	Introduction string `json:"introduction"`
-	Following    string `json:"following"`
+	Id                      int    `json:"id"`
+	Name                    string `json:"name"`
+	HeadImgUrl              string `json:"headImgUrl"`
+	Introduction            string `json:"introduction"`
+	Following               string `json:"following"`
+	Position                string `json:"position"`
+	InvestmentCertificate   string `json:"investmentCertificate"`
+	ProfessionalCertificate string `json:"professionalCertificate"`
 }
 
 func GetAnalystCount() (total int64, latestId int64) {
@@ -44,10 +47,13 @@ func GetAnalystList(pageInfo page.PageInfo, userId int) (analysts []Analyst, err
 
 func convertToAnalyst(analyst analystService.FinancialAnalystDTO) Analyst {
 	return Analyst{
-		Id:           analyst.Id,
-		Name:         analyst.Name,
-		HeadImgUrl:   analyst.HeadImgUrl,
-		Introduction: analyst.Introduction,
-		Following:    "",
+		Id:                      analyst.Id,
+		Name:                    analyst.Name,
+		HeadImgUrl:              analyst.HeadImgUrl,
+		Introduction:            analyst.Introduction,
+		Following:               "",
+		Position:                analyst.Position,
+		ProfessionalCertificate: analyst.ProfessionalCertificate,
+		InvestmentCertificate:   analyst.InvestmentCertificate,
 	}
 }

+ 13 - 7
service/user/user_service.go

@@ -34,10 +34,13 @@ type User struct {
 }
 
 type AnalystDetail struct {
-	AnalystName  string `json:"AnalystName"`
-	HeadImgUrl   string `json:"HeadImgUrl"`
-	Introduction string `json:"Introduction"`
-	Followed     string `json:"Followed"`
+	AnalystName             string `json:"analystName"`
+	HeadImgUrl              string `json:"headImgUrl"`
+	Introduction            string `json:"introduction"`
+	Followed                string `json:"followed"`
+	Position                string `json:"position"`
+	InvestmentCertificate   string `json:"investmentCertificate"`
+	ProfessionalCertificate string `json:"professionalCertificate"`
 }
 
 type UserProfile struct {
@@ -232,9 +235,12 @@ func GetAnalystDetail(userId int, analystId int) (analystDetail AnalystDetail, e
 
 func convertToAnalystDetail(dto analystService.FinancialAnalystDTO) AnalystDetail {
 	return AnalystDetail{
-		AnalystName:  dto.Name,
-		HeadImgUrl:   dto.HeadImgUrl,
-		Introduction: dto.Introduction,
+		AnalystName:             dto.Name,
+		HeadImgUrl:              dto.HeadImgUrl,
+		Introduction:            dto.Introduction,
+		Position:                dto.Position,
+		InvestmentCertificate:   dto.InvestmentCertificate,
+		ProfessionalCertificate: dto.ProfessionalCertificate,
 	}
 
 }