forked from Big-Data-Lab/CET-cmd-2.0
Merge branch 'dev' of http://62.234.217.137:3000/Big-Data-Lab/CET-cmd-2.0 into dev
This commit is contained in:
commit
a954982686
|
@ -96,6 +96,10 @@ public class Cet_4ServiceImpl extends ServiceImpl<Cet_4Mapper, Cet_4> implements
|
|||
|
||||
@Override
|
||||
public Result<JSONObject> getRateByBatch(String college, String batchStr) {
|
||||
|
||||
if (redisTemplate.opsForValue().get("getRateByBatch" + college + batchStr) != null) {
|
||||
return Result.ok((JSONObject) redisTemplate.opsForValue().get("getRateByBatch" + college + batchStr));
|
||||
}
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
DecimalFormat decimalFormat = new DecimalFormat("#.#");
|
||||
Date batch;
|
||||
|
@ -176,6 +180,7 @@ public class Cet_4ServiceImpl extends ServiceImpl<Cet_4Mapper, Cet_4> implements
|
|||
resultData.put("data", jsonObject);
|
||||
resultData.put("gradeData", gradeByBatch);
|
||||
System.out.println(resultData);
|
||||
redisTemplate.opsForValue().set("getRateByBatch" + college + batchStr, resultData);
|
||||
return Result.OK(resultData);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue