shinnosuke
2026-08-24 5067fb6ed50f011f0734219881a67f4c19a93adc
fix: unify merchant coupon labels
3个文件已修改
25 ■■■■■ 已修改文件
rencaika/pages/merchant/merchant.uvue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rencaika/pages/stay-benefits/stay-benefits.uvue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
talent-card-server/src/main/java/com/talentcard/server/business/portal/PortalService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rencaika/pages/merchant/merchant.uvue
@@ -33,7 +33,7 @@
                    </view>
                    <view v-else class="merchant-title-row">
                        <text class="merchant-title">{{merchantName}}</text>
                        <view class="merchant-tags"><text v-if="!isHotelMerchant && merchantHasCoupon" class="coupon-tag">券</text><text v-if="merchantDiscount != ''" class="discount-tag">{{merchantDiscount}}</text><text v-if="isHotelMerchant && merchantConsumeDiscount != ''" class="discount-tag">{{merchantConsumeDiscount}}</text></view>
                        <view class="merchant-tags"><text v-if="merchantHasCoupon" class="coupon-tag">券</text><text v-if="merchantDiscount != ''" class="discount-tag">{{merchantDiscount}}</text><text v-if="isHotelMerchant && merchantConsumeDiscount != ''" class="discount-tag">{{merchantConsumeDiscount}}</text></view>
                    </view>
                    <view class="service-tags"><text v-if="!isParkingMerchant && !isMedicalMerchant">{{merchantServiceLabel}}</text><text>{{applicableCards}}</text></view>
                    <view v-if="!isParkingMerchant && merchantType != 'apartment'" class="merchant-address-row">
@@ -73,7 +73,7 @@
                            <image class="package-image" :src="item.image" mode="aspectFill" @error="replaceImage(item)"></image>
                            <view class="package-info">
                                <text class="package-name">{{item.name}}</text>
                                <view class="package-tags"><text v-if="!isHotelMerchant && merchantHasCoupon" class="coupon-tag">券</text><text v-if="merchantDiscount != ''" class="discount-tag">{{merchantDiscount}}</text><text v-if="isHotelMerchant && merchantConsumeDiscount != ''" class="discount-tag">{{merchantConsumeDiscount}}</text></view>
                                <view class="package-tags"><text v-if="merchantHasCoupon" class="coupon-tag">券</text><text v-if="merchantDiscount != ''" class="discount-tag">{{merchantDiscount}}</text><text v-if="isHotelMerchant && merchantConsumeDiscount != ''" class="discount-tag">{{merchantConsumeDiscount}}</text></view>
                                <view class="package-bottom"><view class="price-row"><text class="price-symbol">¥</text><text class="price">{{item.price}}</text><text v-if="!isHotelMerchant" class="old-price">¥{{item.originalPrice}}</text></view><view class="buy-button"><text>{{item.available === false ? '已售罄' : (isHotelMerchant ? '预约' : '购买')}}</text></view></view>
                            </view>
                        </view>
@@ -385,7 +385,7 @@
                merchantDiscount.value = routedDiscount
                merchantConsumeDiscount.value = ''
                hasFreeVoucher.value = false
                merchantPrimaryTag.value = '惠'
                merchantPrimaryTag.value = '券'
                merchantAddress.value = routedAddress == '' ? '西区清香坪北街51号' : routedAddress
                merchantLocation.value = { latitude: 26.5856, longitude: 101.7184, name: name, address: merchantAddress.value }
                packages.value = hotelPackages
