|
@@ -45,6 +45,15 @@ func GetAnalystByName(name string) (analyst CrmFinancialAnalyst, err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+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),
|
|
|
+ }
|
|
|
+}
|
|
|
func GetAnalystCount() (count int, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `SELECT COUNT(*) AS count FROM crm_financial_analysts`
|