Browse Source

乘客记录免登陆

fllmoyu 4 năm trước cách đây
mục cha
commit
d9c18deb90

+ 2 - 0
common/src/main/java/com/jpsoft/bus/modules/bus/dto/NearbyShiftDTO.java

@@ -21,5 +21,7 @@ public class NearbyShiftDTO {
 
     private Integer distance;
 
+    private Integer stationNum;
+
     private String licensePlateNumber;
 }

+ 1 - 0
web/src/main/java/com/jpsoft/bus/config/WebMvcConfig.java

@@ -80,6 +80,7 @@ public class WebMvcConfig implements WebMvcConfigurer {
 				.excludePathPatterns("/mobile/passengerApi/passengerMessageNoReadNum")
 				.excludePathPatterns("/mobile/passengerApi/passengerMessage")
 				.excludePathPatterns("/mobile/passengerApi/mergeInfo")
+				.excludePathPatterns("/mobile/passengerApi/passengerRecordList")
 
 				;
 	}

+ 6 - 7
web/src/main/java/com/jpsoft/bus/modules/mobile/controller/PassengerApiController.java

@@ -1057,21 +1057,20 @@ public class PassengerApiController {
     @PostMapping("passengerRecordList")
     @ApiOperation(value = "乘车记录")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "token", value = "令牌", paramType = "form"),
-            @ApiImplicitParam(name = "subject", value = "目标(不传)", paramType = "form")
+            @ApiImplicitParam(name = "openId", value = "openId", paramType = "form")
     })
-    public MessageResult<Map> passengerRecordList(String token, @RequestAttribute String subject,@RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex, @RequestParam(value = "pageSize", defaultValue = "5") int pageSize) {
+    public MessageResult<Map> passengerRecordList(String openId,@RequestParam(value = "pageIndex", defaultValue = "1") int pageIndex, @RequestParam(value = "pageSize", defaultValue = "5") int pageSize) {
         MessageResult<Map> messageResult = new MessageResult<>();
 
         try {
 
-            UserInfo userInfo = userInfoService.get(Long.parseLong(subject));
-            if (userInfo == null){
-                throw new Exception("请先注册信息");
+
+            if (StringUtils.isBlank(openId)){
+                throw new Exception("openId为空");
             }
 
             Map<String,Object> searchParams = new HashMap<>();
-            searchParams.put("openId",userInfo.getOpenId());
+            searchParams.put("openId",openId);
             searchParams.put("payStatus",20);
 
             List<Sort> sortList = new ArrayList<>();