武馆积分奖励发送

This commit is contained in:
meixiongfeng 2023-03-29 11:31:28 +08:00
parent 39e7125c0e
commit 51a47bc312

View File

@ -39,12 +39,15 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.AtlasAwardReq) (co
this.module.DispenseRes(session, res, true) this.module.DispenseRes(session, res, true)
for _, v := range res { for _, v := range res {
for _, v1 := range respRes {
bFind := false bFind := false
for _, v1 := range respRes {
if v1.A == v.A && v1.T == v.T { if v1.A == v.A && v1.T == v.T {
v1.N += v.N v1.N += v.N
bFind = true bFind = true
} }
}
if !bFind { if !bFind {
respRes = append(respRes, &pb.UserAssets{ respRes = append(respRes, &pb.UserAssets{
A: v.A, A: v.A,
@ -53,7 +56,6 @@ func (this *apiComp) Award(session comm.IUserSession, req *pb.AtlasAwardReq) (co
}) })
} }
} }
}
update := make(map[string]interface{}) update := make(map[string]interface{})
update["award"] = list.Award update["award"] = list.Award
this.module.modelPandaAtlas.modifyPandaAtlasList(session.GetUserId(), update) this.module.modelPandaAtlas.modifyPandaAtlasList(session.GetUserId(), update)