xiaoyong931011
2021-08-02 8269efac48716a328c12a4e836a4efb4a5f277d9
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
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.xzx.gc.user.controller;
 
 
import com.xzx.gc.common.Result;
import com.xzx.gc.common.request.BaseController;
import com.xzx.gc.entity.UserDevice;
import com.xzx.gc.user.mapper.UserDeviceMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import javax.servlet.http.HttpServletRequest;
import java.util.List;
 
@RestController
@RequestMapping("/userDevice")
@Validated
@Slf4j
@Api(tags = "用户设备管理")
public class UserDeviceController extends BaseController {
 
 
    @Autowired
    private UserDeviceMapper userDeviceMapper;
 
    @ApiOperation(value = "查询设备信息")
    @PostMapping("/find")
    public Result find(HttpServletRequest request) {
        UserDevice userDevice=new UserDevice();
        userDevice.setUserId(getUserId(request));
        List<UserDevice> select = userDeviceMapper.select(userDevice);
        return Result.success(select);
    }
 
 
 
}