Browse Source

Merge branch 'crm/crm_14.7.1' of http://8.136.199.33:3000/hongze/hz_crm_api into debug

xingzai 10 months ago
parent
commit
5a45cf2754
3 changed files with 11 additions and 4 deletions
  1. 9 3
      controllers/cygx/user.go
  2. 1 1
      models/cygx/article_and_yanxuan_record.go
  3. 1 0
      services/cygx/article.go

+ 9 - 3
controllers/cygx/user.go

@@ -1853,6 +1853,12 @@ func (this *UserController) ExportInteraction() {
 		sheetName = "到会管理名单"
 		if mobile != "" {
 			condition = ` AND s.mobile = '` + mobile + `' `
+			if classType == 1 {
+				condition += "  AND  a.chart_permission_id  != 31 "
+			} else {
+				condition += "  AND  a.chart_permission_id  = 31 "
+			}
+
 			if isMeeting == "1" {
 				condition += ` AND s.is_meeting = 1 `
 			}
@@ -2472,7 +2478,7 @@ func (this *UserController) CompanyTableDetail() {
 		br.Msg = "用户不存在"
 		return
 	}
-	fmt.Println("ClassType", classType)
+
 	// 1.标记用户表
 	//操作权限校验
 	resp := new(cygx.UserInteractionListResp)
@@ -2484,7 +2490,6 @@ func (this *UserController) CompanyTableDetail() {
 	var pars []interface{}
 	condition += ` AND r.company_id  =   ` + strconv.Itoa(companyId) + ` AND r.create_time < '` + time.Now().Format(utils.FormatDate) + `' `
 	if keyWord != "" {
-		//condition += ` AND r.mobile IN (SELECT mobile FROM wx_user WHERE mobile LIKE '%` + keyWord + `%' OR email LIKE '%` + keyWord + `%' OR real_name LIKE '%` + keyWord + `%')`
 		condition += ` AND ( r.mobile LIKE '%` + keyWord + `%' OR r.email LIKE '%` + keyWord + `%' OR r.real_name LIKE '%` + keyWord + `%')`
 	}
 
@@ -2538,7 +2543,6 @@ func (this *UserController) CompanyTableDetail() {
 				return
 			}
 		}
-
 		//处理查询信息回显
 		list, err = cygxService.HandleArticleAndYanxuanRecordList(listRecord)
 		if err != nil && err.Error() != utils.ErrNoRow() {
@@ -3720,6 +3724,8 @@ func (this *UserController) CompanyList() {
 		} else {
 			condition += " AND art.article_type_id > 0  "
 		}
+
+		condition += " AND r.source =  'article' "
 		var pars []interface{}
 		condition += "  ORDER BY r.create_time DESC "
 		var listRecord []*cygx.CygxArticleAndYanxuanRecordResp

+ 1 - 1
models/cygx/article_and_yanxuan_record.go

@@ -55,7 +55,7 @@ func GetCygxArticleAndYanxuanRecordCountWeekly(condition string, pars []interfac
 // 列表
 func GetCygxArticleAndYanxuanRecordRespList(condition string, pars []interface{}, startSize, pageSize int) (items []*CygxArticleAndYanxuanRecordResp, err error) {
 	o := orm.NewOrmUsingDB("hz_cygx")
-	sql := `SELECT * FROM cygx_article_and_yanxuan_record as r 
+	sql := `SELECT r.* ,art.title  FROM cygx_article_and_yanxuan_record as r 
           INNER JOIN cygx_article  as art  ON  art.article_id = r.source_id  WHERE 1= 1 `
 	if condition != "" {
 		sql += condition

+ 1 - 0
services/cygx/article.go

@@ -312,6 +312,7 @@ func HandleArticleAndYanxuanRecordList(items []*cygx.CygxArticleAndYanxuanRecord
 			item.CompanyName = v.CompanyName
 			item.SellerName = sellNameMap[v.CompanyId]
 			item.RegisterPlatform = v.RegisterPlatform
+			item.RegisterPlatformText = GetArticleSourcePlatformText(v.RegisterPlatform)
 			item.StopTime = strconv.Itoa(v.StopTime)
 			itemsResp = append(itemsResp, item)
 		}