优化
This commit is contained in:
parent
9dcaf0e2a8
commit
2005ba62d8
@ -26,14 +26,15 @@ func (this *apiComp) LatticeReward(session comm.IUserSession, req *pb.UiGameLatt
|
||||
atno []*pb.UserAtno
|
||||
)
|
||||
list, _ := this.module.modelLattice.getLatticeList(session.GetUserId(), req.Hdid)
|
||||
if conf, err := this.module.configure.GetLatticeConf(req.Id); err != nil {
|
||||
conf, err := this.module.configure.GetLatticeConf(req.Id)
|
||||
if err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||
Message: err.Error(),
|
||||
}
|
||||
return
|
||||
} else {
|
||||
}
|
||||
if len(conf.Openward) == 0 {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ReqParameterError,
|
||||
@ -41,7 +42,7 @@ func (this *apiComp) LatticeReward(session comm.IUserSession, req *pb.UiGameLatt
|
||||
}
|
||||
return
|
||||
}
|
||||
list, _ := this.module.modelLattice.getLatticeList(session.GetUserId(), req.Hdid)
|
||||
|
||||
if _, ok := list.Gotarr[req.Id]; ok {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ActivityRepatReward,
|
||||
@ -58,7 +59,6 @@ func (this *apiComp) LatticeReward(session comm.IUserSession, req *pb.UiGameLatt
|
||||
update := make(map[string]interface{}, 0)
|
||||
update["gotarr"] = list.Gotarr
|
||||
this.module.modelLattice.modifyLatticeListByObjId(session.GetUserId(), update) // 修改进度
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), "latticereward", &pb.UiGameLatticeRewardResp{
|
||||
Data: list,
|
||||
|
Loading…
Reference in New Issue
Block a user