|
|
@@ -0,0 +1,26 @@
|
|
|
+package com.mokamrp.privates.utils.pangu.redis.task;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+@Component
|
|
|
+public class TaskRedis {
|
|
|
+ // 缓存的任务信息数据
|
|
|
+ public static final String PANGU_CASH_TASK_INFO = "pangu_cash_task_info";
|
|
|
+ // 缓存生成的链接
|
|
|
+ public static final String PANGU_CASH_CREATED_URL = "pangu_cash_created_url";
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private StringRedisTemplate stringRedisTemplate;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 缓存给typer制作url所需的数据
|
|
|
+ * @param json
|
|
|
+ */
|
|
|
+ public void createUrlByTyper(String json) {
|
|
|
+
|
|
|
+ // 把数据存放到redis缓存中
|
|
|
+ stringRedisTemplate.opsForList().leftPush(PANGU_CASH_TASK_INFO, json);
|
|
|
+ }
|
|
|
+}
|