活动修改
This commit is contained in:
parent
e94f325002
commit
4e07455a63
@ -294,9 +294,31 @@ func (this *Activity) GetHdData(session comm.IUserSession, oids []string) (resul
|
||||
continue
|
||||
}
|
||||
}
|
||||
if activity.Itype == pb.HdType_HdCelebration {
|
||||
if activity.Itype == pb.HdType_HdCelebration || activity.Itype == pb.HdType_HdLevel || activity.Itype == pb.HdType_HdTypeSign {
|
||||
list, _ = this.modelhdData.getHddataByOid(session.GetUserId(), id)
|
||||
|
||||
if activity.Itype == pb.HdType_HdTypeSign {
|
||||
if list.Val == 0 || !utils.IsToday(list.Lasttime) {
|
||||
list.Lasttime = curTime
|
||||
list.Val += 1
|
||||
update := make(map[string]interface{})
|
||||
update["lasttime"] = list.Lasttime
|
||||
update["val"] = list.Val
|
||||
this.modelhdData.ModifyActivityList(session.GetUserId(), list.Id, update)
|
||||
}
|
||||
}
|
||||
// 开服等级活动
|
||||
if activity.Itype == pb.HdType_HdLevel {
|
||||
if user, err := this.ModuleUser.GetUser(session.GetUserId()); err == nil {
|
||||
if list.Val != user.Lv {
|
||||
list.Val = user.Lv
|
||||
list.Lasttime = curTime
|
||||
update := make(map[string]interface{})
|
||||
update["lasttime"] = list.Lasttime
|
||||
update["val"] = list.Val
|
||||
this.modelhdData.ModifyActivityList(session.GetUserId(), list.Id, update)
|
||||
}
|
||||
}
|
||||
}
|
||||
// 获取开服庆典活动
|
||||
if activity.Itype == pb.HdType_HdCelebration {
|
||||
// key := fmt.Sprintf("%s-%s", session.GetUserId(), id)
|
||||
|
Loading…
Reference in New Issue
Block a user