@@ -405,7 +405,7 @@
                    usageInstructions.value = '到达景区后出示人才码,根据景区后台配置的权益规则核验使用;开放时间、适用区域及预约要求以景区现场说明为准。'
                    merchantRightsText.value = '持卓越人才卡可享该景区配置的专属游览权益,具体优惠内容、开放时间、预约方式和使用限制以景区说明为准。'
                } else if (routedMerchantType == 'apartment') {
                    merchantPrimaryTag.value = '惠'
                    merchantPrimaryTag.value = '券'
                    groupBuyingEnabled.value = false
                    merchantServiceLabel.value = '住宿服务'
                    usageInstructions.value = '到店后出示人才码并按人才公寓或驿站的后台配置提交入住申请,房源、入住时长及审核要求以服务方说明为准。'
@@ -614,7 +614,10 @@
                if (normalizedCardLabel != '') applicableCards.value = normalizedCardLabel
                const consumeType = data != null && data.consumeType != null ? String(data.consumeType) : ''
                const consumeDiscount = data != null && data.consumeDiscount != null ? String(data.consumeDiscount).trim() : ''
                merchantConsumeDiscount.value = consumeType == '折扣' && consumeDiscount != '' ? consumeDiscount + '折' : ''
                const consumeCoupon = data != null && data.consumeCoupon != null ? String(data.consumeCoupon).trim() : ''
                merchantConsumeDiscount.value = hotelStoreConsume && consumeType == '折扣' && consumeDiscount != ''
                    ? consumeDiscount + '折'
                    : (hotelStoreConsume && consumeType == '优惠' && consumeCoupon != '' ? '减' + consumeCoupon : '')
            }
            hasFreeVoucher.value = isHotelMerchant.value && data != null && data.rightsStatus != null && String(data.rightsStatus) == 'AVAILABLE' && (data.freeVoucherEnabled === true || Number(data.freeVoucherEnabled) == 1)
            if (hasFreeVoucher.value) {
rencaika/pages/stay-benefits/stay-benefits.uvue
@@ -165,9 +165,14 @@
                const merchantName = readText(item.merchantName, item['merchant_name'])
                const discountText = readText(item.discountText, item['discount_text'])
                const configuredTags: any[] = item.benefitTags instanceof Array ? (item.benefitTags as any[]) : []
                const hasCoupon = item.couponAvailable === true || Number(item.couponAvailable) == 1 || configuredTags.some((tag: any) => {
                    const value = String(tag).trim()
                    return value == '券' || value == '惠'
                })
                const displayTags: any[] = activeTab.value == 'hotel'
                    ? configuredTags.filter((tag: any) => String(tag).trim() != '惠')
                    ? configuredTags.filter((tag: any) => String(tag).trim() != '券' && String(tag).trim() != '惠')
                    : configuredTags
                if (activeTab.value == 'hotel' && hasCoupon) displayTags.unshift('券')
                next.push({
                    id: '' + item.id,
                    merchantType: merchantType != '' ? merchantType : activeTab.value,
talent-card-server/src/main/java/com/talentcard/server/business/portal/PortalService.java
@@ -366,7 +366,7 @@
    private List<String> stayBenefitTags(Map<String, Object> right, Map<String, Object> merchant) {
        List<String> tags = new ArrayList<>();
        Object merchantId = merchant.get("id");
        if (merchantId instanceof Number id && hasActiveMerchantCoupon(id.longValue())) tags.add("惠");
        if (merchantId instanceof Number id && hasActiveMerchantCoupon(id.longValue())) tags.add("券");
        if (right == null) return tags;
        if (booleanValue(right.get("freeVoucherEnabled"))) {
            String times = textOrDefault(right.get("freeVoucherTimes"), "");
@@ -665,6 +665,7 @@
        String freeVoucherCycle = "";
        String consumeType = "";
        String consumeDiscount = "";
        String consumeCoupon = "";
        boolean storeConsume = false;
        boolean consumeEnabled = false;
        merchant.put("rightsAvailable", configuredRight != null);
@@ -678,6 +679,7 @@
            freeVoucherCycle = textOrDefault(configuredRight.get("freeVoucherCycle"), "");
            consumeType = textOrDefault(configuredRight.get("consumeType"), "");
            consumeDiscount = textOrDefault(configuredRight.get("consumeDiscount"), "");
            consumeCoupon = textOrDefault(configuredRight.get("consumeCoupon"), "");
            storeConsume = booleanValue(configuredRight.get("storeConsume"));
            consumeEnabled = booleanValue(configuredRight.get("consumeEnabled"));
        } else if (levelRight != null) {
@@ -698,6 +700,7 @@
        merchant.put("freeVoucherCycle", freeVoucherCycle);
        merchant.put("consumeType", consumeType);
        merchant.put("consumeDiscount", consumeDiscount);
        merchant.put("consumeCoupon", consumeCoupon);
        merchant.put("storeConsume", storeConsume);
        merchant.put("consumeEnabled", consumeEnabled);
        merchant.put("usageInstructions", merchantUsageInstructions(