shinnosuke
2026-08-21 bc2efbdb52190fe2e7be9920bbed6902d4ee28aa
talent-card-server/src/main/java/com/talentcard/server/service/BenefitQuotaService.java
@@ -549,7 +549,7 @@
                        .or()
                        .apply("exists (select 1 from benefit_order o "
                                + "join merchant m on m.id = o.merchant_id and m.deleted = 0 "
                                + "and m.merchant_type in ('hotel', '酒店服务') "
                                + "and m.merchant_type_code = 'hotel' "
                                + "where o.id = verify_record.order_id and o.deleted = 0)"));
        if (merchantId != null) {
            recordQuery.and(wrapper -> wrapper.eq("merchant_id", merchantId)
@@ -565,7 +565,7 @@
                .eq("verify_status", 1)
                .ge("updated_at", windowStart)
                .apply("exists (select 1 from merchant m where m.id = benefit_order.merchant_id "
                        + "and m.deleted = 0 and m.merchant_type in ('hotel', '酒店服务'))")
                        + "and m.deleted = 0 and m.merchant_type_code = 'hotel')")
                .apply("not exists (select 1 from verify_record r where r.order_id = benefit_order.id and r.status = 1)");
        if (merchantId != null) {
            orderQuery.eq("merchant_id", merchantId);