Browse Source

Merge branch 'crm/crm_15.9' of http://8.136.199.33:3000/hongze/hz_crm_api into debug

xingzai 8 months ago
parent
commit
aff3ff1d25
2 changed files with 9 additions and 0 deletions
  1. 8 0
      controllers/cygx/rai_serve.go
  2. 1 0
      models/cygx/rai_serve_company.go

+ 8 - 0
controllers/cygx/rai_serve.go

@@ -391,12 +391,14 @@ func (this *RaiServeCoAntroller) List() {
 			br.ErrMsg = "获取用户信息失败-getServeBillTag!Err:" + err.Error()
 			return
 		}
+
 		//服务类型筛选
 		if serveTypeId > 0 {
 			conditionBill += ` AND serve_type_id = ?  `
 			parsBill = append(parsBill, serveTypeId)
 		}
 
+		fmt.Println(conditionBill)
 		conditionBill += "  AND   company_id IN  (" + utils.GetOrmInReplace(lencompanyIds) + ")   "
 		parsBill = append(parsBill, companyIds)
 
@@ -436,6 +438,9 @@ func (this *RaiServeCoAntroller) List() {
 		item.ShareSellerId = v.ShareSellerId
 		item.Status = v.Status
 		item.PermissionName = v.PermissionName
+		if v.IsUserMaker == 0 {
+			item.IsRed = true
+		}
 		item.ThisWeekAmount = mapWeekAmount[fmt.Sprintf("CID_", v.CompanyId, "WEEK_", 0)]
 		item.LastWeekAmount = mapWeekAmount[fmt.Sprintf("CID_", v.CompanyId, "WEEK_", 1)]
 		item.TwoWeekAmount = mapWeekAmount[fmt.Sprintf("CID_", v.CompanyId, "WEEK_", 2)]
@@ -614,6 +619,9 @@ func RaiServeListExport(this *RaiServeCoAntroller, resp *cygx.CygxRaiServeCompan
 
 // 标签搜索语句筛选
 func getServeBillTag(tagType, tagId int) (conditionBill string, parsBill []interface{}, err error) {
+	if tagType == 0 {
+		return
+	}
 	var activityIds []int
 	var activitySpecialIds []int
 	var articleIds []int

+ 1 - 0
models/cygx/rai_serve_company.go

@@ -21,6 +21,7 @@ type CygxRaiServeCompany struct {
 	ShareSellerId     int       `comment:"共享销售员id"`
 	Status            string    `comment:"客户状态"`
 	PermissionName    string    `comment:"权限名"`
+	IsUserMaker       int       `comment:"近四周之内是否包含决策人"`
 }
 
 type CygxRaiServeCompanyResp struct {