|
@@ -14,16 +14,19 @@ const (
|
|
|
)
|
|
|
|
|
|
type CrmFinancialAnalyst struct {
|
|
|
- Id int `description:"主键"`
|
|
|
- ETAId int `description:"eta_id"`
|
|
|
- HTId int `description:"ht_id"`
|
|
|
- Name string `description:"姓名"`
|
|
|
- HeadImgUrl string `description:"头像"`
|
|
|
- Introduction string `description:"介绍"`
|
|
|
- Status AnalystStatus `description:"状态"`
|
|
|
- Deleted bool `description:"是否删除"`
|
|
|
- CreatedTime time.Time `description:"创建时间"`
|
|
|
- UpdatedTime time.Time `description:"更新时间"`
|
|
|
+ Id int `description:"主键"`
|
|
|
+ ETAId int `description:"eta_id"`
|
|
|
+ HTId int `description:"ht_id"`
|
|
|
+ Name string `description:"姓名"`
|
|
|
+ HeadImgUrl string `description:"头像"`
|
|
|
+ Position string `description:"职位"`
|
|
|
+ InvestmentCertificate string `description:"投资咨询资格证"`
|
|
|
+ ProfessionalCertificate string `description:"从业资格证"`
|
|
|
+ Introduction string `description:"介绍"`
|
|
|
+ Status AnalystStatus `description:"状态"`
|
|
|
+ Deleted bool `description:"是否删除"`
|
|
|
+ CreatedTime time.Time `description:"创建时间"`
|
|
|
+ UpdatedTime time.Time `description:"更新时间"`
|
|
|
}
|
|
|
|
|
|
func (m *CrmFinancialAnalyst) TableName() string {
|
|
@@ -31,11 +34,14 @@ func (m *CrmFinancialAnalyst) TableName() string {
|
|
|
}
|
|
|
|
|
|
type AnalystView struct {
|
|
|
- Id int `json:"Id"`
|
|
|
- Name string `json:"Name"`
|
|
|
- HeadImgURL string `json:"HeadImgURL"`
|
|
|
- Introduction string `json:"Introduction"`
|
|
|
- CreatedTime string `json:"CreatedTime"`
|
|
|
+ Id int `json:"Id"`
|
|
|
+ Name string `json:"Name"`
|
|
|
+ HeadImgURL string `json:"HeadImgURL"`
|
|
|
+ Position string `json:"Position"`
|
|
|
+ InvestmentCertificate string `json:"InvestmentCertificate"`
|
|
|
+ ProfessionalCertificate string `json:"ProfessionalCertificate"`
|
|
|
+ Introduction string `json:"Introduction"`
|
|
|
+ CreatedTime string `json:"CreatedTime"`
|
|
|
}
|
|
|
|
|
|
func GetAnalystByName(name string) (analyst CrmFinancialAnalyst, err error) {
|
|
@@ -47,11 +53,14 @@ func GetAnalystByName(name string) (analyst CrmFinancialAnalyst, err error) {
|
|
|
|
|
|
func (a *CrmFinancialAnalyst) ToView() *AnalystView {
|
|
|
return &AnalystView{
|
|
|
- Id: a.Id,
|
|
|
- Name: a.Name,
|
|
|
- HeadImgURL: a.HeadImgUrl,
|
|
|
- Introduction: a.Introduction,
|
|
|
- CreatedTime: a.CreatedTime.Format(time.DateTime),
|
|
|
+ Id: a.Id,
|
|
|
+ Name: a.Name,
|
|
|
+ HeadImgURL: a.HeadImgUrl,
|
|
|
+ Position: a.Position,
|
|
|
+ InvestmentCertificate: a.InvestmentCertificate,
|
|
|
+ ProfessionalCertificate: a.ProfessionalCertificate,
|
|
|
+ Introduction: a.Introduction,
|
|
|
+ CreatedTime: a.CreatedTime.Format(time.DateTime),
|
|
|
}
|
|
|
}
|
|
|
func GetAnalystCount(condition string) (count int, err error) {
|