| 程序包 | 说明 |
|---|---|
| com.power.common.model |
| 限定符和类型 | 方法和说明 |
|---|---|
static CommonResult |
CommonResult.fail()
Server unknown exception (default response code 9999)
|
static CommonResult |
CommonResult.fail(IMessage message)
Failed response
|
static CommonResult |
CommonResult.fail(String code,
String message)
失败或失败响应
|
static CommonResult |
CommonResult.ok()
Successful response (default response code is 0000)
|
static <T> CommonResult<T> |
CommonResult.ok(IMessage message)
Customize success response message,
generally define enumeration to implement IMessage
|
CommonResult<T> |
CommonResult.setResult(T data)
Usage:
Result.ok().setResult("hello")
Business data returned when processing is successful
|
Copyright © 2021. All rights reserved.