|
@@ -733,33 +733,6 @@ func YanXuanActivityPointsBillSubmitMeetingReduce(log models.YanXuanActivityPoin
|
|
|
item.Points = mapCompanyPoints[user.CompanyId] + activityPointsSetDetail.UserPointsNum
|
|
|
items = append(items, item)
|
|
|
|
|
|
- //更新对应机构的剩余点数
|
|
|
- itemCompany := new(models.CygxActivityPointsCompany)
|
|
|
- itemCompany.CompanyId = user.CompanyId
|
|
|
- itemCompany.Points = item.Points
|
|
|
- itemCompany.ModifyTime = time.Now()
|
|
|
- itemCompanys = append(itemCompanys, itemCompany)
|
|
|
- mapCompanyPoints[user.CompanyId] = item.Points
|
|
|
- } else {
|
|
|
- //第三次提交改成已到会的,对其进行扣点处理
|
|
|
- item := new(models.CygxActivityPointsBill)
|
|
|
- item.ActivityId = activityId
|
|
|
- item.CreateTime = time.Now()
|
|
|
- item.UserId = user.UserId
|
|
|
- item.Mobile = user.Mobile
|
|
|
- item.Email = user.Email
|
|
|
- item.CompanyId = user.CompanyId
|
|
|
- item.CompanyName = user.CompanyName
|
|
|
- item.RealName = user.RealName
|
|
|
- item.RegisterPlatform = log.RegisterPlatform
|
|
|
- item.AdminId = log.AdminId
|
|
|
- item.Source = log.Source
|
|
|
- item.ChartPermissionId = activityInfo.ChartPermissionId
|
|
|
- item.BillDetailed = -activityPointsSetDetail.UserPointsNum
|
|
|
- item.DoType = 1
|
|
|
- item.Content = activityInfo.ActivityName + "--活动到会"
|
|
|
- item.Points = mapCompanyPoints[user.CompanyId] - activityPointsSetDetail.UserPointsNum
|
|
|
- items = append(items, item)
|
|
|
//更新对应机构的剩余点数
|
|
|
itemCompany := new(models.CygxActivityPointsCompany)
|
|
|
itemCompany.CompanyId = user.CompanyId
|
|
@@ -769,7 +742,6 @@ func YanXuanActivityPointsBillSubmitMeetingReduce(log models.YanXuanActivityPoin
|
|
|
mapCompanyPoints[user.CompanyId] = item.Points
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
e = models.AddCygxActivityPointsBillMulti(items, itemCompanys)
|
|
|
if e != nil && e.Error() != utils.ErrNoRow() {
|