fix -- 修改响应体AjaxResult.java为R.java

This commit is contained in:
hewenqiang
2021-12-21 10:26:42 +08:00
parent 501435d5aa
commit 18ac3ab725
35 changed files with 314 additions and 315 deletions

View File

@@ -1,6 +1,6 @@
package com.ruoyi.demo.controller;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.utils.RedisUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -45,8 +45,8 @@ public class RedisCacheController {
@ApiOperation("测试 @Cacheable")
@Cacheable(cacheNames = "redissonCacheMap", key = "#key", condition = "#key != null")
@GetMapping("/test1")
public AjaxResult<String> test1(String key, String value) {
return AjaxResult.success("操作成功", value);
public R<String> test1(String key, String value) {
return R.success("操作成功", value);
}
/**
@@ -60,8 +60,8 @@ public class RedisCacheController {
@ApiOperation("测试 @CachePut")
@CachePut(cacheNames = "redissonCacheMap", key = "#key", condition = "#key != null")
@GetMapping("/test2")
public AjaxResult<String> test2(String key, String value) {
return AjaxResult.success("操作成功", value);
public R<String> test2(String key, String value) {
return R.success("操作成功", value);
}
/**
@@ -75,8 +75,8 @@ public class RedisCacheController {
@ApiOperation("测试 @CacheEvict")
@CacheEvict(cacheNames = "redissonCacheMap", key = "#key", condition = "#key != null")
@GetMapping("/test3")
public AjaxResult<String> test3(String key, String value) {
return AjaxResult.success("操作成功", value);
public R<String> test3(String key, String value) {
return R.success("操作成功", value);
}
/**
@@ -86,7 +86,7 @@ public class RedisCacheController {
*/
@ApiOperation("测试设置过期时间")
@GetMapping("/test6")
public AjaxResult<Boolean> test6(String key, String value) {
public R<Boolean> test6(String key, String value) {
RedisUtils.setCacheObject(key, value);
boolean flag = RedisUtils.expire(key, 10, TimeUnit.SECONDS);
System.out.println("***********" + flag);
@@ -96,7 +96,7 @@ public class RedisCacheController {
e.printStackTrace();
}
Object obj = RedisUtils.getCacheObject(key);
return AjaxResult.success("操作成功", value.equals(obj));
return R.success("操作成功", value.equals(obj));
}
}