shinnosuke
2026-08-20 bacaa6e8f87ba4167901095ddb82c4a2ac2e74ca
talent-card-server/src/main/java/com/talentcard/server/mapper/ServiceApplicationMapper.java
@@ -57,11 +57,14 @@
                   m.longitude,
                   m.latitude
            from merchant m
            join premium_topic_merchant mapping on mapping.merchant_id = m.id and mapping.deleted = 0
            where m.id = #{merchantId}
              and mapping.category_key = #{categoryKey}
              and m.deleted = 0
              and m.status = 1
              and (exists (select 1 from premium_topic_merchant mapping
                           where mapping.merchant_id = m.id
                             and mapping.category_key = #{categoryKey}
                             and mapping.deleted = 0)
                   or (#{categoryKey} = 'medical' and m.merchant_type in ('medical', '免费体检', 'healthCheck')))
            limit 1
            """)
    Map<String, Object> selectPremiumMerchantSnapshot(@Param("merchantId") Long merchantId, @Param("categoryKey") String categoryKey);