zhangchuanxing 3 settimane fa
parent
commit
5898b08c6c
3 ha cambiato i file con 4 aggiunte e 15 eliminazioni
  1. 0 14
      controllers/cygx/user.go
  2. 2 1
      models/company/company_user.go
  3. 2 0
      models/cygx/cygx_user.go

+ 0 - 14
controllers/cygx/user.go

@@ -317,17 +317,6 @@ func (this *UserController) List() {
 		mapIsUserMaker := cygxService.GetCompanyProductIsUserMakerByCompanyIds(companyIds) //根据公司ID获取近四周之内有决策人互动的客户
 		userHaveMoveMap := services.GetWxUserHaveMoveMap(mobilesSlice)                     // 处理用户是否移动过按钮回显
 
-		mfyxuserRecordRegisterList, err := models.GetUserRecordRegisterByUserIdsMyfx(userIds)
-		if err != nil {
-			br.Msg = "获取失败"
-			br.ErrMsg = "获取失败 GetUserRecordRegisterByUserIdsMyfx ,Err:" + err.Error()
-			return
-		}
-		mfyxuserRecordRegisterMap := make(map[int]string)
-		for _, userRecordRegister := range mfyxuserRecordRegisterList {
-			//如果注册时间早于网页版的,或者网页版没有注册,就用这里的时间替换
-			mfyxuserRecordRegisterMap[userRecordRegister.UserId] = userRecordRegister.CreateTime.Format(utils.FormatDateTime)
-		}
 		for k, v := range list {
 			for _, vsplit := range splitList {
 				if vsplit.UserId == v.UserId {
@@ -354,9 +343,6 @@ func (this *UserController) List() {
 			if v.Mobile != "" {
 				v.HaveMoveButton = userHaveMoveMap[v.Mobile]
 			}
-			if mfyxuserRecordRegisterMap[int(v.UserId)] != "" {
-				list[k].MfyxIsBinding = true
-			}
 		}
 		for k := range list {
 			list[k].InteractionNum = list[k].HistoryNum + list[k].CountNum + list[k].IndustryFllowNum + list[k].DepartmentFollowNum + list[k].KeyWordNum + list[k].OnLineNum + list[k].OfficeNum + list[k].ChartNum + list[k].TripNum + list[k].RoadshowVideoNum + list[k].ActivityVideoNum + list[k].ActivityVoiceNum + list[k].YanxuanspecialNum

+ 2 - 1
models/company/company_user.go

@@ -64,6 +64,7 @@ type CompanyUser struct {
 	IsFollow                 int       `description:"是否特别关注: 0-未关注; 1-已关注"`
 	IsSubscribeHzyj          int       `description:"是否关注了弘则研究微信公众号: 0-未关注; 1-已关注"`
 	IsSubscribeCygx          int       `description:"是否关注了查研观向微信公众号: 0-未关注; 1-已关注"`
+	IsSubscribeMfyx          int       `description:"是否关注了买方研选微信公众号: 0-未关注; 1-已关注"`
 	FiccViewTotal            int       `description:"ficc报告的阅读次数" json:"-"`
 	FiccLastViewTime         time.Time `description:"ficc报告最近一次阅读时间" json:"-"`
 	RaiViewTotal             int       `description:"权益报告的阅读次数" json:"-"`
@@ -139,7 +140,7 @@ func GetCompanyUserListCountV2(condition string, pars []interface{}, companyId i
 func GetCompanyUserListV2(condition string, pars []interface{}, companyId, startSize, pageSize int) (items []*CompanyUser, err error) {
 	o := orm.NewOrm()
 	sql := `SELECT
-				a.*, a.cygx_subscribe as is_subscribe_cygx,  c.subscribe AS is_subscribe_hzyj   
+				a.*, a.cygx_subscribe AS is_subscribe_cygx,  a.mfyx_subscribe AS is_subscribe_mfyx , c.subscribe AS is_subscribe_hzyj   
 			FROM
 				wx_user AS a
 			LEFT JOIN user_seller_relation AS b ON a.user_id = b.user_id

+ 2 - 0
models/cygx/cygx_user.go

@@ -51,6 +51,7 @@ type CygxCompanyUser struct {
 	Content                     string `description:"备注信息"`
 	IsRemind                    bool   `description:"是否添加互动提醒"`
 	IsSubscribeCygx             int    `description:"是否关注了查研观向微信公众号: 0-未关注; 1-已关注"`
+	IsSubscribeMfyx             int    `description:"是否关注了买方研选微信公众号: 0-未关注; 1-已关注"`
 	IsUserMaker                 int    `description:"近四周之内是否包含决策人互动过 ,0否,1是"`
 	HaveMoveButton              bool   `description:"是否移动过"`
 	MfyxIsBinding               bool   `description:"买方研选是否绑定"`
@@ -111,6 +112,7 @@ func GetCygxCompanyUserList(userCondition, keyWord, kwywordcondition, condition,
 			u.is_maker,
 			u.user_label as  labels,
 			u.cygx_subscribe as is_subscribe_cygx, 
+			u.mfyx_subscribe as is_subscribe_mfyx, 
 			c.company_name,
 			c.company_id,
 			c.interaction_num as company_interaction_num,