Commit 06c87acc authored by Quxl's avatar Quxl

优化API

parent 3ad764a7
...@@ -42,11 +42,11 @@ public class MemberInfoController { ...@@ -42,11 +42,11 @@ public class MemberInfoController {
@PostMapping("save") @PostMapping("save")
@ApiOperation("保存会员基本信息") @ApiOperation("保存会员基本信息")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "String", required = true, name = "email"), @ApiImplicitParam(paramType = "query", dataType = "string", required = true, name = "email"),
@ApiImplicitParam(paramType = "query", dataType = "String", required = false, name = "realname"), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "realname"),
@ApiImplicitParam(paramType = "query", dataType = "String", required = false, name = "address"), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "address"),
@ApiImplicitParam(paramType = "query", dataType = "String", required = false, name = "company"), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "company"),
@ApiImplicitParam(paramType = "query", dataType = "String", required = false, name = "tel"), @ApiImplicitParam(paramType = "query", dataType = "string", required = false, name = "tel"),
}) })
public Object save(String email, String realname, String address, String company, String tel) { public Object save(String email, String realname, String address, String company, String tel) {
LoginToken loginToken = tokenService.getToken(); LoginToken loginToken = tokenService.getToken();
...@@ -58,6 +58,10 @@ public class MemberInfoController { ...@@ -58,6 +58,10 @@ public class MemberInfoController {
@ResponseBody @ResponseBody
@PostMapping("changePassword") @PostMapping("changePassword")
@ApiOperation("修改密码") @ApiOperation("修改密码")
@ApiImplicitParams({
@ApiImplicitParam(paramType = "query", dataType = "string", required = true, name = "password", value="当前密码"),
@ApiImplicitParam(paramType = "query", dataType = "string", required = true, name = "newPassword", value="新密码"),
})
public Object changePassword(String password, String newPassword) { public Object changePassword(String password, String newPassword) {
LoginToken loginToken = tokenService.getToken(); LoginToken loginToken = tokenService.getToken();
Integer id = (Integer)loginToken.getId(); Integer id = (Integer)loginToken.getId();
......
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