Эх сурвалжийг харах

Merge branch 'cygx_9.7' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 2 жил өмнө
parent
commit
7f49ff6f5d

+ 8 - 0
models/industry_fllow.go

@@ -92,6 +92,14 @@ func GetCygxIndustryFllowList(condition string) (items []*CygxIndustryFllow, err
 	return
 }
 
+// 获取列表信息根据手机号分组
+func GetCygxIndustryFllowListByUserId(condition string) (items []*CygxIndustryFllow, err error) {
+	o := orm.NewOrm()
+	sql := `SELECT * FROM cygx_industry_fllow  WHERE 1 =1   ` + condition
+	_, err = o.Raw(sql).QueryRows(&items)
+	return
+}
+
 // 修改用户关注的相关信息
 func UpdateCygxIndustryFllow(wxUser *WxUserItem) (err error) {
 	o := orm.NewOrm()

+ 1 - 1
services/config.go

@@ -35,7 +35,7 @@ func GetShowSustainableNew() (isShowSustainable bool, err error) {
 // GetIndustryUserFollowMap 获取用户关注的产业
 func GetIndustryUserFollowMap(user *models.WxUserItem) (itemMap map[int]bool, err error) {
 	condition := ` AND  user_id = ` + strconv.Itoa(user.UserId)
-	listIndustryFllow, e := models.GetCygxIndustryFllowList(condition)
+	listIndustryFllow, e := models.GetCygxIndustryFllowListByUserId(condition)
 	if e != nil {
 		err = errors.New("GetCygxIndustryFllowList  " + e.Error())
 		return