Browse Source

Merge branch 'mfyx_2.0' of http://8.136.199.33:3000/cxzhang/hongze_mfyx into debug

xingzai 1 year ago
parent
commit
75918b70ad
2 changed files with 26 additions and 15 deletions
  1. 7 0
      controllers/activity.go
  2. 19 15
      models/activity.go

+ 7 - 0
controllers/activity.go

@@ -1898,6 +1898,13 @@ func (this *ActivityCoAntroller) Check() {
 		resp.CheckEmail, resp.PopupMsg = services.CheckActivityUserEmail(activityInfo, user)
 		resp.CheckEmail, resp.PopupMsg = services.CheckActivityUserEmail(activityInfo, user)
 	} else {
 	} else {
 		resp.IsShowWxPay = utils.IS_SHOW_WX_PAY
 		resp.IsShowWxPay = utils.IS_SHOW_WX_PAY
+		resp.GoodsList = services.GetGoodsInfoByActivity(activityInfo) //单场活动信息
+		for _, v := range resp.GoodsList {
+			resp.PopupPriceMsg += v.PopupPriceMsg //价格弹窗信息
+		}
+		resp.IsShowWxPay = utils.IS_SHOW_WX_PAY                                                      //是否展示微信支付按钮
+		resp.IsCompanyApply = services.GetUserApplyRecordCountByCompanyIdPay(user.CompanyId)         //获取客户是否有过历史申请记录
+		resp.IsNeedBusinessCard = services.GetCygxUserBusinessCardCount(user.UserId, user.CompanyId) //是否需要上传名片
 	}
 	}
 	// 判断是否属于研选类型的活动
 	// 判断是否属于研选类型的活动
 	if strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
 	if strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {

+ 19 - 15
models/activity.go

@@ -73,21 +73,25 @@ type CygxActivity struct {
 }
 }
 
 
 type ActivityCheck struct {
 type ActivityCheck struct {
-	CheckPermission   bool   `description:"权限是否通过校验"`
-	HasPermission     int    `description:"操作方式,1:有该行业权限,正常展示,2:无该行业权限,3:潜在客户,未提交过申请,4:潜在客户,已提交过申请"`
-	PopupMsg          string `description:"权限弹窗信息"`
-	CancelPopupMsg    string `description:"取消报名时间弹窗信息"`
-	SellerMobile      string `description:"销售电话"`
-	SellerName        string `description:"销售姓名"`
-	Mobile            string `description:"手机号"`
-	IsResearch        bool   `description:"是否属于研选"`
-	IsResearchSpecial bool   `description:"是否属于特殊的研选"`
-	CheckTime         bool   `description:"时间是否通过校验"`
-	CheckEmail        bool   `description:"邮箱是否通过校验"`
-	CheckPoints       bool   `description:"扣点是否通过校验"`
-	CompanyPoints     string `description:"公司剩余点数"`
-	ActivityPoints    string `description:"本场活动要扣除的点数"`
-	IsShowWxPay       bool   `description:"是否展示微信支付"`
+	CheckPermission    bool                   `description:"权限是否通过校验"`
+	HasPermission      int                    `description:"操作方式,1:有该行业权限,正常展示,2:无该行业权限,3:潜在客户,未提交过申请,4:潜在客户,已提交过申请"`
+	PopupMsg           string                 `description:"权限弹窗信息"`
+	CancelPopupMsg     string                 `description:"取消报名时间弹窗信息"`
+	SellerMobile       string                 `description:"销售电话"`
+	SellerName         string                 `description:"销售姓名"`
+	Mobile             string                 `description:"手机号"`
+	IsResearch         bool                   `description:"是否属于研选"`
+	IsResearchSpecial  bool                   `description:"是否属于特殊的研选"`
+	CheckTime          bool                   `description:"时间是否通过校验"`
+	CheckEmail         bool                   `description:"邮箱是否通过校验"`
+	CheckPoints        bool                   `description:"扣点是否通过校验"`
+	CompanyPoints      string                 `description:"公司剩余点数"`
+	ActivityPoints     string                 `description:"本场活动要扣除的点数"`
+	PopupPriceMsg      string                 `description:"价格弹窗信息"`
+	IsShowWxPay        bool                   `description:"是否展示微信支付"`
+	IsCompanyApply     bool                   `description:"机构是否申请过试用"`
+	IsNeedBusinessCard bool                   `description:"是否需要上传名片"`
+	GoodsList          []*order.CygxGoodsResp `description:"商品信息"`
 }
 }
 
 
 type ActivityIdRep struct {
 type ActivityIdRep struct {