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 select = userDeviceMapper.select(userDevice); return Result.success(select); } }