style: 调整代码格式
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -37,12 +37,13 @@ type Service struct {
|
|||||||
|
|
||||||
// List/Add接口条件配置
|
// List/Add接口条件配置
|
||||||
type QueryOp struct {
|
type QueryOp struct {
|
||||||
FieldEQ []string // 字段等于 多个字段选择以及高级搜索都是这个
|
FieldEQ []string // 字段等于 多个字段选择以及高级搜索都是这个
|
||||||
DataFieldEQ []string // 新增:JSONB data->>'xxx' 字段 = ? 多个字段选择以及高级搜索都是这个
|
DataFieldEQ []string // 新增:JSONB data->>'xxx' 字段 = ? 多个字段选择以及高级搜索都是这个
|
||||||
KeyWordField []string // 模糊搜索匹配的数据库字段,对应普通搜索
|
KeyWordField []string // 模糊搜索匹配的数据库字段,对应普通搜索
|
||||||
AddOrderby g.MapStrStr // 添加排序
|
AddOrderby g.MapStrStr // 添加排序
|
||||||
Where func(ctx context.Context) []g.Array // 自定义条件
|
Where func(ctx context.Context) []g.Array // 自定义条件
|
||||||
Select string // 查询字段,多个字段用逗号隔开 如: id,name 或 a.id,a.name,b.name AS bname
|
Select string // 查询字段,多个字段用逗号隔开 如: id,name 或 a.id,a.name,b.name AS bname
|
||||||
|
|
||||||
Join []*JoinOp // 关联查询
|
Join []*JoinOp // 关联查询
|
||||||
Extend func(ctx g.Ctx, m *gdb.Model) *gdb.Model // 追加其他条件
|
Extend func(ctx g.Ctx, m *gdb.Model) *gdb.Model // 追加其他条件
|
||||||
ModifyResult func(ctx g.Ctx, data interface{}) interface{} // 修改结果
|
ModifyResult func(ctx g.Ctx, data interface{}) interface{} // 修改结果
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ func NewGoldListService(id uint32) *GoldListService {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
ListQueryOp: &cool.QueryOp{
|
ListQueryOp: &cool.QueryOp{
|
||||||
|
Select: "exchange_num,status,rate,updateTime",
|
||||||
AddOrderby: g.MapStrStr{"updateTime": "asc"},
|
AddOrderby: g.MapStrStr{"updateTime": "asc"},
|
||||||
},
|
},
|
||||||
InsertParam: func(ctx context.Context) g.MapStrAny {
|
InsertParam: func(ctx context.Context) g.MapStrAny {
|
||||||
|
|||||||
Reference in New Issue
Block a user