|
@@ -116,13 +116,13 @@ func (this *ActivityCoAntroller) ActivityList() {
|
|
|
companyDetail, err := models.GetCompanyDetailById(user.CompanyId)
|
|
|
|
|
|
if err != nil {
|
|
|
- br.Msg = "新增优化建议失败!"
|
|
|
+ br.Msg = "获取信息失败!"
|
|
|
br.ErrMsg = "获取客户详情失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
if companyDetail == nil {
|
|
|
- br.Msg = "新增优化建议失败!"
|
|
|
- br.ErrMsg = "客户不存在,uid:" + strconv.Itoa(user.UserId)
|
|
|
+ br.Msg = "获取信息失败!"
|
|
|
+ br.ErrMsg = "客户不存在,uid:" + strconv.Itoa(user.UserId) + "CompanyId:" + strconv.Itoa(user.CompanyId)
|
|
|
return
|
|
|
}
|
|
|
//1、永续客户
|
|
@@ -362,7 +362,7 @@ func (this *ActivityCoAntroller) Detail() {
|
|
|
resp.HaqveJurisdiction = true
|
|
|
} else {
|
|
|
if activityInfo.ActivityTypeId != 1 && activityInfo.ActivityTypeId != 3 && permissionStr == "专家" {
|
|
|
- resp.PopupMsg = "您暂无权限参加" + activityInfo.ActivityName + "类型活动,若想参加请联系对口销售--" + companyItem.SellerName + ":" + companyItem.Mobile
|
|
|
+ resp.PopupMsg = "您暂无权限参加" + activityInfo.ActivityTypeName + "类型活动,若想参加请联系对口销售--" + companyItem.SellerName + ":" + companyItem.Mobile
|
|
|
resp.SellerMobile = companyItem.Mobile
|
|
|
resp.OperationMode = "Call"
|
|
|
hasPermission = 2
|
|
@@ -482,7 +482,7 @@ func (this *ActivityCoAntroller) SignupAdd() {
|
|
|
//1专家电话会、2分析师电话会、3公司调研电话会、4公司线下调研、5专家线下沙龙、6分析师线下沙龙
|
|
|
//OperationMode string `description:"操作方式 Apply:立即申请、Call:拨号 为空则为有权限"`
|
|
|
if activityInfo.ActivityTypeId != 1 && activityInfo.ActivityTypeId != 3 && permissionStr == "专家" {
|
|
|
- resp.PopupMsg = "您暂无权限参加" + activityInfo.ActivityName + "类型活动,若想参加请联系对口销售--" + companyItem.SellerName + ":" + companyItem.Mobile
|
|
|
+ resp.PopupMsg = "您暂无权限参加" + activityInfo.ActivityTypeName + "类型活动,若想参加请联系对口销售--" + companyItem.SellerName + ":" + companyItem.Mobile
|
|
|
resp.SellerMobile = companyItem.Mobile
|
|
|
resp.OperationMode = "Call"
|
|
|
hasPermission = 2
|
|
@@ -502,10 +502,8 @@ func (this *ActivityCoAntroller) SignupAdd() {
|
|
|
br.Data = resp
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
//人数已满:FullStarffed、单机构超过两人:TwoPeople、爽约次数过多:BreakPromise、超时:Overtime 、成功:Success"`
|
|
|
//如果是下面几种情况则对报名信息做判断限制 (公司调研电话会(限制人数)、公司线下调研、专家/分析师线下沙龙)
|
|
|
-
|
|
|
if (activityInfo.ActivityTypeId == 3 && activityInfo.IsLimitPeople == 1) || activityInfo.ActivityTypeId > 3 {
|
|
|
//判断优先级:总人数限制→单机构2人限制→爽约3次限制
|
|
|
totalRestrict, err := models.GetUserRestrictCount(user.UserId)
|
|
@@ -514,7 +512,6 @@ func (this *ActivityCoAntroller) SignupAdd() {
|
|
|
br.ErrMsg = "获取客户信息失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
- fmt.Println(totalRestrict)
|
|
|
if totalRestrict >= 1 {
|
|
|
signupStatus = "BreakPromise"
|
|
|
item.FailType = 3
|
|
@@ -583,14 +580,12 @@ func (this *ActivityCoAntroller) SignupAdd() {
|
|
|
br.Data = resp
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
totalMy, err := models.GetActivitySignupByUserCount(uid, activityId)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = "获取失败,Err:" + err.Error()
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
if signupStatus != "Success" && totalMy == 0 {
|
|
|
item.UserId = uid
|
|
|
item.ActivityId = activityId
|