| | |
| | | import com.ruoyi.company.api.model.UserDetail; |
| | | import com.ruoyi.company.service.UserService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import lombok.experimental.StandardException; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("/front/user") |
| | |
| | | private final UserService userService; |
| | | |
| | | @PostMapping("/register") |
| | | public R register(RegisterUser registerUser) { |
| | | public R register(@RequestBody RegisterUser registerUser) { |
| | | userService.register(registerUser); |
| | | return R.ok(); |
| | | } |
| | |
| | | return R.ok(userService.getOne(new LambdaQueryWrapper<User>() |
| | | .eq(User::getAccountName,accountName))); |
| | | } |
| | | |
| | | @GetMapping("/getUserByPhone") |
| | | @InnerAuth |
| | | public R<User> getUserByPhone(String phone){ |
| | | return R.ok(userService.getOne(new LambdaQueryWrapper<User>() |
| | | .eq(User::getPhone,phone))); |
| | | } |
| | | } |