Browse Source

no message

xingzai 1 year ago
parent
commit
5ee1b07208

+ 1 - 1
controllers/cygx/apply_record.go

@@ -76,7 +76,7 @@ func (this *ApplyRecordController) ListSysRole() {
 	}
 	lencompanyIds := len(companyIds)
 	if lencompanyIds > 0 {
-		condition = ` AND a.company_id_pay  IN (` + utils.GetOrmInReplace(lencompanyIds) + `)`
+		condition += ` AND a.company_id_pay  IN (` + utils.GetOrmInReplace(lencompanyIds) + `)`
 		pars = append(pars, companyIds)
 	}
 

+ 14 - 13
services/cygx/admin_power.go

@@ -38,19 +38,20 @@ func GetAdminLookUserCompanyIds(sysUser *system.Admin) (companyIds []int, err er
 	//如果不是管理员,权益管理员那么就对可见权限范围做处理
 	adminIds := make([]int, 0)
 	if sysUser.RoleTypeCode != utils.ROLE_TYPE_CODE_ADMIN && sysUser.RoleTypeCode != utils.ROLE_TYPE_CODE_RAI_ADMIN {
-		if sysUser.RoleTypeCode == utils.ROLE_TYPE_CODE_RAI_GROUP {
-			//如果是权益的组长就获取下面的组员
-			adminList, e := system.GetAdminListByGroupId(sysUser.GroupId)
-			if e != nil {
-				err = errors.New("GetAdminListByGroupId , Err: " + e.Error())
-				return
-			}
-			for _, v := range adminList {
-				adminIds = append(adminIds, v.AdminId)
-			}
-		} else {
-			adminIds = append(adminIds, sysUser.AdminId)
-		}
+		//if sysUser.RoleTypeCode == utils.ROLE_TYPE_CODE_RAI_GROUP {
+		//	//如果是权益的组长就获取下面的组员
+		//	adminList, e := system.GetAdminListByGroupId(sysUser.GroupId)
+		//	if e != nil {
+		//		err = errors.New("GetAdminListByGroupId , Err: " + e.Error())
+		//		return
+		//	}
+		//	for _, v := range adminList {
+		//		adminIds = append(adminIds, v.AdminId)
+		//	}
+		//} else {
+		//	adminIds = append(adminIds, sysUser.AdminId)
+		//}
+		adminIds = append(adminIds, sysUser.AdminId)
 		var adminIdGroup string
 		for _, v := range adminIds {
 			adminIdGroup += strconv.Itoa(v) + ","

+ 37 - 37
services/cygx/product_interior.go

@@ -150,16 +150,16 @@ func SendWxMsgWithCygxProductInterior(productInteriorId int) (err error) {
 	if detail.IsSendWxMsg == 1 {
 		return
 	}
-	if detail.MatchTypeId > 0 {
-		matchDetail, e := cygx.GetCygxReportMappingCygxDetail(detail.MatchTypeId)
-		if e != nil {
-			err = errors.New("GetCygxReportMappingCygxDetail" + e.Error())
-			return
-		}
-		if matchDetail != nil {
-			detail.MatchTypeName = matchDetail.MatchTypeName
-		}
-	}
+	//if detail.MatchTypeId > 0 {
+	//	matchDetail, e := cygx.GetCygxReportMappingCygxDetail(detail.MatchTypeId)
+	//	if e != nil {
+	//		err = errors.New("GetCygxReportMappingCygxDetail" + e.Error())
+	//		return
+	//	}
+	//	if matchDetail != nil {
+	//		detail.MatchTypeName = matchDetail.MatchTypeName
+	//	}
+	//}
 	permissionStr, e := company.GetPermissionIdById(strconv.Itoa(detail.ChartPermissionId))
 	if e != nil {
 		err = errors.New("获取主客观权限失败" + e.Error())
@@ -172,33 +172,33 @@ func SendWxMsgWithCygxProductInterior(productInteriorId int) (err error) {
 		return
 	}
 	var industrialName string
-
-	industrialList, e := cygx.GetProductInteriorIndustrialGroupManagementList(productInteriorId)
-	if e != nil && e.Error() != utils.ErrNoRow() {
-		err = errors.New("GetProductInteriorIndustrialGroupManagementList,Err:" + e.Error())
-		return
-	}
-
-	//关联的产业推送产业,没有关联产业的推送行业 p2_867 2023-8-30
-	if len(industrialList) == 0 {
-		industrialName = detail.ChartPermissionName
-	} else {
-		//mapOpenidFllow := make(map[int]string)
-		//
-		for _, vindustr := range industrialList {
-			//获取关注对应产业的用户信息
-			//industryFllowList, e := cygx.GetCygxUserindustryFllowOpenid(vindustr.IndustrialManagementId)
-			//if e != nil {
-			//	err = errors.New("获取关注对应产业的用户信息失败 " + e.Error())
-			//	return
-			//}
-			//for _, v := range industryFllowList {
-			//	mapOpenidFllow[v.UserId] = v.OpenId
-			//}
-			industrialName += vindustr.IndustryName + ";"
-		}
-		industrialName = strings.TrimRight(industrialName, ";")
-	}
+	industrialName = detail.ColumnName //用栏目名称
+	//industrialList, e := cygx.GetProductInteriorIndustrialGroupManagementList(productInteriorId)
+	//if e != nil && e.Error() != utils.ErrNoRow() {
+	//	err = errors.New("GetProductInteriorIndustrialGroupManagementList,Err:" + e.Error())
+	//	return
+	//}
+	//
+	////关联的产业推送产业,没有关联产业的推送行业 p2_867 2023-8-30
+	//if len(industrialList) == 0 {
+	//	industrialName = detail.ColumnName //用栏目名称
+	//} else {
+	//	//mapOpenidFllow := make(map[int]string)
+	//	//
+	//	for _, vindustr := range industrialList {
+	//		//获取关注对应产业的用户信息
+	//		//industryFllowList, e := cygx.GetCygxUserindustryFllowOpenid(vindustr.IndustrialManagementId)
+	//		//if e != nil {
+	//		//	err = errors.New("获取关注对应产业的用户信息失败 " + e.Error())
+	//		//	return
+	//		//}
+	//		//for _, v := range industryFllowList {
+	//		//	mapOpenidFllow[v.UserId] = v.OpenId
+	//		//}
+	//		industrialName += vindustr.IndustryName + ";"
+	//	}
+	//	industrialName = strings.TrimRight(industrialName, ";")
+	//}
 
 	////获取拒绝接收推送的的用户的 openid
 	//mapOpenidRefuset := make(map[int]string)

+ 1 - 1
services/cygx/research_summary.go

@@ -424,7 +424,7 @@ func DoArticleOnenIdWxTemplateMsg(articleId int, source int) (err error) {
 			//first := "您关注的产业有更新报告"
 			//keyword1 := industryName
 			first := "您关注的赛道,有新的报告发布/更新,欢迎查看"
-			keyword1 := "【" + industryName + "赛道】有报告发布/更新"
+			keyword1 := "【" + industryName + "】有报告发布/更新"
 			//如果有权限而且小助手没有提交过信息的 就做正常推送
 			if mapUserIdChooseSend[openIditem.UserId] == 0 {
 				services.SendWxMsgWithCygxActivityAppointmentNew(first, keyword1, keyword2, keyword3, keyword4, openIditem, articleId)