Преглед изворни кода

Merge branch 'master' of http://8.136.199.33:3000/cxzhang/hongze_clpt into cygx_10.5

xingzai пре 1 година
родитељ
комит
e59ba6fb02
2 измењених фајлова са 8 додато и 6 уклоњено
  1. 4 5
      controllers/activity.go
  2. 4 1
      controllers/user.go

+ 4 - 5
controllers/activity.go

@@ -597,11 +597,11 @@ func (this *ActivityController) Detail() {
 			return
 		}
 		detailResp.SignupType = mapActivitySignup[activityId]
-		// 暂时写死,客户需要 5.16
-		if activityInfo.ActivityId == 2992 {
-			detailResp.ActivityTypeName = "分析师线下沙龙"
-		}
 		resp.Detail = detailResp
+		// 判断是否属于研选类型的活动
+		if strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
+			resp.Detail.IsResearch = true
+		}
 	} else {
 		hasPermission, sellerName, sellerMobile, popupMsg, err := services.GetUserHasPermission(user)
 		if err != nil {
@@ -618,7 +618,6 @@ func (this *ActivityController) Detail() {
 	// 判断是否属于研选类型的活动
 	if strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
 		resp.IsResearch = true
-		resp.Detail.IsResearch = true
 	}
 	br.Ret = 200
 	br.Success = true

+ 4 - 1
controllers/user.go

@@ -556,7 +556,10 @@ func (this *UserController) ApplyTryOut() {
 	//	utils.FileLog.Info("推送消息 %s %s,%s,%s,%s", req.RealName, req.CompanyName, mobile, openIpItem.OpenId, applyMethod)
 	//	go services.SendPermissionApplyTemplateMsg(req.RealName, req.CompanyName, mobile, applyMethod, openIpItem)
 	//}
-	go services.SendPermissionApplyTemplateMsgAdmin(req, mobile, applyMethod, isResearch)
+	//如果对应销售不存在就给王芳,汪洋推模版消息
+	if sellerItem == nil {
+		go services.SendPermissionApplyTemplateMsgAdmin(req, mobile, applyMethod, isResearch)
+	}
 
 	err = models.AddApplyRecord(&req, user.Mobile, user.CompanyName, uid, user.CompanyId, CompanyIdType)
 	if err != nil {