fix(common): 更新查询操作字段注释并调整错误码
更新 `common/cool/service.go` 中 `QueryOp` 结构体字段的注释,明确 `FieldEQ` 和 `KeyWordField` 的用途。 同时修改玩家物品添加逻辑中的错误码,从 `ErrBaseItemTypeLimit` 改为 `ErrSystemError200007`。 在 `modules/blazing/service/item.go` 中为分页查询添加 `KeyWordField` 配置,支持按 `player_id` 搜索。 注释掉 `modules/blazing/service/pet_fusion
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -22,6 +22,7 @@ func NewPetFusionMaterialService() *PetFusionMaterialService {
|
||||
return &PetFusionMaterialService{
|
||||
&cool.Service{
|
||||
Model: model.NewPetFusionMaterial(), // 绑定PetFusionMaterial模型(默认参数占位)
|
||||
// PageQueryOp: &cool.QueryOp{KeyWordField: []string{"material1", "material2", "material3", "material4"}},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user