上传mgo 日志 异常 检测

This commit is contained in:
liwei1dao 2022-07-26 19:53:40 +08:00
parent b640d088b8
commit 99388bf759

View File

@ -1,6 +1,7 @@
package items
import (
"errors"
"fmt"
"go_dreamfactory/lego/core"
"go_dreamfactory/modules"
@ -66,9 +67,14 @@ func (this *ModelItemsComp) DelUserPack(uId string, ids ...string) (err error) {
}
//更新用户的背包信息
func (this *ModelItemsComp) UpdateUserPack(uId string, itmes ...*pb.DB_UserItemData) (err error) {
func (this *ModelItemsComp) UpdateUserPack(uid string, itmes ...*pb.DB_UserItemData) (err error) {
if len(uid) == 0 {
err = errors.New("UpdateUserPack uid is nil")
this.module.Panicf("err:%v", err)
return
}
for _, v := range itmes {
this.ChangeList(uId, v.GridId, map[string]interface{}{
this.ChangeList(uid, v.GridId, map[string]interface{}{
"amount": v.Amount,
})
}