Browse Source

Merge branch 'cygx_need_905' of http://8.136.199.33:3000/hongze/hz_crm_api

xingzai 1 year ago
parent
commit
c51d6f96c0
1 changed files with 9 additions and 3 deletions
  1. 9 3
      controllers/cygx/user.go

+ 9 - 3
controllers/cygx/user.go

@@ -71,6 +71,9 @@ func (this *UserController) List() {
 	keyWord = strings.Replace(keyWord, "'", "", -1)
 	isSubscribeCygx, _ := this.GetInt("IsSubscribeCygx", -1)
 
+	if status == "X类试用" {
+		status = "永续"
+	}
 	var total int
 	page := paging.GetPaging(currentIndex, pageSize, total)
 
@@ -307,11 +310,11 @@ func (this *UserController) List() {
 		condition += ` AND b.status= '` + status + `'`
 		usercondition += ` AND cp.status= '` + status + `'`
 	} else {
-		condition += ` AND b.status IN ('正式','试用','冻结') `
+		condition += ` AND b.status IN ('正式','试用','冻结','永续') `
 	}
 
 	// 试用客户标签
-	if status == "试用" && tryStage > 0 {
+	if (status == "试用" || status == "永续") && tryStage > 0 {
 		condition += ` AND b.try_stage= '` + strconv.Itoa(tryStage) + `'`
 		usercondition += ` AND cp.try_stage= '` + strconv.Itoa(tryStage) + `'`
 	}
@@ -431,6 +434,9 @@ func (this *UserController) List() {
 					list[k].Status += "(预备)"
 				}
 			}
+			if v.Status == "永续" {
+				v.Status = "X类试用"
+			}
 			userIds += strconv.Itoa(int(v.UserId)) + ","
 			userIdArr = append(userIdArr, int(v.UserId))
 
@@ -1331,7 +1337,7 @@ func (this *UserController) StatusTable() {
 	}
 	listType := []*cygx.CygxTryStageRep{{Name: "大套餐", TryStage: 1}, {Name: "小套餐", TryStage: 2}}
 	listStatus := []*cygx.CygxTryStageRep{{Name: "未分类", TryStage: 1}, {Name: "推进", TryStage: 2}, {Name: "跟踪", TryStage: 3}, {Name: "预备", TryStage: 4}}
-	List := []*cygx.CygxUserTableStatusRep{{Name: "正式", List: listType, TryStage: "正式"}, {Name: "试用", List: listStatus, TryStage: "试用"}, {Name: "冻结", List: []*cygx.CygxTryStageRep{}, TryStage: "冻结"}}
+	List := []*cygx.CygxUserTableStatusRep{{Name: "正式", List: listType, TryStage: "正式"}, {Name: "试用", List: listStatus, TryStage: "试用"}, {Name: "冻结", List: []*cygx.CygxTryStageRep{}, TryStage: "冻结"}, {Name: "X类试用", List: []*cygx.CygxTryStageRep{}, TryStage: "X类试用"}}
 	resp := new(cygx.CygxUserTableStatusListRep)
 	resp.List = List