|
@@ -116,13 +116,13 @@ func (this *ActivityCoAntroller) ActivityList() {
|
|
companyDetail, err := models.GetCompanyDetailById(user.CompanyId)
|
|
companyDetail, err := models.GetCompanyDetailById(user.CompanyId)
|
|
|
|
|
|
if err != nil {
|
|
if err != nil {
|
|
- br.Msg = "新增优化建议失败!"
|
|
+ br.Msg = "获取信息失败!"
|
|
br.ErrMsg = "获取客户详情失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取客户详情失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if companyDetail == nil {
|
|
if companyDetail == nil {
|
|
- br.Msg = "新增优化建议失败!"
|
|
+ br.Msg = "获取信息失败!"
|
|
- br.ErrMsg = "客户不存在,uid:" + strconv.Itoa(user.UserId)
|
|
+ br.ErrMsg = "客户不存在,uid:" + strconv.Itoa(user.UserId) + "CompanyId:" + strconv.Itoa(user.CompanyId)
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
@@ -362,7 +362,7 @@ func (this *ActivityCoAntroller) Detail() {
|
|
resp.HaqveJurisdiction = true
|
|
resp.HaqveJurisdiction = true
|
|
} else {
|
|
} else {
|
|
if activityInfo.ActivityTypeId != 1 && activityInfo.ActivityTypeId != 3 && permissionStr == "专家" {
|
|
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.SellerMobile = companyItem.Mobile
|
|
resp.OperationMode = "Call"
|
|
resp.OperationMode = "Call"
|
|
hasPermission = 2
|
|
hasPermission = 2
|
|
@@ -482,7 +482,7 @@ func (this *ActivityCoAntroller) SignupAdd() {
|
|
|
|
|
|
|
|
|
|
if activityInfo.ActivityTypeId != 1 && activityInfo.ActivityTypeId != 3 && permissionStr == "专家" {
|
|
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.SellerMobile = companyItem.Mobile
|
|
resp.OperationMode = "Call"
|
|
resp.OperationMode = "Call"
|
|
hasPermission = 2
|
|
hasPermission = 2
|
|
@@ -502,10 +502,8 @@ func (this *ActivityCoAntroller) SignupAdd() {
|
|
br.Data = resp
|
|
br.Data = resp
|
|
return
|
|
return
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
if (activityInfo.ActivityTypeId == 3 && activityInfo.IsLimitPeople == 1) || activityInfo.ActivityTypeId > 3 {
|
|
if (activityInfo.ActivityTypeId == 3 && activityInfo.IsLimitPeople == 1) || activityInfo.ActivityTypeId > 3 {
|
|
|
|
|
|
totalRestrict, err := models.GetUserRestrictCount(user.UserId)
|
|
totalRestrict, err := models.GetUserRestrictCount(user.UserId)
|
|
@@ -514,7 +512,6 @@ func (this *ActivityCoAntroller) SignupAdd() {
|
|
br.ErrMsg = "获取客户信息失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取客户信息失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- fmt.Println(totalRestrict)
|
|
|
|
if totalRestrict >= 1 {
|
|
if totalRestrict >= 1 {
|
|
signupStatus = "BreakPromise"
|
|
signupStatus = "BreakPromise"
|
|
item.FailType = 3
|
|
item.FailType = 3
|
|
@@ -583,14 +580,12 @@ func (this *ActivityCoAntroller) SignupAdd() {
|
|
br.Data = resp
|
|
br.Data = resp
|
|
return
|
|
return
|
|
}
|
|
}
|
|
-
|
|
|
|
totalMy, err := models.GetActivitySignupByUserCount(uid, activityId)
|
|
totalMy, err := models.GetActivitySignupByUserCount(uid, activityId)
|
|
if err != nil {
|
|
if err != nil {
|
|
br.Msg = "获取失败"
|
|
br.Msg = "获取失败"
|
|
br.ErrMsg = "获取失败,Err:" + err.Error()
|
|
br.ErrMsg = "获取失败,Err:" + err.Error()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
-
|
|
|
|
if signupStatus != "Success" && totalMy == 0 {
|
|
if signupStatus != "Success" && totalMy == 0 {
|
|
item.UserId = uid
|
|
item.UserId = uid
|
|
item.ActivityId = activityId
|
|
item.ActivityId = activityId
|