实现店铺联系电话精确查询与索引
This commit is contained in:
@@ -114,6 +114,9 @@ func (s *ShopStore) List(ctx context.Context, opts *store.QueryOptions, filters
|
||||
if shopCode, ok := filters["shop_code"].(string); ok && shopCode != "" {
|
||||
query = query.Where("shop_code = ?", shopCode)
|
||||
}
|
||||
if contactPhone, ok := filters["contact_phone"].(string); ok && contactPhone != "" {
|
||||
query = query.Where("contact_phone = ?", contactPhone)
|
||||
}
|
||||
if parentID, ok := filters["parent_id"].(uint); ok {
|
||||
query = query.Where("parent_id = ?", parentID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user