mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-04-24 11:28:39 +08:00
update 返回体 统一
This commit is contained in:
@@ -6,7 +6,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
/**
|
||||
* web层通用数据处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @author Lion Li
|
||||
*/
|
||||
@Slf4j
|
||||
public class BaseController {
|
||||
@@ -28,34 +28,7 @@ public class BaseController {
|
||||
* @return 操作结果
|
||||
*/
|
||||
protected R<Void> toAjax(boolean result) {
|
||||
return result ? success() : error();
|
||||
return result ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回成功
|
||||
*/
|
||||
public R<Void> success() {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回失败消息
|
||||
*/
|
||||
public R<Void> error() {
|
||||
return R.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回成功消息
|
||||
*/
|
||||
public R<Void> success(String message) {
|
||||
return R.ok(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回失败消息
|
||||
*/
|
||||
public R<Void> error(String message) {
|
||||
return R.fail(message);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user