优化
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
|
atno []*pb.UserAtno
|
||||||
)
|
)
|
||||||
list, _ := this.module.modelLattice.getLatticeList(session.GetUserId(), req.Hdid)
|
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{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_ConfigNoFound,
|
Code: pb.ErrorCode_ConfigNoFound,
|
||||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||||
Message: err.Error(),
|
Message: err.Error(),
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
} else {
|
}
|
||||||
if len(conf.Openward) == 0 {
|
if len(conf.Openward) == 0 {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_ReqParameterError,
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
@ -41,7 +42,7 @@ func (this *apiComp) LatticeReward(session comm.IUserSession, req *pb.UiGameLatt
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
list, _ := this.module.modelLattice.getLatticeList(session.GetUserId(), req.Hdid)
|
|
||||||
if _, ok := list.Gotarr[req.Id]; ok {
|
if _, ok := list.Gotarr[req.Id]; ok {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_ActivityRepatReward,
|
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 := make(map[string]interface{}, 0)
|
||||||
update["gotarr"] = list.Gotarr
|
update["gotarr"] = list.Gotarr
|
||||||
this.module.modelLattice.modifyLatticeListByObjId(session.GetUserId(), update) // 修改进度
|
this.module.modelLattice.modifyLatticeListByObjId(session.GetUserId(), update) // 修改进度
|
||||||
}
|
|
||||||
|
|
||||||
session.SendMsg(string(this.module.GetType()), "latticereward", &pb.UiGameLatticeRewardResp{
|
session.SendMsg(string(this.module.GetType()), "latticereward", &pb.UiGameLatticeRewardResp{
|
||||||
Data: list,
|
Data: list,
|
||||||
|
Loading…
Reference in New Issue
Block a user