Sfoglia il codice sorgente

Merge branch 'cygx_13.3' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 1 anno fa
parent
commit
0c011e5cdf

+ 8 - 4
controllers/chart_permission.go

@@ -70,6 +70,10 @@ func (this *ChartPermissionAuthController) Detail() {
 		if v.ChartPermissionId == utils.YAN_XUAN_KOU_DIAN_BAO_ID {
 			continue
 		}
+		//固收不进行展示
+		if v.ChartPermissionId == utils.GU_SHOU_ID_CHART {
+			continue
+		}
 		if userType == 1 {
 			if v.PermissionName != "研选" {
 				resp.List = append(resp.List, v)
@@ -322,10 +326,10 @@ func (this *ChartPermissionAuthController) ReportDetailV7() {
 			resp.List[k].IsShowSustainable = true
 		}
 	}
-	item := new(models.ChartPermission)
-	item.PermissionName = utils.GU_SHOU_NAME
-	item.ChartPermissionId = utils.GU_SHOU_ID
-	resp.List = append(resp.List, item)
+	//item := new(models.ChartPermission)
+	//item.PermissionName = utils.GU_SHOU_NAME
+	//item.ChartPermissionId = utils.GU_SHOU_ID
+	//resp.List = append(resp.List, item)
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "获取成功"

+ 1 - 1
models/chart_permission.go

@@ -72,7 +72,7 @@ func GetChartPermissionById(chartPermissionId int) (item *ChartPermission, err e
 
 func GetChartPermissionActivity() (items []*ActivityChartPermission, err error) {
 	o := orm.NewOrmUsingDB("weekly_report")
-	sql := `SELECT * FROM chart_permission WHERE chart_permission_id IN (19,20,21,22,23,31) ORDER BY sort ASC `
+	sql := `SELECT * FROM chart_permission WHERE chart_permission_id IN (19,20,21,22,23,31,53) ORDER BY sort ASC `
 	_, err = o.Raw(sql).QueryRows(&items)
 	return
 }

+ 2 - 2
models/wx_user.go

@@ -377,7 +377,7 @@ func GetUserRegisterList() (items []*WxUser, err error) {
 			WHERE
 				user_id > 0 
 				AND company_id > 0 
-				AND create_time > DATE_SUB( DATE( NOW()), INTERVAL 1 DAY ) OR  mobile = 18767183922
+				AND create_time > DATE_SUB( DATE( NOW()), INTERVAL 1 DAY )
 			GROUP BY user_id `
 	_, err = o.Raw(sql).QueryRows(&items)
 	return
@@ -532,7 +532,7 @@ func GetCygxCompanyUserUserInteraction(userIds string) (items []*CygxUserInterac
 			( SELECT COUNT( 1 ) FROM cygx_article_history_record_all AS h  INNER JOIN cygx_article  as art  ON  art.article_id = h.article_id  WHERE h.mobile = u.mobile AND h.is_del = 0   AND h.mobile <>'' ) AS history_num,
 			( SELECT COUNT( 1 ) FROM cygx_article_collect AS h WHERE h.user_id = u.user_id  ) AS count_num,
 			( SELECT COUNT( 1 ) FROM cygx_chart_collect AS h WHERE h.user_id = u.user_id  ) AS chart_count_num,
-			( SELECT COUNT( 1 ) FROM cygx_industry_fllow AS h WHERE h.user_id = u.user_id  ) AS industry_fllow_num,
+			( SELECT COUNT( 1 ) FROM cygx_industry_fllow AS h WHERE h.user_id = u.user_id  AND  h.source   IN (0,1,2)  ) AS industry_fllow_num,
 			( SELECT COUNT( 1 ) FROM cygx_article_department_follow AS h WHERE h.user_id = u.user_id   ) AS department_follow_num,
 			( SELECT COUNT( 1 ) FROM cygx_search_key_word_log AS h WHERE h.user_id = u.user_id  ) AS key_word_num,
 			( SELECT COUNT( 1 ) FROM cygx_activity_signup_detail AS h INNER JOIN cygx_activity as a ON a.activity_id = h.activity_id  INNER JOIN cygx_activity_type as t ON t.activity_type_id = a.activity_type_id   WHERE h.mobile = u.mobile  

+ 2 - 3
services/wx_user.go

@@ -632,7 +632,6 @@ func UpdateWxUserLabel(cont context.Context) (err error) {
 									fmt.Println("UpdateCygxUserInteractionNum Err", err)
 									return err
 								}
-								fmt.Println(itemInteraction.UserId)
 							}
 						}
 					}
@@ -733,8 +732,8 @@ func UpdateWxUserLabel(cont context.Context) (err error) {
 								fmt.Println("UpdateCygxUserInteractionNum Err", err)
 								return err
 							}
-							fmt.Println(itemInteraction.UserId)
-							err = models.UpdateCygxUserInteractionNum(itemInteraction)
+							//fmt.Println(itemInteraction.UserId)
+							//err = models.UpdateCygxUserInteractionNum(itemInteraction)
 						}
 					}
 				}

+ 1 - 0
utils/constants.go

@@ -107,6 +107,7 @@ const (
 	HONG_GUAN_ID                     int    = 1
 	GU_SHOU_NAME                     string = "固收"
 	GU_SHOU_ID                       int    = 100000                          // 自定义权限类型ID ,十万起步
+	GU_SHOU_ID_CHART                 int    = 53                              // chart_permission 表 固收ID
 	YAN_XUAN_ARTICLE_TYPE_IDS        string = "1,2,12"                        // 属于研选的报告类型ID
 	NO_YAN_XUAN_ARTICLE_TYPE_IDS     string = "13"                            // 不属于研选的报告类型ID
 	CYGX_TACTICS_TIME_LINE_STATUS    string = "cygx_tactics_time_line_status" // 策略时间线是否对外开放