缓存加载

This commit is contained in:
Xubx 2025-04-24 19:14:12 +08:00
parent a5f4b5965f
commit bd8de06651
1 changed files with 4 additions and 4 deletions

View File

@ -209,10 +209,10 @@ public class CenterServiceImpl extends ServiceImpl<Cet_4Mapper, Cet_4> implement
public Result<JSONObject> getData(String college, String major, String entryDate) { public Result<JSONObject> getData(String college, String major, String entryDate) {
//判断是否存在缓存 //判断是否存在缓存
String key = "getData:" + college + major + entryDate; String key = "getData:" + college + major + entryDate;
// if (Boolean.TRUE.equals(redisTemplate.hasKey(key))) { if (Boolean.TRUE.equals(redisTemplate.hasKey(key))) {
// System.out.println((JSONObject) redisTemplate.opsForValue().get(key)); System.out.println((JSONObject) redisTemplate.opsForValue().get(key));
// return Result.ok((JSONObject) redisTemplate.opsForValue().get(key)); return Result.ok((JSONObject) redisTemplate.opsForValue().get(key));
// } }
//获取所有batch //获取所有batch
JSONObject batch = getBatch(); JSONObject batch = getBatch();
JSONArray batchsArray = batch.getJSONArray("batches"); JSONArray batchsArray = batch.getJSONArray("batches");