package com.dsh.other.controller;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.dsh.other.model.User;
|
import com.dsh.other.service.IUserService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
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 zhibing.pu
|
* @Date 2023/12/14 16:25
|
*/
|
@RestController
|
@RequestMapping("")
|
public class UserController {
|
|
@Autowired
|
private IUserService userService;
|
|
|
|
@PostMapping("/user/getUserByPhone")
|
public User getUserByPhone(@RequestBody String phone){
|
return userService.getOne(new QueryWrapper<User>().eq("phone", phone).eq("status", 1));
|
}
|
}
|