Commit 4b73783d authored by zengtianlai3's avatar zengtianlai3

2.3.3 代码质量:变量和方法同名

parent f1838a95
......@@ -56,7 +56,7 @@ public class LoginController {
return ResResult.success().record(loginVo);
}
}
return ResResult.failed().msg("用户名或密码错误");
return ResResult.failed().setMsgValue("用户名或密码错误");
}
@ApiOperation(value = "注销接口", notes = "注销接口")
......
......@@ -26,6 +26,6 @@ public class GlobalExceptionHandler {
@ResponseBody//为了返回数据
public BaseResult error(IotLicenseException e){
log.error("出现自定义异常,{}" + e.getMsg());
return BaseResult.failed().msg(e.getMsg()).code(e.getCode());
return BaseResult.failed().setMsgValue(e.getMsg()).setCodeValue(e.getCode());
}
}
......@@ -69,13 +69,13 @@ public class BaseResult {
}
public BaseResult code(long code) {
public BaseResult setCodeValue(long code) {
this.code = code;
return this;
}
public BaseResult msg(String message) {
public BaseResult setMsgValue(String message) {
this.msg = message;
return this;
}
......
......@@ -73,12 +73,12 @@ public class ResResult<T> {
}
public ResResult code(long code) {
public ResResult setCodeValue(long code) {
this.code = code;
return this;
}
public ResResult msg(String message) {
public ResResult setMsgValue(String message) {
this.msg = message;
return this;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment