licailing 5 rokov pred
rodič
commit
3208438d7f

+ 3 - 2
src/main/java/com/izouma/dingdong/domain/OrderInfo.java

@@ -28,7 +28,7 @@ public class OrderInfo extends BaseEntity {
 //    private String nickname;
 
     //经度在前 纬度在后
-    @ApiModelProperty(value = "用户地址经纬度",name = "location")
+    @ApiModelProperty(value = "用户地址经纬度", name = "location")
     private String location;
 
     @Enumerated(EnumType.STRING)
@@ -95,12 +95,13 @@ public class OrderInfo extends BaseEntity {
 
 
     //订单信息
+    @ApiModelProperty(value = "订单号", name = "orderNo")
     private String orderNo;
 
     @ApiModelProperty(value = "下单时间", name = "orderTime")
     private LocalDateTime orderTime;
 
-    @ApiModelProperty(value = "用户地址Id",name = "addressId")
+    @ApiModelProperty(value = "用户地址Id", name = "addressId")
     private Long addressId;
 
     @ApiModelProperty(value = "配送地址", name = "userAddress")

+ 6 - 0
src/main/java/com/izouma/dingdong/web/rider/RiderController.java

@@ -78,7 +78,13 @@ public class RiderController extends BaseController {
     @ApiOperation("骑手信息")
     public Rider riderInfo(Long riderId) {
         return riderRepo.findById(riderId).orElseThrow(new BusinessException("无骑手"));
+    }
 
+    @GetMapping("/my")
+    @ApiOperation("骑手信息")
+    public Rider riderInfo() {
+        return riderRepo.findByUserId(SecurityUtils.getAuthenticatedUser().getId())
+                .orElseThrow(new BusinessException("无骑手"));
     }
 
     @GetMapping("/apply")