puzhibing
2024-01-03 48323fce3b4b8013755421aa1d1feb9a73cddde9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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));
    }
}