Browse Source

Merge branch 'cygx_10.4' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 1 year ago
parent
commit
b2fbab43b6

+ 1 - 1
controllers/activity_sign.go

@@ -120,7 +120,7 @@ func (this *ActivitySignCoAntroller) Detail() {
 	go services.AddCygxActivitySigninLog(item)
 
 	//把报名信息写入签到到会表
-	go services.AddCygxActivityOfflineMeetingDetail(activityId)
+	go services.AddCygxActivityOfflineMeetingDetail(activityId, user)
 
 	if user.Mobile != "" || total > 0 {
 		resp.IsBindingMobile = true

+ 8 - 0
models/activity_signin.go

@@ -62,6 +62,14 @@ func GetCygxActivitySigninCount(condition string, pars []interface{}) (count int
 	return
 }
 
+// 修改是否推送消息状态
+func UpdatedateCygxActivitySignin(item *CygxActivitySignin) (err error) {
+	sql := ` UPDATE cygx_activity_signin SET  create_time= NOW()   WHERE   user_id = ?  AND activity_id = ? `
+	o := orm.NewOrm()
+	_, err = o.Raw(sql, item.UserId, item.ActivityId).Exec()
+	return
+}
+
 // 添加
 func AddCygxActivitySignin(item *CygxActivitySignin) (err error) {
 	o := orm.NewOrm()

+ 1 - 1
services/activity.go

@@ -1699,7 +1699,7 @@ func ActivityButtonShow(item *models.ActivityDetail) (articleDetail *models.Acti
 		return
 	}
 
-	articleDetail.Expert, _ = GetReportContentTextSub(item.Expert)
+	//articleDetail.Expert, _ = GetReportContentTextSub(item.Expert)
 
 	//专家电话会 1
 	if articleDetail.ActivityTypeId == 1 && articleDetail.IsLimitPeople == 0 && (articleDetail.ActiveState == "1" || articleDetail.ActiveState == "2") {

+ 8 - 2
services/activity_signin.go

@@ -31,12 +31,16 @@ func AddCygxActivitySigninLog(item *models.CygxActivitySignin) (err error) {
 	itemLog.CountryCode = item.CountryCode
 	itemLog.CreateTime = time.Now()
 	err = models.AddCygxActivitySigninLog(itemLog)
+	if err != nil {
+		return
+	}
 
+	err = models.UpdatedateCygxActivitySignin(item)
 	return
 }
 
 // AddCygxActivityOfflineMeetingDetail 扫码签到日志记录
-func AddCygxActivityOfflineMeetingDetail(activityid int) (err error) {
+func AddCygxActivityOfflineMeetingDetail(activityid int, user *models.WxUserItem) (err error) {
 	defer func() {
 		if err != nil {
 			fmt.Println(err)
@@ -77,7 +81,9 @@ func AddCygxActivityOfflineMeetingDetail(activityid int) (err error) {
 			item.Mobile = v.Mobile
 			item.CompanyId = v.CompanyId
 			item.CompanyName = v.CompanyName
-			item.IsMeeting = 1
+			if user.UserId == v.UserId {
+				item.IsMeeting = 1
+			}
 			items = append(items, item)
 		}
 	}

+ 3 - 3
services/article.go

@@ -1334,7 +1334,7 @@ func DoArticleOnenIdWxTemplateMsg(articleId int) (err error) {
 	if articleInfo.ReportType == 1 && chartPermissionId != utils.CE_LUE_ID && chartPermissionId != utils.GU_SHOU_ID {
 		for _, item := range openidPowerList {
 			first := "您关注的赛道,有新的报告发布/更新,欢迎查看"
-			keyword1 := "所属赛道:" + articleInfo.SubCategoryName
+			keyword1 := "【" + articleInfo.SubCategoryName + "】有报告发布/更新"
 			openIditem := new(models.OpenIdList)
 			openIditem.OpenId = item.OpenId
 			openIditem.UserId = item.UserId
@@ -1412,7 +1412,7 @@ func DoArticleOnenIdWxTemplateMsg(articleId int) (err error) {
 			openIditem.UserId = k
 			openIditem.OpenId = v
 			first := "您关注的赛道,有新的报告发布/更新,欢迎查看"
-			keyword1 := "所属赛道:" + industryName
+			keyword1 := "【" + articleInfo.SubCategoryName + "】有报告发布/更新"
 			mapActivityUserId := make(map[int]string)
 			if articleInfo.IsSummary == 1 {
 				sliceSubjectId, _ := models.GetSubjectIds(articleId)
@@ -1500,7 +1500,7 @@ func DoArticleOnenIdWxTemplateMsg(articleId int) (err error) {
 			openIditem.UserId = k
 			openIditem.OpenId = v
 			first := "您关注的赛道,有新的报告发布/更新,欢迎查看"
-			keyword1 := "所属赛道:" + industryName
+			keyword1 := "【" + articleInfo.SubCategoryName + "】有报告发布/更新"
 			mapActivityUserId := make(map[int]string)
 			if articleInfo.IsSummary == 1 {
 				sliceSubjectId, _ := models.GetSubjectIds(articleId)