Merge #88 into master from cc_20260401_private_sphere_qr
fix:私域二维码 * cc_20260401_private_sphere_qr: (3 commits squashed) - fix:新增防抖 - Merge branch 'refs/heads/cc_20260302_debounce' into cc_20260401_private_sphere_qr - fix:私域二维码 Signed-off-by: 王非凡 <accounts_67eba0c5fee9c49c80c8e2b4@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/88
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package com.cool.store.annotation;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* 防抖
|
||||
*/
|
||||
@Target({ElementType.METHOD, ElementType.TYPE})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Inherited
|
||||
@Documented
|
||||
public @interface Debounce {
|
||||
/**
|
||||
* 防抖时间窗口(毫秒)
|
||||
*/
|
||||
long timeMs() default 1000;
|
||||
|
||||
/**
|
||||
* key 的 SpEL
|
||||
* 例:"'order:' + #req.orderId"
|
||||
*/
|
||||
String key() default "";
|
||||
|
||||
/**
|
||||
* 是否根据用户区分
|
||||
*/
|
||||
boolean diffUser() default true;
|
||||
|
||||
/**
|
||||
* 是否为pc端,pc端使用CurrentUserHolder获取用户信息,否则使用PartnerUserHolder获取
|
||||
*/
|
||||
boolean pc() default true;
|
||||
|
||||
/**
|
||||
* true: 在窗口内触发则抛异常
|
||||
* false: 在窗口内触发则直接返回上一次结果
|
||||
*/
|
||||
boolean throwOnDebounce() default true;
|
||||
}
|
||||
@@ -384,4 +384,24 @@ public class RedisConstant {
|
||||
* 钱包分账支付锁
|
||||
*/
|
||||
public static final String WALLET_ALLOCATION_PAY_LOCK_KEY = "wallet_allocation_pay_lock_key:{0}";
|
||||
|
||||
/**
|
||||
* 私域设备SN->绑定二维码地址
|
||||
*/
|
||||
public static final String PRIVATE_SN_QR_CODE = "private_sphere_qr";
|
||||
|
||||
/**
|
||||
* 私域设备SN->门店id
|
||||
*/
|
||||
public static final String PRIVATE_STORE_SN_BIND = "private_sphere_store_sn";
|
||||
|
||||
/**
|
||||
* 私域设备SN->门店私域二维码地址
|
||||
*/
|
||||
public static final String PRIVATE_STORE_SN_QR_CODE = "private_sphere_store_sn_qr_code";
|
||||
|
||||
/**
|
||||
* IP限制key
|
||||
*/
|
||||
public static final String IP_LIMIT = "ip_limit";
|
||||
}
|
||||
|
||||
@@ -452,6 +452,8 @@ public enum ErrorCodeEnum {
|
||||
WALLET_RE_PAY_FAIL(1830019, "重新支付异常,请联系管理员", null),
|
||||
WALLET_PAY_CANNOT_CANCEL(1830020, "该交易无法取消", null),
|
||||
TOTAL_FEES_NEED_EQUAL(1830021, "分账总金额需与合计缴费金额一致", null),
|
||||
|
||||
IP_LIMIT(1840000, "IP访问次数超限", null),
|
||||
;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user