xingzai vor 1 Jahr
Ursprung
Commit
8b6d16325d

+ 131 - 1
controllers/activity.go

@@ -2,6 +2,7 @@ package controllers
 
 import (
 	"encoding/json"
+	"fmt"
 	"github.com/rdlucklib/rdluck_tools/paging"
 	"hongze/hongze_clpt/models"
 	"hongze/hongze_clpt/services"
@@ -120,6 +121,8 @@ func (this *ActivityController) LabelTypeList() {
 // @Param   KeyWord   query   string  false       "搜索关键词 多个用 , 隔开"
 // @Param   ActivityId   query   int  false       "活动列表传过来的活动ID"
 // @Param   Filter			query	int		false	"筛选条件 0:全部 1:视频 2:音频"
+// @Param   IsExternalLabel   query   int  false       "是否仅展示外部资源 1:是、0:否 默认0"
+// @Param   IsResearchPoints   query   int  false       "是否仅展示研选扣点 1:是、0:否 默认0"
 // @Success 200 {object} models.GetCygxActivityListRep
 // @router /list [get]
 func (this *ActivityController) ActivityListNew() {
@@ -147,7 +150,16 @@ func (this *ActivityController) ActivityListNew() {
 	keyWord := this.GetString("KeyWord")
 	playBack, _ := this.GetInt("PlayBack")
 	filter, _ := this.GetInt("Filter")
-	activityId, _ := this.GetInt("ActivityId") // 仅用于判断【新】标签
+	activityId, _ := this.GetInt("ActivityId")             // 仅用于判断【新】标签
+	isExternalLabel, _ := this.GetInt("IsExternalLabel")   //
+	isResearchPoints, _ := this.GetInt("IsResearchPoints") //
+
+	if isExternalLabel == 1 {
+
+	}
+	if isResearchPoints == 1 {
+
+	}
 
 	var startSize int
 	if pageSize <= 0 {
@@ -658,6 +670,22 @@ func (this *ActivityController) SignupAdd() {
 	}
 	activityId := req.ActivityId
 	signupType := req.SignupType
+	email := req.Email
+
+	//如果用户传了邮箱就绑定邮箱
+	if email != "" && user.Email == "" {
+		if !utils.ValidateEmailFormatat(req.Email) {
+			br.Msg = "邮箱格式错误,请重新输入"
+			br.ErrMsg = "邮箱格式错误,请重新输入"
+			return
+		}
+		user.Email = req.Email
+		err = models.UpdateUserEmail(email, uid)
+		if err != nil {
+			br.Msg = "操作失败"
+			br.ErrMsg = "绑定客户邮箱失败!"
+		}
+	}
 	hasPermission := 0
 	if signupType == 1 && user.Mobile == "" && user.OutboundMobile == "" {
 		resp.GoBindEmail = true
@@ -711,6 +739,18 @@ func (this *ActivityController) SignupAdd() {
 			br.ErrMsg = "获取对应销售失败,Err:" + err.Error()
 			return
 		}
+
+		popupMsg, err := services.CheckActivityUserAll(activityInfo, user)
+		if err != nil {
+			br.Msg = "报名失败!"
+			br.ErrMsg = "CheckActivityUserAll,Err:" + err.Error()
+			return
+		}
+		if popupMsg != "" {
+			br.Msg = "报名失败!"
+			br.ErrMsg = fmt.Sprint("userId:", uid, "Activity:id", popupMsg)
+			return
+		}
 		//人数已满:FullStarffed、单机构超过两人:TwoPeople、爽约次数过多:BreakPromise、超时:Overtime 、成功:Success"`
 		//如果是下面几种情况则对报名信息做判断限制 (公司调研电话会(限制人数)、公司线下调研、专家/分析师线下沙龙)
 		//if (activityInfo.ActivityTypeId == 3 && activityInfo.IsLimitPeople == 1) || activityInfo.ActivityTypeId > 3 {
@@ -2025,3 +2065,93 @@ func (this *ActivityController) ScheduleList() {
 	br.Msg = "获取成功"
 	br.Data = resp
 }
+
+// @Title 活动报名之前的校验(权限、时间、点数、邮箱)
+// @Description 活动报名之前的校验(权限、时间、点数、邮箱)接口
+// @Param	request	body models.ActivityIdRep true "type json string"
+// @Success Ret=200 {object} models.SignupStatus
+// @router /check [post]
+func (this *ActivityController) Check() {
+	br := new(models.BaseResponse).Init()
+	defer func() {
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+	user := this.User
+	if user == nil {
+		br.Msg = "请登录"
+		br.ErrMsg = "请登录,用户信息为空"
+		br.Ret = 408
+		return
+	}
+	var req models.ActivityIdRep
+	err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+	activityId := req.ActivityId
+	activityInfo, errInfo := models.GetAddActivityInfoById(activityId)
+	if activityInfo == nil {
+		br.Msg = "操作失败"
+		br.ErrMsg = "活动ID错误,不存在activityId:" + strconv.Itoa(activityId)
+		return
+	}
+	if errInfo != nil {
+		br.Msg = "操作失败"
+		br.ErrMsg = "操作失败,Err:" + errInfo.Error()
+		return
+	}
+	//这里的文案顺序提示 权限>时间>研选扣点>邮箱绑定。
+	resp := new(models.ActivityCheck)
+	hasPermission := 0
+	havePower, isResearchSpecial, err := services.GetActivityDetailUserPower(user, activityInfo)
+	if err != nil {
+		br.Msg = "获取信息失败"
+		br.ErrMsg = "校验用户权限失败,Err:" + err.Error()
+		return
+	}
+	resp.IsResearchSpecial = isResearchSpecial
+	if havePower {
+		hasPermission = 1
+		resp.CheckPermission = true
+		resp.HasPermission = hasPermission
+	} else {
+		hasPermission, sellerName, sellerMobile, popupMsg, err := services.GetUserHasPermission(user)
+		if err != nil {
+			br.Msg = "获取信息失败"
+			br.ErrMsg = "判断是否已申请过试用失败,Err:" + err.Error()
+			return
+		}
+		resp.PopupMsg = popupMsg
+		resp.HasPermission = hasPermission
+		resp.SellerName = sellerName
+		resp.SellerMobile = sellerMobile
+	}
+	if resp.CheckPermission {
+		//如果权限通过了校验,那么就来校验时间
+		resp.CheckTime, resp.PopupMsg = services.CheckSiginupDeadline(activityInfo)
+	}
+	if resp.CheckTime {
+		// 如果时间通过校验就校验点数
+		resp.CheckPoints, resp.PopupMsg, resp.CompanyPoints, resp.ActivityPoints, err = services.CheckActivityPoints(activityInfo, user)
+		if err != nil {
+			br.Msg = "获取信息失败"
+			br.ErrMsg = "CheckActivityPoints,Err:" + err.Error()
+			return
+		}
+	}
+
+	if resp.CheckPoints {
+		//如果通过点数的校验,就来校验邮箱
+		resp.CheckEmail, resp.PopupMsg = services.CheckActivityUserEmail(activityInfo, user)
+	}
+	// 判断是否属于研选类型的活动
+	if strings.Contains(activityInfo.ChartPermissionName, utils.CHART_PERMISSION_NAME_YANXUAN) {
+		resp.IsResearch = true
+	}
+	br.Ret = 200
+	br.Success = true
+	br.Data = resp
+}

+ 1 - 0
controllers/config.go

@@ -35,6 +35,7 @@ func (this *ConfigController) IsShow() {
 	}
 	var resp models.IsShow
 	resp.IsBelongRai = services.GetBelongingRai(user.Mobile)
+	resp.IsShowResearchPoints = true
 	br.Ret = 200
 	br.Success = true
 	br.Data = resp

+ 23 - 0
models/activity.go

@@ -59,6 +59,7 @@ type CygxActivity struct {
 	IsCanAppointmentMinutes int       `description:"是否可预约纪要 1是 ,0 否 默认0 "`
 	YidongActivityId        string    `description:"易董活动ID"`
 	IsExternalLabel         int       `description:"是否为外部资源 1是,0否"`
+	IsResearchPoints        int       `description:"是否为研选扣点"`
 }
 
 // 活动详情
@@ -146,6 +147,10 @@ type ActivityDetail struct {
 	IsCanOutboundCall       int                        `description:"是否提供外呼 1:是 、0:否"`
 	TencentConferenceNumber string                     `description:"腾讯会议号"`
 	IsResearchSpecial       bool                       `description:"是否属于特殊的研选"`
+	IsNeedEmail             int                        `description:"是否需要提供邮箱 1是,0否"`
+	SiginupDeadline         string                     `description:"报名截止时间"`
+	IsExternalLabel         bool                       `description:"是否为外部资源"`
+	IsResearchPoints        bool                       `description:"是否为研选扣点"`
 }
 
 // 活动详情
@@ -216,6 +221,24 @@ type ActivityListResp struct {
 	IsCanOutboundCall       int                        `description:"是否提供外呼 1:是 、0:否"`
 	TencentConferenceNumber string                     `description:"腾讯会议号"`
 	IsResearchSpecial       bool                       `description:"是否属于特殊的研选"`
+	IsExternalLabel         bool                       `description:"是否为外部资源"`
+	IsResearchPoints        bool                       `description:"是否为研选扣点"`
+}
+
+type ActivityCheck struct {
+	CheckPermission   bool   `description:"权限是否通过校验"`
+	HasPermission     int    `description:"操作方式,1:有该行业权限,正常展示,2:无该行业权限,3:潜在客户,未提交过申请,4:潜在客户,已提交过申请"`
+	PopupMsg          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:"本场活动要扣除的点数"`
 }
 
 type ActivityArticleResp struct {

+ 23 - 0
models/activity_points_company.go

@@ -0,0 +1,23 @@
+package models
+
+import (
+	"github.com/beego/beego/v2/client/orm"
+	"time"
+)
+
+type CygxActivityPointsCompany struct {
+	Id          int       `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`
+	CompanyId   int       `gorm:"column:company_id;default:0" json:"company_id"`  // 公司ID
+	CompanyName string    `gorm:"column:company_name" json:"company_name"`        // 公司名称
+	Points      float64   `gorm:"column:points;default:0;NOT NULL" json:"points"` // 公司剩余点数
+	CreateTime  time.Time `gorm:"column:create_time;NOT NULL" json:"create_time"` // 创建时间
+	ModifyTime  time.Time `gorm:"column:modify_time;NOT NULL" json:"modify_time"` // 更新时间
+}
+
+// 获取公司剩余点数
+func GetCompanyPoints(companyId int) (comapnyPointsNum float64, err error) {
+	o := orm.NewOrm()
+	sql := `SELECT points FROM cygx_activity_points_company  WHERE company_id=? `
+	err = o.Raw(sql, companyId).QueryRow(&comapnyPointsNum)
+	return
+}

+ 77 - 0
models/activity_points_set.go

@@ -0,0 +1,77 @@
+package models
+
+import (
+	"github.com/beego/beego/v2/client/orm"
+	"time"
+)
+
+type CygxActivityPointsSet struct {
+	Id               int       `gorm:"column:id;primary_key;AUTO_INCREMENT" json:"id"`
+	ActivityId       int       `gorm:"column:activity_id;NOT NULL" json:"activity_id"`                         // 活动ID
+	PointsObject     int       `gorm:"column:points_object;default:1;NOT NULL" json:"points_object"`           // 扣点对象,1:参会人、2:办会人、3:办会人和参会人
+	CompanyId        int       `gorm:"column:company_id;default:0;NOT NULL" json:"company_id"`                 // 公司ID
+	CompanyName      string    `gorm:"column:company_name;NOT NULL" json:"company_name"`                       // 公司名称
+	UserPointsNum    string    `gorm:"column:user_points_num;default:0;NOT NULL" json:"user_points_num"`       // 参会人扣点数量
+	PointsType       int       `gorm:"column:points_type;default:0;NOT NULL" json:"points_type"`               // 扣点形式,1:报名即扣点,2:到会即扣点
+	CompanyPointsNum string    `gorm:"column:company_points_num;default:0;NOT NULL" json:"company_points_num"` // 办会人扣点数量
+	CreateTime       time.Time `gorm:"column:create_time;NOT NULL" json:"create_time"`                         // 创建时间
+	ModifyTime       time.Time `gorm:"column:modify_time;NOT NULL" json:"modify_time"`                         // 更新时间
+}
+
+type CygxActivityPointsSetRsq struct {
+	ActivityId       int    `gorm:"column:activity_id;NOT NULL" json:"ActivityId"`                        // 活动ID
+	PointsObject     int    `gorm:"column:points_object;default:1;NOT NULL" json:"PointsObject"`          // 扣点对象,1:参会人、2:办会人、3:办会人和参会人
+	CompanyId        int    `gorm:"column:company_id;default:0;NOT NULL" json:"CompanyId"`                // 公司ID
+	CompanyName      string `gorm:"column:company_name;NOT NULL" json:"CompanyName"`                      // 公司名称
+	UserPointsNum    string `gorm:"column:user_points_num;default:0;NOT NULL" json:"UserPointsNum"`       // 参会人扣点数量
+	PointsType       int    `gorm:"column:points_type;default:0;NOT NULL" json:"PointsType"`              // 扣点形式,1:报名即扣点,2:到会即扣点
+	CompanyPointsNum string `gorm:"column:company_points_num;default:0;NOT NULL" json:"CompanyPointsNum"` // 办会人扣点数量
+}
+
+type CygxActivityPointsSetConfigListResp struct {
+	List []*CygxActivityPointsSetConfigResp
+}
+
+type CygxActivityPointsSetConfigResp struct {
+	PointsNum string `gorm:"column:user_points_num;default:0;NOT NULL" json:"PointsNum"` // 扣点数量
+}
+
+// 通过活动ID获取详情
+func GetCygxActivityPointsSetDetail(activityId int) (item *CygxActivityPointsSetRsq, err error) {
+	o := orm.NewOrm()
+	sql := `SELECT * FROM cygx_activity_points_set  WHERE activity_id=? `
+	err = o.Raw(sql, activityId).QueryRow(&item)
+	return
+}
+
+// 通过活动ID获取详情
+func GetCygxActivityPointsSetUserNum(activityId int) (userPointsNum float64, err error) {
+	o := orm.NewOrm()
+	sql := `SELECT user_points_num FROM cygx_activity_points_set  WHERE activity_id=? `
+	err = o.Raw(sql, activityId).QueryRow(&userPointsNum)
+	return
+}
+
+// 通过互动ID获取数量
+func GetCygxActivityPointsSetCountByActivityId(ActivityId int) (count int, err error) {
+	sqlCount := ` SELECT COUNT(1) AS count  FROM cygx_activity_points_set  WHERE activity_id=?   `
+	o := orm.NewOrm()
+	err = o.Raw(sqlCount, ActivityId).QueryRow(&count)
+	return
+}
+
+// 列表
+func GetCygxActivityPointsSetList(condition string, pars []interface{}, startSize, pageSize int) (items []*CygxActivityPointsSet, err error) {
+	o := orm.NewOrm()
+	sql := `SELECT * FROM cygx_activity_points_set as art WHERE 1= 1 `
+	if condition != "" {
+		sql += condition
+	}
+	if startSize+pageSize == 0 {
+		_, err = o.Raw(sql, pars).QueryRows(&items)
+	} else {
+		sql += ` LIMIT ?,?  `
+		_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	}
+	return
+}

+ 3 - 2
models/activity_signup.go

@@ -43,8 +43,9 @@ type SignupStatus struct {
 	IsResearchSpecial bool   `description:"是否属于特殊的研选"`
 }
 type ActivitySingnupRep struct {
-	ActivityId int `description:"活动id"`
-	SignupType int `description:"报名方式,,1预约外呼,2自主拨入,3我要报名"`
+	ActivityId int    `description:"活动id"`
+	SignupType int    `description:"报名方式,,1预约外呼,2自主拨入,3我要报名"`
+	Email      string `description:"邮箱号"`
 }
 
 // 我的日程

+ 1 - 0
models/activity_type.go

@@ -53,6 +53,7 @@ type CygxActivityLabelList struct {
 	IsNew             bool   `description:"是否为新:活动存在关联的的产业所关联的报告均在3个月内/无报告则标记新"`
 	YidongActivityId  int    `description:"易董活动ID"`
 	IsExternalLabel   bool   `description:"是否为外部资源"`
+	IsResearchPoints  bool   `description:"是否为研选扣点"`
 	IsShowSubjectName int    `description:"小程序内是否展示标的名称 1是 ,0否 默认0 "`
 	TemporaryLabel    string `description:"临时标签"`
 	TripStatus        int    `description:"行程进行状态 1:预报名,2:确定行程"`

+ 2 - 1
models/config.go

@@ -86,7 +86,8 @@ type MicroRoadShowDefaultImg struct {
 }
 
 type IsShow struct {
-	IsBelongRai bool `description:"是否属于权益内部人员"`
+	IsBelongRai          bool `description:"是否属于权益内部人员"`
+	IsShowResearchPoints bool `description:"是否展示研选扣点搜索"`
 }
 
 // 关于我们

+ 8 - 0
models/user.go

@@ -352,6 +352,14 @@ func UpdateUserHeadimgurl(headimgurl string, userId int) (err error) {
 	return
 }
 
+// 更改用户邮箱号
+func UpdateUserEmail(email string, userId int) (err error) {
+	o := orm.NewOrm()
+	sql := `UPDATE wx_user SET email = ? WHERE user_id=? `
+	_, err = o.Raw(sql, email, userId).Exec()
+	return
+}
+
 func GetArticleUserCollectCount(userId int) (count int, err error) {
 	sql := `SELECT COUNT(1) AS count FROM cygx_article_collect AS a INNER JOIN cygx_article as art ON art.article_id = a.article_id WHERE a.user_id=? AND art.publish_status = 1  `
 	err = orm.NewOrm().Raw(sql, userId).QueryRow(&count)

+ 9 - 0
routers/commentsRouter.go

@@ -34,6 +34,15 @@ func init() {
             Filters: nil,
             Params: nil})
 
+    beego.GlobalControllerRouter["hongze/hongze_clpt/controllers:ActivityController"] = append(beego.GlobalControllerRouter["hongze/hongze_clpt/controllers:ActivityController"],
+        beego.ControllerComments{
+            Method: "Check",
+            Router: `/check`,
+            AllowHTTPMethods: []string{"post"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
     beego.GlobalControllerRouter["hongze/hongze_clpt/controllers:ActivityController"] = append(beego.GlobalControllerRouter["hongze/hongze_clpt/controllers:ActivityController"],
         beego.ControllerComments{
             Method: "Detail",

+ 3 - 0
services/activity.go

@@ -377,6 +377,9 @@ func HandleActivityTypeHomeList(listType []*models.ActivityTypeHome, listActivit
 		if v.IsExternalLabel > 0 {
 			item.IsExternalLabel = true
 		}
+		if v.IsResearchPoints > 0 {
+			item.IsResearchPoints = true
+		}
 		item.City = v.City
 		if utf8.RuneCountInString(v.City) != 2 {
 			item.City = ""

+ 49 - 0
services/activity_points.go

@@ -0,0 +1,49 @@
+package services
+
+import (
+	"errors"
+	"fmt"
+	"hongze/hongze_clpt/models"
+	"hongze/hongze_clpt/utils"
+)
+
+//func init() {
+//	GetActivityPointsAll()
+//}
+
+// GetActivityPointsAll 获取所有带有扣点的活动
+func GetActivityPointsAll() (listxActivity []*models.CygxActivity, err error) {
+	defer func() {
+		if err != nil {
+			fmt.Println(err)
+			go utils.SendAlarmMsg("获取所有带有扣点的活动失败"+err.Error(), 2)
+		}
+	}()
+	var condition string
+	var pars []interface{}
+	listxActivity = make([]*models.CygxActivity, 0)
+	list, e := models.GetCygxActivityPointsSetList(condition, pars, 0, 0)
+	if e != nil && e.Error() != utils.ErrNoRow() {
+		err = errors.New("GetCygxActivityPointsSetList,Err: " + e.Error())
+		return
+	}
+	var activityIds []int
+	for _, v := range list {
+		activityIds = append(activityIds, v.ActivityId)
+	}
+	lenArr := len(activityIds)
+	if lenArr == 0 {
+		return
+	}
+	//condition = ` AND art.activity_id IN (` + utils.GetOrmInReplace(lenArr) + `)`
+	//pars = append(pars, activityIds)
+	//listxActivity, e = models.GetCygxActivityList(condition, pars, 0, lenArr)
+	//if e != nil && e.Error() != utils.ErrNoRow() {
+	//	err = errors.New("GetCygxActivityList,Err: " + e.Error())
+	//	return
+	//}
+	//for _, v := range listxActivity {
+	//	fmt.Println(v)
+	//}
+	return
+}

+ 70 - 0
services/activity_signup.go

@@ -2,8 +2,10 @@ package services
 
 import (
 	"errors"
+	"fmt"
 	"hongze/hongze_clpt/models"
 	"hongze/hongze_clpt/utils"
+	"time"
 )
 
 // GetActivitySignupResp 处理用户的报名方式
@@ -73,3 +75,71 @@ func CheckActivitySignUpLimit(user *models.WxUserItem, activityInfo *models.Acti
 	return
 
 }
+
+// 校验报名截止时间
+func CheckSiginupDeadline(activityInfo *models.ActivityDetail) (checkTime bool, popupMsg string) {
+	checkTime = true
+	if activityInfo.SiginupDeadline != utils.FormatDateTimeInit {
+		timeResp := utils.StrTimeToTime(activityInfo.SiginupDeadline)
+		if timeResp.Before(time.Now()) {
+			checkTime = false
+			popupMsg = "该活动已截止报名\n\n若想参加,请联系对口销售"
+		}
+	}
+	return
+}
+
+// 校验报名点数
+func CheckActivityPoints(activityInfo *models.ActivityDetail, wxUser *models.WxUserItem) (checkPoints bool, popupMsg, companyPoints, activityPoints string, err error) {
+	checkPoints = true
+	if activityInfo.IsResearchPoints {
+		//获取活动对用户要扣的点
+		userPointsNum, e := models.GetCygxActivityPointsSetUserNum(activityInfo.ActivityId)
+		if e != nil {
+			err = errors.New("GetActivitySignupSuccessByUserCountNoHz, Err: " + e.Error())
+			return
+		}
+		// 获取用户所在公司剩余的点
+		companyPointsNum, e := models.GetCompanyPoints(wxUser.CompanyId)
+		if e != nil && e.Error() != utils.ErrNoRow() {
+			err = errors.New("GetCompanyPoints, Err: " + e.Error())
+			return
+		}
+		if companyPointsNum-userPointsNum < 0 {
+			checkPoints = false
+			popupMsg = "点数不足,若想报名,\n请联系对口销售充值\n\n当前剩余点数:0\n本次会议扣除点数:0.5"
+		}
+		companyPoints = fmt.Sprint(companyPointsNum)
+		activityPoints = fmt.Sprint(userPointsNum)
+	}
+	return
+}
+
+// 校验报名是否需要绑定邮箱
+func CheckActivityUserEmail(activityInfo *models.ActivityDetail, wxUser *models.WxUserItem) (checkEmail bool, popupMsg string) {
+	checkEmail = true
+	if activityInfo.IsNeedEmail == 1 {
+		if wxUser.Email == "" {
+			checkEmail = false
+			popupMsg = "应上市公司要求,该会议报名需\n提供邮箱,请填写您的工作邮箱"
+		}
+	}
+	return
+}
+
+// 校验报名是否需要绑定邮箱
+func CheckActivityUserAll(activityInfo *models.ActivityDetail, wxUser *models.WxUserItem) (popupMsg string, err error) {
+	_, popupMsg = CheckSiginupDeadline(activityInfo)
+	if popupMsg != "" {
+		return
+	}
+	_, popupMsg, _, _, err = CheckActivityPoints(activityInfo, wxUser)
+	if popupMsg != "" {
+		return
+	}
+	_, popupMsg = CheckActivityUserEmail(activityInfo, wxUser)
+	if popupMsg != "" {
+		return
+	}
+	return
+}

+ 1 - 0
utils/constants.go

@@ -12,6 +12,7 @@ const (
 	HlbFormatDateTime      = "2006-01-02_15:04:05.999" //完整时间格式
 	FormatDateTimeNoSecond = "2006-01-02 15:04"        //完整时间格式
 	FormatDateTimeUnSpace  = "20060102150405"          //完整时间格式
+	FormatDateTimeInit     = "0000-00-00 00:00:00"     //为空的初始化时间格式
 	FormatYearDate         = "2006"                    //日期格式
 	PageSize15             = 15                        //列表页每页数据量
 	PageSize5              = 5