实现店铺联系电话精确查询与索引

This commit is contained in:
2026-07-22 15:06:06 +09:00
parent 751cb46079
commit 2fd11daaf0
14 changed files with 904 additions and 64 deletions

View File

@@ -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)
}