package com.ycl.jxkg.controller.common; import com.ycl.jxkg.base.Result; import com.ycl.jxkg.domain.form.UpdatePwdForm; import com.ycl.jxkg.service.UserService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * 密码接口 * * @author:xp * @date:2024/7/11 11:54 */ @Validated @RequiredArgsConstructor @Api(value = "班级", tags = "班级管理") @RestController @RequestMapping("/api/common/user") public class CommonUserController { private final UserService userService; @ApiOperation(value = "修改密码", tags = {"修改密码"}) @PostMapping("/update/password") public Result updatePassword(@RequestBody @Validated UpdatePwdForm form) { userService.updatePassword(form); return Result.ok("修改成功"); } }