提交 38d0ce9d authored 作者: 000516's avatar 000516 提交者: Coding

活动记录上传飞书,添加redis-key

Merge Request: 活动记录上传飞书,添加redis-key Created By: @李秋林 Accepted By: @李秋林 URL: https://g-pkkp8204.coding.net/p/promotion/d/promotion-common/git/merge/77
...@@ -36,4 +36,19 @@ public interface RedisKeys { ...@@ -36,4 +36,19 @@ public interface RedisKeys {
String key; String key;
} }
@AllArgsConstructor
@Getter
enum ExportKeys {
/**
* 促销员暂存上报记录单元
*/
ACTIVITY_REPORTED_PUSH_FEISHU_SHEET("export:activity_feishu:sheet_row_num:sheet-"),
FEISHU_TENANT_TOKEN_ACTIVITY_ROBOT_1("export:feishu_tenant_token:activity_robot_1"),
FEISHU_TENANT_TOKEN_ACTIVITY_ROBOT_2("export:feishu_tenant_token:activity_robot_2"),
;
String key;
}
} }
...@@ -23,6 +23,14 @@ public class RedisCache { ...@@ -23,6 +23,14 @@ public class RedisCache {
vo.set(key, val); vo.set(key, val);
} }
/**
* 保存一个值,设置过期时间(秒)
*/
public void addToSeconds(String key, String val, long time) {
ValueOperations<String, String> vo = redisTemplate.opsForValue();
vo.set(key, val, time, TimeUnit.SECONDS);
}
/** /**
* 保存一个值,设置过期时间(分钟) * 保存一个值,设置过期时间(分钟)
*/ */
......
package com.wangxiaolu.promotion.common.util;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author : liqiulin
* @date : 2024-07-30 11
* @describe :
*/
public class NumberUtils {
private static final Pattern pattern = Pattern.compile("[^0-9]");
public static Integer matcherNum(String str) {
Matcher m = pattern.matcher(str);
return Integer.parseInt(m.replaceAll("").trim());
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论