kobe6258 7 months ago
parent
commit
727038f422
3 changed files with 11 additions and 2 deletions
  1. 1 1
      controllers/analyst.go
  2. 9 0
      controllers/message.go
  3. 1 1
      models/financial_analyst.go

+ 1 - 1
controllers/analyst.go

@@ -212,7 +212,7 @@ func (this *AnalystController) Edit() {
 		return
 	}
 	if req.HeadImgUrl == "" {
-		br.Msg = "请输入姓名"
+		br.Msg = "请输入头像地址"
 		return
 	}
 	req.Introduction = strings.TrimSpace(req.Introduction)

+ 9 - 0
controllers/message.go

@@ -112,6 +112,7 @@ func (this *MessageController) AudioList() {
 	permissionIds := this.GetString("PermissionIds")
 	analystIds := this.GetString("AnalystIds")
 	sortType := this.GetString("SortType")
+	KeyWord := this.GetString("KeyWord")
 	var permissionCondition string
 	var condition string
 	var pars []interface{}
@@ -122,6 +123,10 @@ func (this *MessageController) AudioList() {
 	if currentIndex <= 0 {
 		currentIndex = 1
 	}
+
+	if KeyWord != "" {
+		condition += " AND media_name like '%" + KeyWord + "%'"
+	}
 	var permissionPars []interface{}
 	if permissionIds != "" {
 		permissionArr := strings.Split(permissionIds, ",")
@@ -203,6 +208,7 @@ func (this *MessageController) VideoList() {
 	permissionIds := this.GetString("PermissionIds")
 	analystIds := this.GetString("AnalystIds")
 	sortType := this.GetString("SortType")
+	KeyWord := this.GetString("KeyWord")
 	var permissionCondition string
 	var condition string
 	var pars []interface{}
@@ -213,6 +219,9 @@ func (this *MessageController) VideoList() {
 	if currentIndex <= 0 {
 		currentIndex = 1
 	}
+	if KeyWord != "" {
+		condition += " AND media_name like '%" + KeyWord + "%'"
+	}
 	var permissionPars []interface{}
 	if permissionIds != "" {
 		permissionArr := strings.Split(permissionIds, ",")

+ 1 - 1
models/financial_analyst.go

@@ -18,7 +18,7 @@ type CrmFinancialAnalyst struct {
 	ETAId        int           `description:"eta_id"`
 	HTId         int           `description:"ht_id"`
 	Name         string        `description:"姓名"`
-	HeadImgURL   string        `description:"头像"`
+	HeadImgUrl   string        `description:"头像"`
 	Introduction string        `description:"介绍"`
 	Status       AnalystStatus `description:"状态"`
 	Deleted      bool          `description:"是否删除"`