diff --git a/common/cool/service.go b/common/cool/service.go index 9bd2944b9..325f4fc82 100644 --- a/common/cool/service.go +++ b/common/cool/service.go @@ -34,8 +34,8 @@ type Service struct { // List/Add接口条件配置 type QueryOp struct { - FieldEQ []string // 字段等于 - KeyWordField []string // 模糊搜索匹配的数据库字段 + FieldEQ []string // 字段等于 多个字段选择以及高级搜索都是这个 + KeyWordField []string // 模糊搜索匹配的数据库字段,对应普通搜索 AddOrderby g.MapStrStr // 添加排序 Where func(ctx context.Context) []g.Array // 自定义条件 Select string // 查询字段,多个字段用逗号隔开 如: id,name 或 a.id,a.name,b.name AS bname diff --git a/logic/service/player/player.go b/logic/service/player/player.go index 889d8bb71..7b97dd6b8 100644 --- a/logic/service/player/player.go +++ b/logic/service/player/player.go @@ -308,7 +308,7 @@ func (p *Player) ItemAdd(t ...model.ItemInfo) (result []model.ItemInfo) { cool.Loger.Error(context.TODO(), "物品不存在", v.ItemId) t1 := common.NewTomeeHeader(2601, p.Info.UserID) - t1.Result = uint32(errorcode.ErrorCodes.ErrBaseItemTypeLimit) + t1.Result = uint32(errorcode.ErrorCodes.ErrSystemError200007) p.SendPack(t1.Pack(nil)) //准备包由各自发,因为协议不一样 continue diff --git a/modules/blazing/service/item.go b/modules/blazing/service/item.go index 4717e1430..ebd3baa29 100644 --- a/modules/blazing/service/item.go +++ b/modules/blazing/service/item.go @@ -59,6 +59,7 @@ func NewItemService(id uint32) *ItemService { Service: &cool.Service{Model: model.NewPlayerBag(), UniqueKey: map[string]string{ "player_id": "角色名称不能重复", }, PageQueryOp: &cool.QueryOp{ + KeyWordField: []string{"player_id"}, Where: func(ctx context.Context) [][]interface{} { var ( //admin = cool.GetAdmin(ctx) diff --git a/modules/blazing/service/pet_fusion_material_service.go b/modules/blazing/service/pet_fusion_material_service.go index 60b029b24..27e2ff206 100644 --- a/modules/blazing/service/pet_fusion_material_service.go +++ b/modules/blazing/service/pet_fusion_material_service.go @@ -22,6 +22,7 @@ func NewPetFusionMaterialService() *PetFusionMaterialService { return &PetFusionMaterialService{ &cool.Service{ Model: model.NewPetFusionMaterial(), // 绑定PetFusionMaterial模型(默认参数占位) + // PageQueryOp: &cool.QueryOp{KeyWordField: []string{"material1", "material2", "material3", "material4"}}, }, } }