Jelajahi Sumber

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

# Conflicts:
#	services/industrial_management.go
xingzai 2 tahun lalu
induk
melakukan
09194bed0f
2 mengubah file dengan 19 tambahan dan 17 penghapusan
  1. 19 1
      services/config.go
  2. 0 16
      services/industrial_management.go

+ 19 - 1
services/config.go

@@ -1,11 +1,13 @@
 package services
 
 import (
+	"errors"
 	"fmt"
 	"hongze/hongze_cygx/models"
+	"strconv"
 )
 
-//是否展示限免标签
+// 是否展示限免标签
 func GetShowSustainable() (isShowSustainable bool) {
 	total, err := models.GetShowSustainable()
 	if err != nil {
@@ -29,3 +31,19 @@ func GetShowSustainableNew() (isShowSustainable bool, err error) {
 	}
 	return
 }
+
+// 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)
+	if e != nil {
+		err = errors.New("GetCygxIndustryFllowList  " + e.Error())
+		return
+	}
+	follwMap := make(map[int]bool)
+	for _, v := range listIndustryFllow {
+		follwMap[v.IndustrialManagementId] = true
+	}
+	itemMap = follwMap
+	return
+}

+ 0 - 16
services/industrial_management.go

@@ -505,19 +505,3 @@ func HandleIndustryList(list []*models.IndustrialManagement, user *models.WxUser
 	items = list
 	return
 }
-
-// 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)
-	if e != nil {
-		err = errors.New("GetCygxIndustryFllowList  " + e.Error())
-		return
-	}
-	follwMap := make(map[int]bool)
-	for _, v := range listIndustryFllow {
-		follwMap[v.IndustrialManagementId] = true
-	}
-	itemMap = follwMap
-	return
-}