| | |
| | | import com.ruoyi.company.service.UserService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.experimental.StandardException; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @RestController |
| | | @RequestMapping("/front/user") |
| | | @RequiredArgsConstructor |
| | | @RequiredArgsConstructor(onConstructor_ = {@Lazy}) |
| | | public class UserController { |
| | | private final UserService userService; |
| | | |
| | |
| | | return R.ok(userService.getOne(new LambdaQueryWrapper<User>() |
| | | .eq(User::getPhone,phone))); |
| | | } |
| | | |
| | | @PutMapping("/updateUser") |
| | | public R<Void> updateUser(@RequestBody User user){ |
| | | user.setUpdateTime(LocalDateTime.now()); |
| | | userService.updateById(user); |
| | | return R.ok(); |
| | | } |
| | | } |