mirror of https://gitee.com/stylefeng/roses
【7.0.4】【c】新增更新用户信息接口
parent
9f755cc867
commit
c0eceb4690
|
@ -8,6 +8,7 @@ import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
|
|||
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
|
||||
import cn.stylefeng.roses.kernel.scanner.api.annotation.PostResource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
@ -34,7 +35,7 @@ public class CustomerInfoController {
|
|||
* @date 2021/6/18 16:29
|
||||
*/
|
||||
@GetResource(name = "获取个人信息", path = "/customerInfo/getPersonInfo", requiredPermission = false)
|
||||
public ResponseData getPersonInfo(@RequestBody @Validated(CustomerInfoRequest.detail.class) CustomerRequest customerRequest) {
|
||||
public ResponseData getPersonInfo(@Validated(CustomerInfoRequest.detail.class) CustomerRequest customerRequest) {
|
||||
CustomerInfo customerInfo = customerService.getCustomerInfoById(customerRequest.getCustomerId());
|
||||
return new SuccessResponseData(customerInfo);
|
||||
}
|
||||
|
@ -45,7 +46,7 @@ public class CustomerInfoController {
|
|||
* @author fengshuonan
|
||||
* @date 2021/6/18 16:29
|
||||
*/
|
||||
@GetResource(name = "修改个人密码", path = "/customerInfo/updatePassword", requiredPermission = false)
|
||||
@PostResource(name = "修改个人密码", path = "/customerInfo/updatePassword", requiredPermission = false)
|
||||
public ResponseData updatePassword(@RequestBody @Validated(CustomerInfoRequest.changePassword.class) CustomerInfoRequest customerInfoRequest) {
|
||||
this.customerService.updatePassword(customerInfoRequest);
|
||||
return new SuccessResponseData();
|
||||
|
@ -57,7 +58,7 @@ public class CustomerInfoController {
|
|||
* @author fengshuonan
|
||||
* @date 2021/6/18 16:29
|
||||
*/
|
||||
@GetResource(name = "修改个人头像", path = "/customerInfo/updateAvatar", requiredPermission = false)
|
||||
@PostResource(name = "修改个人头像", path = "/customerInfo/updateAvatar", requiredPermission = false)
|
||||
public ResponseData updateAvatar(@RequestBody @Validated(CustomerInfoRequest.changeAvatar.class) CustomerInfoRequest customerInfoRequest) {
|
||||
this.customerService.updateAvatar(customerInfoRequest);
|
||||
return new SuccessResponseData();
|
||||
|
|
Loading…
Reference in New Issue